What are the options under ls command in linux?

In: Linux
To see the full list of options for the ls command, type "ls --help".

Some of the more important options are:

  • -a - show all files (do not hide files starting with .)
  • -h - human readable (e.g., show file size as 2K instead of 2048)
  • -l - long listing format (show much more information about each file)

The options can be combined. For example "ls -lha".

[Note: I often need a long listing of all files with the most recently modified file(s) at the end of the listing so I frequently use the command:

ls -latr

to accomplish this task. JHM]

 

Improve Answer Discuss the question "What are the options under ls command in linux?" Watch Question

First answer by Avir. Last edit by John.m.horn. Contributor trust: 12 [recommend contributor]. Question popularity: 14 [recommend question]


Research your answer:

Can you answer other questions about linux?

Answers.com > Wiki Answers > Categories > Technology > Computers > Linux > What are the options under ls command in linux?