DIR(1)
okay bestie pull up a chair because we're about to talk about dir, and honestly? it's giving "ls's chill twin" π this page lives in the General Commands Manual, so let's goooo.
πΈ NAME πΈ
dir β list directory contents. By default it ignores files and directories that start with a . (yes, the sneaky hidden ones β we'll get to them).
π¦ SYNOPSIS π¦
dir [OPTION]... [FILE]...
β¨ DESCRIPTION β¨
List directory contents. Ignore files and directories starting with a . by default.
That's literally the whole vibe: it shows you what's in a directory, and it lowkey pretends your dotfiles don't exist until you ask.
π OPTIONS π
so many options. iconic honestly. here we go:
--helpβ prints help information, i.e. the "bestie explain" button.--formatβ sets 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 of8.-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:
alwaysautonever
-1β list one file per line.-oβ long format without group information. Identical to--format=longwith--no-group.-gβ long format without owner information.-n,--numeric-uid-gidβ-lwith numeric UIDs and GIDs.--quoting-styleβ set quoting style.
Possible values:
literallocaleshellshell-escapeshell-alwaysshell-escape-alwaysclocalecescape
-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=timeor-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=timeor-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-aor-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) orwidth.
Possible values:
namenonetimesizeversionextensionwidth
-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--colorunless 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-diris specified.-h,--human-readableβ print human readable file sizes (e.g.1K234M56G).-k,--kibibytesβ default to 1024-byte blocks for file system usage; used only with-sand per directory totals.--siβ print human readable file sizes using powers of1000instead of1024.--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 output based on file type.
Possible values:
alwaysautonever
--indicator-styleβ append indicator with style WORD to entry names:none(default),slash(-p),file-type(--file-type),classify(-F).
Possible values:
noneslashfile-typeclassify
-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--classifyand 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-diroptions are specified.
Possible values:
alwaysautonever
--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.-Z,--contextβ print any security context of each file.--group-directories-firstβ group directories before files; can be augmented with a--sortoption, but any use of--sort=none(-U) disables grouping.-V,--versionβ print version.
π EXTRA π
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. β¨
π VERSION π
v(uutils coreutils) 0.12.0
π EXAMPLES π
View documentation for the original command:
tldr ls
The examples are provided by the tldr-pages project <https://tldr.sh> under the CC BY 4.0 License. Please note that, as uutils is a work in progress, some examples might fail. π (manifesting they don't tho.)
and that's the whole page, bestie π«Ά this one's DIR(1) from the General Commands Manual, running version v(uutils coreutils) 0.12.0, dated 2026-09-25. go forth and list some directories, you absolute main character ππ
π¦ where this page comes from
- ubuntu stonking: rust-coreutils 0.12.0-1ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms