ls
Linux Commands - Basic Commands

ls

 

This command will list the contents of a directory.


Example:


ls -l


Options

-l list files one line at a time

-A lists all the contents of a directory except for current directory and parent directory

-B ignore backups

-c sort by change time

-d lists file and directory names without contents

-e lists all times in full

-f lists without sorting

-k lists file size in kilobytes

-l lists files in long format

-L list files by symbolic link

-m list files horizontally separated by commas

-r sorts files in reverse order

-R lists files recursively

-S lists files by size, biggest first

-u sorts files by the last time they were accessed

-x prints in columns, sorted horizontally

-X sorts files alphabetically by file extension