Oct 15, 2008

Linux Commands

How to search files for specific terms:
grep -r [search term] .

How to add items such as svn, mvn, java, etc. to your PATH and set environment variables for all users:
Edit the /etc/profile file and then run .[space]/etc/profile with
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

How to set an environment variable:
export JAVA_HOME=/usr/java/
export ANT_HOME=/usr/ant/

How to find out where and command is installed such as java, ant, mvn:
which java
which ant
which mvn

How to stop a running program:
First determine the pid of the program:
ps -ef | grep [program name]

Then use the pid to kill the program:
kill -9 [pid]

How to search for a file:
find . -name [filename]

How to unmout a drive (Notice the command is umount and NOT UNmount):
umount [mount location]

How to clear the Java Web Start cache:
javaws -uninstall

How to view the Java Web Start Console
javaws -viewer

How to mount a drive:
mount -t [new mount name (this directory must exist)] [mount location]
mount -t /home/user/share /mnt/floppy

1 comment:

Unknown said...

thank you very very much!
everything is running!!!