Basic command for Linux Part1
1) To check the present working directory
#pwd
Example :
[root@test7 ~]# pwd
/root
2) To show contents of directory (folder)
#ls
Example:
[root@test7 ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog
[root@test7 ~]#
3) to see more details including the permission regarding the contents of directory (Folder)
#ls -l or #ll
Example:
[root@test7 ~]# ls -l
total 60
-rw------- 1 root root 1131 Dec 25 14:16 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Dec 25 14:28 Desktop
-rw-r--r-- 1 root root 36541 Dec 25 14:16 install.log
-rw-r--r-- 1 root root 3684 Dec 25 14:15 install.log.syslog
[root@test7 ~]#
[root@test7 ~]# ll
total 60
-rw------- 1 root root 1131 Dec 25 14:16 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Dec 25 14:28 Desktop
-rw-r--r-- 1 root root 36541 Dec 25 14:16 install.log
-rw-r--r-- 1 root root 3684 Dec 25 14:15 install.log.syslog
[root@test7 ~]#
4) To see all contents including hidden files of a drectory (Folder)
#ls -a
Example:
[root@test7 ~]# ls -a
. .bash_history .bashrc .dmrc .gconfd .gnome2_private .ICEauthority .metacity .tcshrc
.. .bash_logout .cshrc .eggcups .gnome .gstreamer-0.10 install.log .nautilus .Trash
anaconda-ks.cfg .bash_profile Desktop .gconf .gnome2 .gtkrc-1.2-gnome2 install.log.syslog .redhat .xsession-errors
5) to see tree structure of nested directories
#ls -R
Example:
[root@test7 ~]# ls -R Desktop/
Desktop/:
test
Desktop/test:
test1
Desktop/test/test1:
[root@test7 ~]#
continue........
No comments:
Post a Comment