How to list directories in Linux
ls command is used for this purpose. You can list directories or files with ls.
Now see the manual page for ls
you will get a manual page screen. I am sharing a part of this.
Here we will discuss some of the frequently used options in ls
ls –a
Purpose
It is used to show all files. Showing all files means including the hidden files.
Note: When a file name on a Linux file system starts with a dot, it is considered a hidden file and it doesn't show up in regular file listings.
2. ls -l
Purpose
Typing ls -l (that is a letter L, not the number 1) gives you a long listing.
· ls -h
Purpose
It shows the numbers (file sizes) in a more human-readable format. You can use different combination as well. E.g. lh,hl, -h –l, -h.
Below I am showing you an example:
Comments
Post a Comment