Here are some common options for the ls command in a Bash shell:
-a: Lists all files, including hidden files (those starting with a dot).-l: Lists files in long format, showing detailed information (permissions, owner, size, etc.).-h: Used with-lto display file sizes in a human-readable format (e.g., KB, MB).-R: Recursively lists all files in subdirectories.-t: Sorts files by modification time, with the newest files first.-S: Sorts files by size, with the largest files first.-r: Reverses the order of the sort (e.g., oldest first or smallest first).-1: Lists one file per line, useful for scripts.
Example Usage:
ls -la: Lists all files in long format, including hidden files.ls -lh: Lists files in long format with human-readable sizes.
These options can be combined for more customized output. If you have more questions or need further details, feel free to ask!
