How to list files and folders
Overview
ls lists a directory. With options it can show hidden names, ownership, permissions, sizes, and modification times.
Examples
ls
ls -l
ls -la
ls -lh ~/Downloads
ls *.txt
Useful options
-lshows detailed long format-aincludes dotfiles and the./..entries-hmakes sizes easier to read when used with-l-tsorts newest first;-rreverses sorting-dlists a directory itself rather than its contents
Tips
Linux names are case-sensitive. Quote paths containing spaces, and use Tab completion to reduce typing errors.
A long listing begins with the item type and permissions; a directory starts with d and a regular file with -.