LS(1)
π NAME π
okay bestie, listen β ls is literally THE command that lists directory contents. that's it. that's the whole job. but she does it iconically. β¨
πΈ SYNOPSIS πΈ
ls [OPTION]... [FILE]...
like. you give her some options, you give her some files, she tells you what's in there. simple as. π«Ά
π¦ DESCRIPTION π¦
she lists info about the *FILE*s (and if you don't hand her any files, she just does the current directory, no big deal). and if you haven't specified any of -cftuvSUX or --sort, she sorts entries alphabetically, because she's polite like that. π
also real talk, mandatory arguments to long options are mandatory for short options too. ik, it's giving rules, but that's the deal.
okay so here is every single flag, and I mean every one, no skips, no shortcuts, we're doing this π :
-a,--allβ do not ignore entries starting with.(yes, including the shy hidden ones π«£)-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'; peek at the SIZE format below-B,--ignore-backupsβ do not list implied entries ending with~-cβ with-lt: sort by, and show, ctime (time of last change 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]β color the output WHEN; more info below π-d,--directoryβ list directories themselves, not their contents-D,--diredβ generate output designed for Emacs' dired mode-fβ same as-a -U-F,--classify[=WHEN]β append indicator (one of*/=>@|) to entries WHEN--file-typeβ like-F, except do not append*--format=WORDβ across, horizontal (-x), commas (-m), 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-G,--no-groupβ in a long listing, don't print group names-h,--human-readableβ with-land-s, print sizes like1K 234M 2Getc.--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-aor-A)--hyperlink[=WHEN]β hyperlink file names WHEN--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 file system usage; used only with-sand per directory totals-lβ use a long listing format (the main character format, ngl)-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 theQUOTING_STYLEenvironment variable)-r,--reverseβ reverse order while sorting-R,--recursiveβ list subdirectories recursively (she goes deep π)-s,--sizeβ print the allocated size of each file, in blocks-Sβ sort by file size, largest first--sort=WORDβ change default'name'sort to WORD: none (-U), size (-S), time (-t), version (-v), extension (-X), name, width--time=WORDβ select which timestamp used to display or sort; access time (-u): atime, access, use; metadata change time (-c): ctime, status; modified time (default): mtime, modification; 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 directory entries-vβ natural sort of (version) numbers within text-w,--width=COLSβ set output width to COLS.0means 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--zeroβ end each output line with NUL, not newline-1β list one file per line--helpβ display this help and exit--versionβ output version information and exit
β¨ the SIZE argument β¨
so the SIZE argument is an integer plus an optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y,R,Q (powers of 1024) or KB,MB,... (powers of 1000). and binary prefixes can be used too, bestie: KiB=K, MiB=M, and so on. π
β° the TIME_STYLE argument β°
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. a TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale. also, the TIME_STYLE environment variable sets the default style to use. π
π the WHEN argument π
the WHEN argument defaults to 'always' and can also be 'auto' or 'never'.
π color, and the whole vibe π
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(1) command to set it. so pretty, so powerful.
π¦ Exit status π¦
0β if OK,1β if minor problems (e.g., cannot access subdirectory),2β if serious trouble (e.g., cannot access command-line argument).
bestie if you get a 2 something is genuinely wrong, go check your paths π
π AUTHOR π
Written by Richard M. Stallman and David MacKenzie. legends, fr fr.
π’ REPORTING BUGS π’
Report bugs to: bug-coreutils@gnu.org
GNU coreutils home page: <https://www.gnu.org/software/coreutils/>
General help using GNU software: <https://www.gnu.org/gethelp/>
Report any translation bugs to <https://translationproject.org/team/>
π«Ά SEE ALSO π«Ά
Full documentation <https://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'
Packaged by Ubuntu (9.10-1ubuntu2)
Copyright Β© 2026 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.
and that's the whole page, bestie β this is GNU coreutils 9.10, dated August 2026, LS(1), and she ate, no crumbs. go list some directories, you've got this πβ¨ππ¦πΈ
π¦ where this page comes from
- ubuntu stonking: gnu-coreutils 9.10-1ubuntu2 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms