OS Manuals

/usr/bin/ls

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running ls --help (exit 0). permalink

List directory contents.
Ignore files and directories starting with a '.' by default

Usage: ls [OPTION]... [FILE]...

Options:
      --help
          Print help information.
      --format <format>
          Set the display format.
  -C
          Display the files in columns.
  -l, --long
          Display detailed information.
  -x
          List entries in rows instead of in columns.
  -T, --tabsize <COLS>
          Assume tab stops at each COLS instead of 8 [env: TABSIZE=]
  -m
          List entries separated by commas.
      --zero
          List entries separated by ASCII NUL characters.
  -D, --dired
          generate output designed for Emacs' dired (Directory Editor) mode
      --hyperlink[=<WHEN>]
          hyperlink file names WHEN [default: never] [possible values: always, auto, never]
  -1
          List one file per line.
  -o
          Long format without group information.
          Identical to --format=long with --no-group.
  -g
          Long format without owner information.
  -n, --numeric-uid-gid
          -l with numeric UIDs and GIDs.
      --quoting-style <quoting-style>
          Set quoting style. [possible values: literal, locale, shell, shell-escape, shell-always,
          shell-escape-always, clocale, c, escape]
  -N, --literal
          Use literal quoting style. Equivalent to `--quoting-style=literal`
  -b, --escape
          Use escape quoting style. Equivalent to `--quoting-style=escape`
  -Q, --quote-name
          Use C quoting style. Equivalent to `--quoting-style=c`
  -q, --hide-control-chars
          Replace control characters with '?' if they are not escaped.
      --show-control-chars
          Show control characters 'as is' if they are not escaped.
      --time <field>
          Show time in `<field>`:
          access time (-u): atime, access, use;
          change time (-t): ctime, status.
          modification time: mtime, modification.
          birth time: birth, creation;
  -c
          If the long listing format (e.g., -l, -o) is being used, print the
          status change time (the 'ctime' in the inode) instead of the modification
          time. When explicitly sorting by time (--sort=time or -t) or when not
          using a long listing format, sort according to the status change time.
  -u
          If the long listing format (e.g., -l, -o) is being used, print the
          status access time instead of the modification time. When explicitly
          sorting by time (--sort=time or -t) or when not using a long listing
          format, sort according to the access time.
      --hide <PATTERN>
          do not list implied entries matching shell PATTERN (overridden by -a or -A)
  -I, --ignore <PATTERN>
          do not list implied entries matching shell PATTERN
  -B, --ignore-backups
          Ignore entries which end with ~.
      --sort <field>
          Sort by `<field>`: name, none (-U), time (-t), size (-S), extension (-X) or width
          [possible values: name, none, time, size, version, extension, width]
  -S
          Sort by file size, largest first.
  -t
          Sort by modification time (the 'mtime' in the inode), newest first.
  -v
          Natural sort of (version) numbers in the filenames.
  -X
          Sort alphabetically by entry extension.
  -U
          Do not sort; list the files in whatever order they are stored in the
          directory.  This is especially useful when listing very large directories,
          since not doing any sorting can be noticeably faster.
  -L, --dereference
          When showing file information for a symbolic link, show information for the
          file the link references rather than the link itself.
      --dereference-command-line-symlink-to-dir
          Do not follow symlinks except when they link to directories and are
          given as command line arguments.
  -H, --dereference-command-line
          Do not follow symlinks except when given as command line arguments.
  -G, --no-group
          Do not show group in long format.
      --author
          Show author in long format. On the supported platforms,
          the author always matches the file owner.
  -a, --all
          Do not ignore hidden files (files with names that start with '.').
  -A, --almost-all
          In a directory, do not ignore all file names that start with '.',
          only ignore '.' and '..'.
  -f
          List all files in directory order, unsorted. Equivalent to -aU. Disables --color unless
          explicitly specified.
  -d, --directory
          Only list the names of directories, rather than listing directory contents.
          This will not follow symbolic links unless one of `--dereference-command-line
          (-H)`, `--dereference (-L)`, or `--dereference-command-line-symlink-to-dir` is
          specified.
  -h, --human-readable
          Print human readable file sizes (e.g. 1K 234M 56G).
  -k, --kibibytes
          default to 1024-byte blocks for file system usage; used only with -s and per
          directory totals
      --si
          Print human readable file sizes using powers of 1000 instead of 1024.
      --block-size <BLOCK_SIZE>
          scale sizes by BLOCK_SIZE when printing them
  -i, --inode
          print the index number of each file
  -r, --reverse
          Reverse whatever the sorting method is e.g., list files in reverse
          alphabetical order, youngest first, smallest first, or whatever.
  -R, --recursive
          List the contents of all directories recursively.
  -w, --width <COLS>
          Assume that the terminal is COLS columns wide.
  -s, --size
          print the allocated size of each file, in blocks
      --color[=<color>]
          Color output based on file type. [possible values: always, auto, never]
      --indicator-style <indicator-style>
          Append indicator with style WORD to entry names:
          none (default),  slash (-p), file-type (--file-type), classify (-F) [possible values:
          none, slash, file-type, classify]
  -F, --classify[=<when>]
          Append a character to each file name indicating the file type. Also, for
          regular files that are executable, append '*'. The file type indicators are
          '/' for directories, '@' for symbolic links, '|' for FIFOs, '=' for sockets,
          '>' for doors, and nothing for regular files. when may be omitted, or one of:
              none - Do not classify. This is the default.
              auto - Only classify if standard output is a terminal.
              always - Always classify.
          Specifying --classify and no when is equivalent to --classify=always. This will
          not follow symbolic links listed on the command line unless the
          --dereference-command-line (-H), --dereference (-L), or
          --dereference-command-line-symlink-to-dir options are specified. [possible values: always,
          auto, never]
      --file-type
          Same as --classify, but do not append '*'
  -p
          Append / indicator to directories.
      --time-style <TIME_STYLE>
          time/date format with -l; see TIME_STYLE below [env: TIME_STYLE=]
      --full-time
          like -l --time-style=full-iso
  -Z, --context
          print any security context of each file
      --group-directories-first
          group directories before files; can be augmented with
          a --sort option, but any use of --sort=none (-U) disables grouping
  -V, --version
          Print version

The TIME_STYLE argument can be full-iso, long-iso, iso, locale or +FORMAT. FORMAT is interpreted
like in date. Also the TIME_STYLE environment variable sets the default style to use.
Options (60)
OptionDescriptionSource
--helpPrint help information.help + man
--format formatSet the display format.help + man
-CDisplay the files in columns.help + man
-l, --longDisplay detailed information.help + man
-xList entries in rows instead of in columns.help + man
-T, --tabsize COLSAssume tab stops at each COLS instead of 8 [env: TABSIZE=]help + man
-mList entries separated by commas.help + man
--zeroList entries separated by ASCII NUL characters.help + man
-D, --diredgenerate output designed for Emacs' dired (Directory Editor) modehelp + man
--hyperlink WHENhyperlink file names WHEN [default: never] [possible values: always, auto, never]help
-1List one file per line.help + man
-oLong format without group information.help + man
-gLong format without owner information.help + man
-n, --numeric-uid-gidhelp + man
--quoting-style quoting-styleSet quoting style.help + man
-N, --literalUse literal quoting style.help + man
-b, --escapeUse escape quoting style.help + man
-Q, --quote-nameUse C quoting style.help + man
-q, --hide-control-charsReplace control characters with '?' if they are not escaped.help + man
--show-control-charsShow control characters 'as is' if they are not escaped.help + man
--time fieldShow time in `<field>`: access time (-u): atime, access, use;help + man
-cIf the long listing format (e.g., -l, -o) is being used, print the status change time (the 'ctime' in the inode) instead of the modification time.help + man
-uIf the long listing format (e.g., -l, -o) is being used, print the status access time instead of the modification time.help + man
--hide PATTERNdo not list implied entries matching shell PATTERN (overridden by -a or -A)help + man
-I, --ignore PATTERNdo not list implied entries matching shell PATTERNhelp + man
-B, --ignore-backupsIgnore entries which end with ~.help + man
--sort fieldSort by `<field>`: name, none (-U), time (-t), size (-S), extension (-X) or width [possible values: name, none, time, size, version, extension, width]help + man
-SSort by file size, largest first.help + man
-tSort by modification time (the 'mtime' in the inode), newest first.help + man
-vNatural sort of (version) numbers in the filenames.help + man
-XSort alphabetically by entry extension.help + man
-UDo not sort;help + man
-L, --dereferenceWhen showing file information for a symbolic link, show information for the file the link references rather than the link itself.help + man
--dereference-command-line-symlink-to-dirDo not follow symlinks except when they link to directories and are given as command line arguments.help + man
-H, --dereference-command-lineDo not follow symlinks except when given as command line arguments.help + man
-G, --no-groupDo not show group in long format.help + man
--authorShow author in long format.help + man
-a, --allDo not ignore hidden files (files with names that start with '.').help + man
-A, --almost-allIn a directory, do not ignore all file names that start with '.', only ignore '.' and '..'.help + man
-fList all files in directory order, unsorted.help + man
-d, --directoryOnly list the names of directories, rather than listing directory contents.help + man
-h, --human-readablePrint human readable file sizes (e.g. 1K 234M 56G).help + man
-k, --kibibytesdefault to 1024-byte blocks for file system usage;help + man
--siPrint human readable file sizes using powers of 1000 instead of 1024.help + man
--block-size BLOCK_SIZEscale sizes by BLOCK_SIZE when printing themhelp + man
-i, --inodeprint the index number of each filehelp + man
-r, --reverseReverse whatever the sorting method is e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.help + man
-R, --recursiveList the contents of all directories recursively.help + man
-w, --width COLSAssume that the terminal is COLS columns wide.help + man
-s, --sizeprint the allocated size of each file, in blockshelp + man
--color colorColor output based on file type.help + man
--indicator-style indicator-styleAppend indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F) [possible values: none, slash, file-type, classify]help + man
-F, --classify whenAppend a character to each file name indicating the file type.help
--file-typeSame as --classify, but do not append '*'help + man
-pAppend / indicator to directories.help + man
--time-style TIME_STYLEtime/date format with -l;help + man
--full-timelike -l --time-style=full-isohelp + man
-Z, --contextprint any security context of each filehelp + man
--group-directories-firstgroup directories before files;help + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.