DIR(1)
π DIR(1) β the manual page bestie π
okay so real talk, this is DIR(1) from the User Commands section of your friendly neighbourhood manual, and it's basically ls's slightly more polite cousin. same energy, different doorway. π¦
β¨ NAME β¨
dir β list directory contents
πΈ SYNOPSIS πΈ
dir [OPTION]... [FILE]...
π DESCRIPTION π
List information about the *FILE*s (the current directory by default). it's giving "show me what's in here" but make it β¨aestheticβ¨.
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. like, if you don't tell it how to sort, it just does the alphabet thing on its own. queen behaviour. π
π«Ά heads up bestie: mandatory arguments to long options are mandatory for short options too. so if an option needs a value, it needs it no matter which form you use. no takebacks.
π OPTIONS π
one bullet per option, all 60 of them, because we do not skip. periodt. π
-a,--allβ do not ignore entries starting with.(yep, the hidden ones. come out come out wherever you are π)-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 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 like1K234M2Getc.--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-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(overridesQUOTING_STYLEenvironment 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β 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 of8-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, explained π
the SIZE argument is an integer and 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). Binary prefixes can be used, too: KiB=K, MiB=M, and so on. bestie it's just "how big, in what unit" and honestly the vibes are immaculate. β¨
π 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. 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'.
π₯ colors, okay, story time π₯
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. iykyk. π
π«Ά 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).
π 2 is the "uh oh something is deeply wrong" one. respect it.
π AUTHOR π
Written by Richard M. Stallman and David MacKenzie.
π 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 π
dircolors(1)- Full documentation
https://www.gnu.org/software/coreutils/dir - or available locally via:
info '(coreutils) dir 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 thing bestie π this page was brought to you by GNU coreutils 9.10, dated August 2026, and yes it's DIR(1) β go list some directories, you absolute icon. slay. πβ¨π¦π
π¦ 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