tldr/pages/common/ls.md
Managor e1efc6d05e
ls: refresh descriptions (#13698)
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc>
2024-09-13 21:16:26 +02:00

763 B

ls

List directory contents. More information: https://www.gnu.org/software/coreutils/ls.

  • List files one per line:

ls -1

  • List [a]ll files, including hidden files:

ls -a

  • List files with a trailing symbol to indicate file type (directory/, symbolic_link@, executable*, ...):

ls -F

  • List [a]ll files in [l]ong format (permissions, ownership, size, and modification date):

ls -la

  • List files in [l]ong format with size displayed using [h]uman-readable units (KiB, MiB, GiB):

ls -lh

  • List files in [l]ong format, sorted by [S]ize (descending) [R]ecursively:

ls -lSR

  • List files in [l]ong format, sorted by [t]ime the file was modified and in [r]everse order (oldest first):

ls -ltr

  • Only list [d]irectories:

ls -d */