ls
ls [OPTIONS] [--] [paths]...
By default, ls will list the files and contents of any directories on the command line, expect that it will ignore files and directories whose names start with '.'.
Options
--help-
Print help information
--version,-V-
Print version information
--format-
Set the display format.
-C-
Display the files in columns.
--long,-l-
Display detailed information.
-x-
List entries in rows instead of in columns.
-m-
List entries separated by commas.
-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.
--numeric-uid-gid,-n-
-l with numeric UIDs and GIDs.
--quoting-style-
Set quoting style.
--literal,-N-
Use literal quoting style. Equivalent to
--quoting-style=literal --escape,-b-
Use escape quoting style. Equivalent to
--quoting-style=escape --quote-name,-Q-
Use C quoting style. Equivalent to
--quoting-style=c --hide-control-chars,-q-
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
: access time (-u): atime, access, use; change time (-t): ctime, status. 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)
--ignore=<PATTERN>,-I <PATTERN>-
do not list implied entries matching shell PATTERN
--ignore-backups,-B-
Ignore entries which end with ~.
--sort=<field>-
Sort by
: name, none (-U), time (-t), size (-S) or extension (-X) -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.
--dereference,-L-
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 dereference symlinks except when they link to directories and are given as command line arguments.
--dereference-command-line,-H-
Do not dereference symlinks except when given as command line arguments.
--no-group,-G-
Do not show group in long format.
--author-
Show author in long format. On the supported platforms, the author always matches the file owner.
--all,-a-
Do not ignore hidden files (files with names that start with '.').
--almost-all,-A-
In a directory, do not ignore all file names that start with '.', only ignore '.' and '..'.
--directory,-d-
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-diris specified. --human-readable,-h-
Print human readable file sizes (e.g. 1K 234M 56G).
--si-
Print human readable file sizes using powers of 1000 instead of 1024.
--inode,-i-
print the index number of each file
--reverse,-r-
Reverse whatever the sorting method is e.g., list files in reverse alphabetical order, youngest first, smallest first, or whatever.
--recursive,-R-
List the contents of all directories recursively.
--width=<COLS>,-w <COLS>-
Assume that the terminal is COLS columns wide.
--color-
Color output based on file type.
--indicator-style-
Append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)
--classify,-F-
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.
--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
--full-time-
like -l --time-style=full-iso
--context,-Z-
print any security context of each file