Here are some common options for the ls command:
-
-l: Lists files in long format, providing detailed information such as permissions, owner, size, and modification date.ls -l -
-a: Includes hidden files (those starting with a dot) in the listing.ls -a -
-h: When used with-l, it displays file sizes in a human-readable format (e.g., KB, MB).ls -lh -
-R: Recursively lists all files and directories in the current directory and its subdirectories.ls -R -
-t: Sorts files by modification time, with the most recently modified files listed first.ls -lt -
-S: Sorts files by size, with the largest files listed first.ls -lS
These options can be combined for more specific listings, such as ls -la to show all files in long format.
