Listing the Files and Directories

October 21st, 2006 liewsheng Posted in Common, ls | Hits: 33019 | 5 Comments »

When I 1st time using Linux OS, the 1st command I use is ‘ls’ ;p Why I want use ‘ls’? Of cause want to listing the files and directories in the filesystem ;D

Using the command is easy:


this will list out all the files and directories, but this wouldn’t display the hidden files/directories ( those file start with ‘.’ will be hidden in Linux OS). To display the hidden files/diretories following command can be use:

ls -a

all this option would not display detail of files and directories listed. To display more details about the files/directories (like size, date modify, permission and etc…):

ls -l

will display the file and diretory detail but not listing the hidden files/diretories. So :

ls -al

will show the all the file and directory (including the hidden files/directories). You may question why don’t use ‘ll’, and ‘ll’ will perform same function as ‘ls -al’. Actually ‘ll’ is just a alias of ‘ls -al’.

May be in some Linux distro, the ‘ls’ will not list the files and directories in different colours. Then you will need to use this option ‘–color=auto’:

ls --color=auto

5 Responses to “Listing the Files and Directories”

  1. […] Listing the Files and Directories […]

  2. We can this is /etc/bashrc or $HOME/.bashrc to have permanent effect.

  3. taw suede fargue hammerste prentace hark debility indio Olive

  4. I have read this post and if I could I wish to suggest you few interesting things or tips. Maybe you can write next articles referring to this article. I want to read even more things about it!

  5. trying to find you, can i have your fb?

Leave a Reply