man > ls

🏷️ NAME

ls – list directory contents

πŸš€ Quick Reference

Use CaseCommandDescription
πŸ“‚ Show all files, including hiddenls -aDo not hide entries starting with .
πŸ“‹ Long listing with detailsls -lPermissions, size, date, etc.
πŸ“ Human‑readable sizesls -lhSizes shown as 1K, 234M, 2G…
⏱️ Sort by time, newest firstls -ltShow latest files at top
πŸ”ƒ Recursive subdirectory listingls -RList everything below current dir
πŸ“¦ Sort by file size (largest first)ls -lSIdentify disk‑hungry files
🎨 Colorised output (terminal)ls --color=autoDistinguish file types by colour
🚫 One file per linels -1Simple listing, no special chars

πŸ“œ SYNOPSIS

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

πŸ“– DESCRIPTION

List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.

Mandatory arguments to long options are mandatory for short options too.

πŸ”Ή -a, --all

πŸ“‚ do not ignore entries starting with .

πŸ”Ή -A, --almost-all

πŸ“ do not list implied . and ..

πŸ”Ή --author

✍️ with -l, print the author of each file

πŸ”Ή -b, --escape

πŸ–¨οΈ print C‑style escapes for nongraphic characters

πŸ”Ή --block-size=SIZE

πŸ“ with -l, scale sizes by SIZE when printing them; e.g., --block-size=M; see SIZE format below

πŸ”Ή -B, --ignore-backups

πŸ—‘οΈ do not list implied entries ending with ~

πŸ”Ή -c

⏰ with -lt: sort by, and show, ctime (time of last modification of file status information); with -l: show ctime and sort by name; otherwise: sort by ctime, newest first

πŸ”Ή -C

πŸ“Š list entries by columns

πŸ”Ή --color[=WHEN]

🎨 colorize the output; WHEN can be always (default if omitted), auto, or never; more info below

πŸ”Ή -d, --directory

πŸ“ list directories themselves, not their contents

πŸ”Ή -D, --dired

🧩 generate output designed for Emacs' dired mode

πŸ”Ή -f

⚑ do not sort, enable -aU, disable -ls --color

πŸ”Ή -F, --classify

🏷️ append indicator (one of */=>@|) to entries

πŸ”Ή --file-type

🏷️ likewise, except do not append *

πŸ”Ή --format=WORD

πŸ“ across -x, commas -m, horizontal -x, long -l, single‑column -1, verbose -l, vertical -C

πŸ”Ή --full-time

⏱️ like -l --time-style=full-iso

πŸ”Ή -g

πŸ‘₯ like -l, but do not list owner

πŸ”Ή --group-directories-first

πŸ“‚πŸ—‚οΈ group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping

πŸ”Ή -G, --no-group

πŸ‘₯🚫 in a long listing, don't print group names

πŸ”Ή -h, --human-readable

πŸ“ with -l and -s, print sizes like 1K 234M 2G etc.

πŸ”Ή --si

πŸ“ likewise, but use powers of 1000 not 1024

πŸ”Ή -H, --dereference-command-line

πŸ”— follow symbolic links listed on the command line

πŸ”Ή --dereference-command-line-symlink-to-dir

πŸ”—πŸ“ follow each command line symbolic link that points to a directory

πŸ”Ή --hide=PATTERN

πŸ™ˆ do not list implied entries matching shell PATTERN (overridden by -a or -A)

πŸ”Ή --hyperlink[=WHEN]

πŸ”— hyperlink file names; WHEN can be always (default if omitted), auto, or never

πŸ”Ή --indicator-style=WORD

🏷️ append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F)

πŸ”Ή -i, --inode

πŸ”’ print the index number of each file

πŸ”Ή -I, --ignore=PATTERN

πŸ™ˆ do not list implied entries matching shell PATTERN

πŸ”Ή -k, --kibibytes

πŸ’Ύ default to 1024‑byte blocks for disk usage; used only with -s and per directory totals

πŸ”Ή -l

πŸ“‹ use a long listing format

πŸ”Ή -L, --dereference

πŸ”— when showing file information for a symbolic link, show information for the file the link references rather than for the link itself

πŸ”Ή -m

, fill width with a comma separated list of entries

πŸ”Ή -n, --numeric-uid-gid

πŸ”’ like -l, but list numeric user and group IDs

πŸ”Ή -N, --literal

πŸ“› print entry names without quoting

πŸ”Ή -o

πŸ‘€ like -l, but do not list group information

πŸ”Ή -p, --indicator-style=slash

/ append / indicator to directories

πŸ”Ή -q, --hide-control-chars

? print ? instead of nongraphic characters

πŸ”Ή --show-control-chars

πŸ–₯️ show nongraphic characters as‑is (the default, unless program is ls and output is a terminal)

πŸ”Ή -Q, --quote-name

β€ž β€œ enclose entry names in double quotes

πŸ”Ή --quoting-style=WORD

🏷️ use quoting style WORD for entry names: literal, locale, shell, shell-always, shell-escape, shell-escape-always, c, escape (overrides QUOTING_STYLE environment variable)

πŸ”Ή -r, --reverse

↕️ reverse order while sorting

πŸ”Ή -R, --recursive

πŸ” list subdirectories recursively

πŸ”Ή -s, --size

πŸ’Ύ print the allocated size of each file, in blocks

πŸ”Ή -S

πŸ“¦ sort by file size, largest first

πŸ”Ή --sort=WORD

πŸ”€ sort by WORD instead of name: none (-U), size (-S), time (-t), version (-v), extension (-X)

πŸ”Ή --time=WORD

⏲️ change the default of using modification times; access time (-u): atime, access, use; change time (-c): ctime, status; birth time: birth, creation; with -l, WORD determines which time to show; with --sort=time, sort by WORD (newest first)

πŸ”Ή --time-style=TIME_STYLE

πŸ•°οΈ time/date format with -l; see TIME_STYLE below

πŸ”Ή -t

⏱️ sort by time, newest first; see --time

πŸ”Ή -T, --tabsize=COLS

β†Ή assume tab stops at each COLS instead of 8

πŸ”Ή -u

πŸ•’ with -lt: sort by, and show, access time; with -l: show access time and sort by name; otherwise: sort by access time, newest first

πŸ”Ή -U

πŸ”€ do not sort; list entries in directory order

πŸ”Ή -v

πŸ”’ natural sort of (version) numbers within text

πŸ”Ή -w, --width=COLS

πŸ“ set output width to COLS. 0 means no limit

πŸ”Ή -x

↔️ list entries by lines instead of by columns

πŸ”Ή -X

πŸ“Ž sort alphabetically by entry extension

πŸ”Ή -Z, --context

πŸ›‘οΈ print any security context of each file

πŸ”Ή -1

πŸ“„ list one file per line. Avoid '\n' with -q or -b

πŸ”Ή --help

❓ display this help and exit

πŸ”Ή --version

ℹ️ output version information and exit

The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,… (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on.

The TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT. FORMAT is interpreted like in date(1). If FORMAT is FORMAT1<newline>FORMAT2, then FORMAT1 applies to non‑recent files and FORMAT2 to recent files. TIME_STYLE prefixed with posix- takes effect only outside the POSIX locale. Also the TIME_STYLE environment variable sets the default style to use.

Using color to distinguish file types is disabled both by default and with --color=never. With --color=auto, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it.

πŸšͺ Exit Codes

✍️ AUTHOR

Written by Richard M. Stallman and David MacKenzie.

🐞 REPORTING BUGS

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>

©️ COPYRIGHT

Copyright Β© 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

πŸ”— SEE ALSO

Full documentation <https://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'

ls
🏷️ NAME πŸš€ Quick Reference πŸ“œ SYNOPSIS πŸ“– DESCRIPTION
πŸ”Ή -a, --all πŸ”Ή -A, --almost-all πŸ”Ή --author πŸ”Ή -b, --escape πŸ”Ή --block-size=SIZE πŸ”Ή -B, --ignore-backups πŸ”Ή -c πŸ”Ή -C πŸ”Ή --color[=WHEN] πŸ”Ή -d, --directory πŸ”Ή -D, --dired πŸ”Ή -f πŸ”Ή -F, --classify πŸ”Ή --file-type πŸ”Ή --format=WORD πŸ”Ή --full-time πŸ”Ή -g πŸ”Ή --group-directories-first πŸ”Ή -G, --no-group πŸ”Ή -h, --human-readable πŸ”Ή --si πŸ”Ή -H, --dereference-command-line πŸ”Ή --dereference-command-line-symlink-to-dir πŸ”Ή --hide=PATTERN πŸ”Ή --hyperlink[=WHEN] πŸ”Ή --indicator-style=WORD πŸ”Ή -i, --inode πŸ”Ή -I, --ignore=PATTERN πŸ”Ή -k, --kibibytes πŸ”Ή -l πŸ”Ή -L, --dereference πŸ”Ή -m πŸ”Ή -n, --numeric-uid-gid πŸ”Ή -N, --literal πŸ”Ή -o πŸ”Ή -p, --indicator-style=slash πŸ”Ή -q, --hide-control-chars πŸ”Ή --show-control-chars πŸ”Ή -Q, --quote-name πŸ”Ή --quoting-style=WORD πŸ”Ή -r, --reverse πŸ”Ή -R, --recursive πŸ”Ή -s, --size πŸ”Ή -S πŸ”Ή --sort=WORD πŸ”Ή --time=WORD πŸ”Ή --time-style=TIME_STYLE πŸ”Ή -t πŸ”Ή -T, --tabsize=COLS πŸ”Ή -u πŸ”Ή -U πŸ”Ή -v πŸ”Ή -w, --width=COLS πŸ”Ή -x πŸ”Ή -X πŸ”Ή -Z, --context πŸ”Ή -1 πŸ”Ή --help πŸ”Ή --version
πŸšͺ Exit Codes ✍️ AUTHOR 🐞 REPORTING BUGS ©️ COPYRIGHT πŸ”— SEE ALSO

Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 06:30 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format

^_top_^