ls command in linux

How to list files in linux

How to list directories in Linux


Purpose

You can list the contents of a directory with ls.

ls
Now see the manual page for ls

how to show manual of ls command

you will get a manual page screen. I am sharing a part of this.

manual page of ls


Here we will discuss some of the frequently used options in ls

<!--[if !supportLists]

·        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.


·         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

Related Posts Plugin for WordPress, Blogger...