Linux CentOS 6.0 commands

List of files and Directories
To see the list of files and directories.
[root@localhost~]#ls <options> <arguments>

Options:
  • l - Long list including attributes
  • a- all files and directories including hidden
  • d- For a particular file or directory
  • R- Recursive to see the tree structure.
[root@localhost ~]# ls
anaconda-ks.cfg  Documents  Music     post-install      Public     Videos
Desktop          Downloads  Pictures  post-install.log  Templates



blue color text are directories and black color text are files.


[root@localhost ~]# ls -l
total 52
-rw-------. 1 root root  1036 May 19 22:14 anaconda-ks.cfg
drwxr-xr-x. 4 root root  4096 Aug  5 13:53 Desktop
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Documents
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Downloads
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Music
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Pictures
-rw-r--r--. 1 root root 11955 Jul 14  2011 post-install
-rw-r--r--. 1 root root   549 Jul 14  2011 post-install.log
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Public
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Templates
drwxr-xr-x. 2 root root  4096 Jul 12 13:12 Videos

[root@localhost ~]# ls -a
.                               Documents        .ICEauthority     .pulse-cookie
..                              Downloads        .imsettings.log    .recently-used.xbel
.adobe                      .esd_auth           .kde                   .rnd
anaconda-ks.cfg        .evolution           .local                 .ssh
.bash_history             .gconf                 .macromedia     .tcshrc
.bash_logout             .gconfd                .mozilla              Templates
.bash_profile             .gnome2               Music                Videos
.bashrc                     .gnome2_private   .nautilus             .viminfo
.cache                      .gnote                    Pictures            .xauthzklLnb
.config                      .gnupg                   post-install        .xinputrc
.cshrc                       .gstreamer-0.10      post-install.log
.dbus                        .gtk-bookmarks      Public
Desktop                   .gvfs                        .pulse

[root@localhost ~]# ls -l anaconda-ks.cfg
-rw-------. 1 root root 1036 May 19 22:14 anaconda-ks.cfg

[root@localhost ~]# ls -ld /home
drwxr-xr-x. 9 root root 4096 Aug  4 15:35 /home
















Comments

Popular posts from this blog

Reasoning-Number Series

Reasoning-Letter Series

Multiply Negative numbers in java