LS(1)
πΈ LS(1) β the manual page for ls, bestie πΈ
okay so real talk: this is the General Commands Manual page for LS(1), and it's literally just about listing what's in your directories. sit down, grab a boba, we're doing this. π§π
π¦ NAME π¦
ls β list directory contents. by default it's gonna ignore files and directories that start with a . (yes, the sneaky hidden ones, we'll get to them).
π SYNOPSIS π
ls [OPTION]... [FILE]...
π DESCRIPTION π
List directory contents. and again, for the people in the back: it ignores files and directories starting with a . by default. no cap. β¨
π OPTIONS π
so many options, and honestly? iconic. every single one, coming right up:
--helpβ prints help information. your lil emergency button. π--formatβ sets the display format.-Cβ display the files in columns.-l,--longβ display detailed information. the full lore drop.-xβ list entries in rows instead of in columns.-T,--tabsize <COLS>β assume tab stops at eachCOLSinstead of 8.-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 namesWHEN. default:never.- possible values:
alwaysautonever
- possible values:
-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
- possible values:
-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 shellPATTERN(overridden by-aor-A).-I,--ignore <PATTERN>β do not list implied entries matching shellPATTERN.-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
- possible values:
-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. 1K 234M 56G).-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 of 1000 instead of 1024.--block-size <BLOCK_SIZE>β scale sizes byBLOCK_SIZEwhen 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 isCOLScolumns wide.-s,--sizeβ print the allocated size of each file, in blocks.--colorβ color output based on file type.- possible values:
alwaysautonever
- possible values:
--indicator-styleβ append indicator with style WORD to entry names:none(default),slash(-p),file-type(--file-type),classify(-F).- possible values:
noneslashfile-typeclassify
- possible values:
-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.whenmay 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 nowhenis 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
periodt. π
π EXAMPLES π
list files one per line:
ls -1
list all files, including hidden files:
ls [-a|--all]
list files with a trailing symbol to indicate file type (directory /, symbolic_link @, executable *, ...):
ls [-F|--classify]
list all files in [l]ong format (permissions, ownership, size, and modification date):
ls [-la|-l --all]
list files in [l]ong format with size displayed using human-readable units (KiB, MiB, GiB):
ls [-lh|-l --human-readable]
list files in [l]ong format, sorted by [S]ize (descending) recursively:
ls [-lSR|-lS --recursive]
list files in [l]ong format, sorted by [t]ime the file was modified and in reverse order (oldest first):
ls [-ltr|-lt --reverse]
only list directories:
ls [-d|--directory] */
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. π (we're rooting for them tho π«Ά)
ok that's the whole page!! every flag, every value, every default, all accounted for β nothing skipped, bestie, you're so welcome π
and yes, this absolute banger of a page is dated 2026-09-25 and it's page LS(1) from the General Commands Manual, version v(uutils coreutils) 0.12.0. go forth and list responsibly. mwah. ππβ¨
π¦ 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