ls

Description

List directory contents.

Syntax

ls [OPTION]... [FILE]...

Practical uses

  • ls -a: Do not ignore entries starting with dots (. and ..).
  • ls -l: Use a long listing format.
  • ls -h: With -l and/or -s, print human readable sizes (for example, 1K 234M 2G).
  • ls -R: List subdirectories recursively.
  • ls -S: Sort by file size, largest first.
  • ls -t: Sort by modification time, newest first.
  • ls -ltu: Sort by, and show, access time.
  • ls -Z: Print any security context of each file.