ls

ls will show you a directory listing. It will also show various features such as symlinks and directories in color. For more information about ls use man ls command.

SYNOPSIS

ls [OPTION]… [FILE]…

ls -1 – display one file per line

To show single entry per line, use -1 option as shown below.

ls -l – display all information about files and directories

ls -lh – display file size in Human Readable format

ls -ld – display directory information When you use “ls -l” you will get the details of directories content. But if you want the details of directory, then you can use -d option. For example, if you use ls -l /public_html it will display all the files under this directory. But, if you want to display the information about the /public_html/ directory, use -ld option as shown below.

ls –lt – shows files list based on last modified time

 

For more options use man ls command.

 

About Author

Leave a Reply

Your email address will not be published. Required fields are marked *