What are some common parameters of the 'ls' command?

Some common parameters (options) of the ls command include:

  • -l: Use a long listing format, which provides detailed information about each file or directory.
  • -a: Include hidden files (those starting with a dot).
  • -h: When used with -l, it displays file sizes in a human-readable format (e.g., KB, MB).
  • -R: Recursively list subdirectories.
  • -t: Sort files by modification time, with the newest first.
  • -S: Sort files by size, with the largest first.
  • -r: Reverse the order of the sort.

You can combine these options, for example, ls -lah to list all files in a long format with human-readable sizes.

0 Comments

no data
Be the first to share your comment!