Archive for June, 2008
How to Determine if a Linux machine has a 32 bit or 64 bit kernel
Based on the output from the following command you can easily determine if a Linux machine has 32 bit or 64 bit kernel:
uname -a
If you see something like x86_64, then your running with a 64 bit kernel. If you use see i386/i486/i586/i686 it’s a 32 bit kernel.
Stupid Windows Tricks from the command line
Change the Log on credentials for a windows service:
sc.exe config "YourServiceName" obj= "yourusername" password= "yourpassword"
Bring up services:
services.msc
Copy a directory structure:
xcopy G:\foo\*.* D:\bin\bar /E /D /Y
Copy a directory structure and exclude one or more files/directories:
xcopy \\nyceqasp8081\apps\polyent\*.* D:\apps\bar\ /E /D /Y /EXCLUDE:excludefile.txt
where excludefile.txt is a file containing one or more path exclusions for example D:\apps\bar\logs
Set environment variables:
setx JAVA_HOME "D:\bin\Java\jdk1.5.0_12" /m
The /m here denotes the variable should be a system wide variable. Leaving /m off will add the variable to the current user’s environment instead.
Map a drive and make it persistent (after reboots):
net use G: \\foo.bar.com\spg /P:Yes
Note: These have been tested and known to work on Windows Server 2003. Your mileage may vary on other variants of Windows.
Silent Install of JDK and JRE
This week I had a requirement for scripting the installation of the Java 5 JDK and JRE. These instructions require separate install files for the JDK and JRE but will get the job done.
For the JDK, you can place the following in a *.bat file and simply run it from command line:
@echo off
echo Installing JDK…
start /w C:\temp\jdk-1_5_0_12-windows-i586-p.exe /s /v”/qn INSTALLDIR=d:\bin\Java\jdk1.5.0_12 REBOOT=Suppress”
For the JRE:
@echo off
echo Installing JRE…
start /w C:\temp\jre-1_5_0_12-windows-i586-p.exe /s INSTALLDIR=d:\bin\Java\jre1.5.0_12 REBOOT=Suppress
Some related links:
How to migrate a Subversion repository in 4 steps
sudo svnadmin dump /path/to/svn-repository > svn-repository.dmpgzip svn-repository.dmp- move
svn-repository.dmp.gzto your new server - log in to your new server, then
sudo svnadmin load svn-repository