Monday, November 10, 2008

Linux Command

I kept writing frequently used Linux command in files, and save them somewhere.
Then I found it dificult to find out them later.

Now I am starting to find them and put them here.


Linux Command
written by: YLast updated: Monday Oct. 27, 2008

find Linux kernel version
uname -mrsn

Uninstall MySQL 4.0.12
1.rpm -qagrep -i mysql
display:
MySQL-server-4.0.12-0MySQl-client-4.0.12-0
2.rpm -e MySQL-server-4.0.12-0
3.
rpm -e MySQL-client-4.0.12-0

usermod: enables the user to modify the information contained in the system account files
Example: To change user Ajita's home directory to /home/chemdept. enter
shell>usermod -d /home/chemdept ajita

Find the number of files in a Listing(directory)
$ls wc -l
49
$

Make a symbolic link to a file

# ln -s /etc/rc.d/init.d/catalina.sh /etc/rc.d/rc5.d/S81tomcat

delete the symbolic link

# unlink /etc/rc.d/rc5.d/S81tomcat

Find out run level
# runlevel

No comments: