ls

ls - list directory contents.


Display files and folders:

ls /home/joe

Display all information about files and directories:

ls -l /home/joe

Display file size in human readable format:

ls -lh /home/joe

Display all files, including hidden files:

ls -la /home/joe

Display files recursively:

ls -R /home/joe

Display last edited file:

ls -lt /home/joe

Display one file per line:

ls -1 /home/joe

Display directories with ‘/’ at the end:

ls -F /home/joe

Display files in reverse order:

ls -lr /home/joe

Display files by size:

ls -lS /home/joe

Display inode number of files and directories:

ls -li /home/joe