What are other ls options?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 06 2025
0776

Here are some additional ls options you might find useful:

  • -R: Lists subdirectories recursively, showing all contents within them.
  • -S: Sorts files by size, with the largest files first.
  • -X: Sorts files alphabetically by their extension.
  • -1: Lists one file per line, which can be useful for scripts.
  • -t: Sorts files by modification time, with the newest first.
  • -r: Reverses the order of the sort (e.g., oldest first when used with -t).

Example:

ls -lSR

This command lists files in long format, sorted by size, with the largest files first.

Feel free to ask if you need more information on any specific option!

0 Comments

no data
Be the first to share your comment!