Pages

Thursday, January 3, 2013

RHEL 6.3 ,CentOS 6.3 ,Scientific Linux 6.3 Advanced Linux Command

Advanced Command

Command
Description
[root@server1 /]# ls
[root@server1 ~]# ls
anaconda-ks.cfg  Documents  file1  install.log.syslog  Pictures  TemplatesDesktop  Downloads  install.log  Music      Public    Videos
Show list of directory
[root@server1 ~]# ls –a
[root@server1 ~]# su user1
[user1@server1 root]$ cd
[user1@server1 ~]$ ls -a
.  ..  .bash_history  .bash_logout  .bash_profile  .bashrc  .gnome2  .mozilla  .viminfo
 Show hidden content of a directory
[user1@server1 ~]$ su root
Password:
[root@server1 user1]# cd
[root@server1 ~]# ls -l
total 104
-rw-------. 1 root root  2467 Dec 15 20:25 anaconda-ks.cfg
drwxr-xr-x. 2 root root  4096 Dec 18 02:04 Desktop
drwxr-xr-x. 2 root root  4096 Dec 16 00:34 Documents
drwxr-xr-x. 2 root root  4096 Dec 16 00:34 Downloads
Show Content list with Permission
[root@server1 ~]# ls -lh
total 104K
-rw-------. 1 root root 2.5K Dec 15 20:25 anaconda-ks.cfg
drwxr-xr-x. 2 root root 4.0K Dec 18 02:04 Desktop
drwxr-xr-x. 2 root root 4.0K Dec 16 00:34 Documents
drwxr-xr-x. 2 root root 4.0K Dec 16 00:34 Downloads

Show content total & Individual
 Content size.
[root@server1 ~]# ls -lt
total 148
-rw-r--r--  1 root root 46974 Dec 18 04:02 install.log
 List by Modification
[root@server1 ~]# ls
install.log         Music     Public     Videos
anaconda-ks.cfg  Documents  file1      install.log.syslog  Pictures  Templates
[root@server1 ~]# more install.log
 Show content with list
Then press Enter
[root@server1 ~]# clear
Clear Screen
[root@server1 ~]# tree
Content show with tree diagram
[root@server1 ~]# rmdir
[root@server1 ~]# mkdir 1
[root@server1 ~]# rmdir 1
 Remove Emtpy directory
[root@server1 ~]# hwclock
Tue 18 Dec 2012 04:20:34 AM BDT  -0.924766 seconds
  Show DATE & TIME
[root@server1 ~]# history 10
Show content history
[root@server1 ~]# mail
 mail from /var/spool/mail
[root@server1 ~]# locate resolv.conf
/etc/resolv.conf
/etc/sysconfig/networking/profiles/default/resolv.conf
/usr/share/man/man5/resolv.conf.5.gz
Search file or service from full system
Last update #updatedb


0 comments:

Post a Comment