{"name":"ls","section":"1","description":"list directory contents","sections":[{"id":"Examples_(TL;DR)","title":"Examples (TL;DR)","url":"https:\/\/www.mankier.com\/1\/ls#Examples_(TL;DR)"},{"id":"Synopsis","title":"Synopsis","url":"https:\/\/www.mankier.com\/1\/ls#Synopsis"},{"id":"Description","title":"Description","sections":[{"id":"Description-Exit_status","title":"Exit status","url":"https:\/\/www.mankier.com\/1\/ls#Description-Exit_status"}],"url":"https:\/\/www.mankier.com\/1\/ls#Description"},{"id":"Author","title":"Author","url":"https:\/\/www.mankier.com\/1\/ls#Author"},{"id":"Reporting_Bugs","title":"Reporting Bugs","url":"https:\/\/www.mankier.com\/1\/ls#Reporting_Bugs"},{"id":"Copyright","title":"Copyright","url":"https:\/\/www.mankier.com\/1\/ls#Copyright"},{"id":"See_Also","title":"See Also","url":"https:\/\/www.mankier.com\/1\/ls#See_Also"},{"id":"Referenced_By","title":"Referenced By","url":"https:\/\/www.mankier.com\/1\/ls#Referenced_By"}],"url":"https:\/\/www.mankier.com\/1\/ls","anchors":[{"anchor":"<strong>-1<\/strong>","description":"<p>list one file per line<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-1"},{"anchor":"<strong>-a<\/strong>, <strong>--all<\/strong>","description":"<p>do not ignore entries starting with .<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-a"},{"anchor":"<strong>-A<\/strong>, <strong>--almost-all<\/strong>","description":"<p>do not list implied . and ..<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-A"},{"anchor":"<strong>--author<\/strong>","description":"<p>with <strong>-l<\/strong>, print the author of each file<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--author"},{"anchor":"<strong>--block-size<\/strong>=<em>SIZE<\/em>","description":"<p>with <strong>-l<\/strong>, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--block-size"},{"anchor":"<strong>-b<\/strong>, <strong>--escape<\/strong>","description":"<p>print C-style escapes for nongraphic characters<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-b"},{"anchor":"<strong>-B<\/strong>, <strong>--ignore-backups<\/strong>","description":"<p>do not list implied entries ending with ~<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-B"},{"anchor":"<strong>--color<\/strong>[=<em>WHEN<\/em>]","description":"<p>color the output WHEN; more info below<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--color"},{"anchor":"<strong>-c<\/strong>","description":"<p>with <strong>-lt<\/strong>: sort by, and show, ctime (time of last change of file status information); with <strong>-l<\/strong>: show ctime and sort by name; otherwise: sort by ctime, newest first<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-c"},{"anchor":"<strong>-C<\/strong>","description":"<p>list entries by columns<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-C"},{"anchor":"<strong>--dereference-command-line-symlink-to-dir<\/strong>","description":"<p>follow each command line symbolic link that points to a directory<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--dereference-command-line-symlink-to-dir"},{"anchor":"<strong>-d<\/strong>, <strong>--directory<\/strong>","description":"<p>list directories themselves, not their contents<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-d"},{"anchor":"<strong>-D<\/strong>, <strong>--dired<\/strong>","description":"<p>generate output designed for Emacs' dired mode<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-D"},{"anchor":"<strong>--file-type<\/strong>","description":"<p>likewise, except do not append '*'<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--file-type"},{"anchor":"<strong>--format<\/strong>=<em>WORD<\/em>","description":"<p>across,horizontal (<strong>-x<\/strong>), commas (<strong>-m<\/strong>), long (<strong>-l<\/strong>), single-column (<strong>-1<\/strong>), verbose (<strong>-l<\/strong>), vertical (<strong>-C<\/strong>)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--format"},{"anchor":"<strong>-f<\/strong>","description":"<p>same as <strong>-a<\/strong> <strong>-U<\/strong><\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-f"},{"anchor":"<strong>-F<\/strong>, <strong>--classify<\/strong>[=<em>WHEN<\/em>]","description":"<p>append indicator (one of *\/=&gt;@|) to entries WHEN<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-F"},{"anchor":"<strong>--full-time<\/strong>","description":"<p>like <strong>-l<\/strong> <strong>--time-style<\/strong>=<em>full-iso<\/em><\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--full-time"},{"anchor":"<strong>--group-directories-first<\/strong>","description":"<p>group directories before files<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--group-directories-first"},{"anchor":"<strong>-g<\/strong>","description":"<p>like <strong>-l<\/strong>, but do not list owner<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-g"},{"anchor":"<strong>-G<\/strong>, <strong>--no-group<\/strong>","description":"<p>in a long listing, don't print group names<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-G"},{"anchor":"<strong>--help<\/strong>","description":"<p>display this help and exit<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--help"},{"anchor":"<strong>--hide<\/strong>=<em>PATTERN<\/em>","description":"<p>do not list implied entries matching shell PATTERN (overridden by <strong>-a<\/strong> or <strong>-A<\/strong>)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--hide"},{"anchor":"<strong>-H<\/strong>, <strong>--dereference-command-line<\/strong>","description":"<p>follow symbolic links listed on the command line<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-H"},{"anchor":"<strong>-h<\/strong>, <strong>--human-readable<\/strong>","description":"<p>with <strong>-l<\/strong> and <strong>-s<\/strong>, print sizes like 1K 234M 2G etc.<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-h"},{"anchor":"<strong>--hyperlink<\/strong>[=<em>WHEN<\/em>]","description":"<p>hyperlink file names WHEN<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--hyperlink"},{"anchor":"<strong>--indicator-style<\/strong>=<em>WORD<\/em>","description":"<p>append indicator with style WORD to entry names: none (default), slash (<strong>-p<\/strong>), file-type (<strong>--file-type<\/strong>), classify (<strong>-F<\/strong>)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--indicator-style"},{"anchor":"<strong>-I<\/strong>, <strong>--ignore<\/strong>=<em>PATTERN<\/em>","description":"<p>do not list implied entries matching shell PATTERN<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-I"},{"anchor":"<strong>-i<\/strong>, <strong>--inode<\/strong>","description":"<p>print the index number of each file<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-i"},{"anchor":"<strong>-k<\/strong>, <strong>--kibibytes<\/strong>","description":"<p>default to 1024-byte blocks for file system usage; used only with <strong>-s<\/strong> and per directory totals<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-k"},{"anchor":"<strong>-l<\/strong>","description":"<p>use a long listing format<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-l"},{"anchor":"<strong>-L<\/strong>, <strong>--dereference<\/strong>","description":"<p>when showing file information for a symbolic link, show information for the file the link references rather than for the link itself<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-L"},{"anchor":"<strong>-m<\/strong>","description":"<p>fill width with a comma separated list of entries<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-m"},{"anchor":"<strong>-N<\/strong>, <strong>--literal<\/strong>","description":"<p>print entry names without quoting<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-N"},{"anchor":"<strong>-n<\/strong>, <strong>--numeric-uid-gid<\/strong>","description":"<p>like <strong>-l<\/strong>, but list numeric user and group IDs<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-n"},{"anchor":"<strong>-o<\/strong>","description":"<p>like <strong>-l<\/strong>, but do not list group information<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-o"},{"anchor":"<strong>-p<\/strong>, <strong>--indicator-style<\/strong>=<em>slash<\/em>","description":"<p>append \/ indicator to directories<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-p"},{"anchor":"<strong>-q<\/strong>, <strong>--hide-control-chars<\/strong>","description":"<p>print ? instead of nongraphic characters<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-q"},{"anchor":"<strong>-Q<\/strong>, <strong>--quote-name<\/strong>","description":"<p>enclose entry names in double quotes<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-Q"},{"anchor":"<strong>--quoting-style<\/strong>=<em>WORD<\/em>","description":"<p>use quoting style WORD for entry names: literal, locale, shell, shell-always, shell-escape, shell-escape-always, c, escape (overrides QUOTING_STYLE environment variable)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--quoting-style"},{"anchor":"<strong>-R<\/strong>, <strong>--recursive<\/strong>","description":"<p>list subdirectories recursively<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-R"},{"anchor":"<strong>-r<\/strong>, <strong>--reverse<\/strong>","description":"<p>reverse order while sorting<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-r"},{"anchor":"<strong>--show-control-chars<\/strong>","description":"<p>show nongraphic characters as-is (the default, unless program is 'ls' and output is a terminal)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--show-control-chars"},{"anchor":"<strong>--si<\/strong>","description":"<p>likewise, but use powers of 1000 not 1024<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--si"},{"anchor":"<strong>--sort<\/strong>=<em>WORD<\/em>","description":"<p>change default 'name' sort to WORD: none (<strong>-U<\/strong>), size (<strong>-S<\/strong>), time (<strong>-t<\/strong>), version (<strong>-v<\/strong>), extension (<strong>-X<\/strong>), name, width<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--sort"},{"anchor":"<strong>-S<\/strong>","description":"<p>sort by file size, largest first<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-S"},{"anchor":"<strong>-s<\/strong>, <strong>--size<\/strong>","description":"<p>print the allocated size of each file, in blocks<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-s"},{"anchor":"<strong>--time<\/strong>=<em>WORD<\/em>","description":"<p>select which timestamp used to display or sort; access time (<strong>-u<\/strong>): atime, access, use; metadata change time (<strong>-c<\/strong>): ctime, status; modified time (default): mtime, modification; birth time: birth, creation;<\/p><p>with <strong>-l<\/strong>, WORD determines which time to show; with <strong>--sort<\/strong>=<em>time<\/em>, sort by WORD (newest first)<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--time"},{"anchor":"<strong>--time-style<\/strong>=<em>TIME_STYLE<\/em>","description":"<p>time\/date format with <strong>-l<\/strong>; see TIME_STYLE below<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--time-style"},{"anchor":"<strong>-t<\/strong>","description":"<p>sort by time, newest first; see <strong>--time<\/strong><\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-t"},{"anchor":"<strong>-T<\/strong>, <strong>--tabsize<\/strong>=<em>COLS<\/em>","description":"<p>assume tab stops at each COLS instead of 8<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-T"},{"anchor":"<strong>-u<\/strong>","description":"<p>with <strong>-lt<\/strong>: sort by, and show, access time; with <strong>-l<\/strong>: show access time and sort by name; otherwise: sort by access time, newest first<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-u"},{"anchor":"<strong>-U<\/strong>","description":"<p>do not sort directory entries<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-U"},{"anchor":"<strong>--version<\/strong>","description":"<p>output version information and exit<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--version"},{"anchor":"<strong>-v<\/strong>","description":"<p>natural sort of (version) numbers within text<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-v"},{"anchor":"<strong>-w<\/strong>, <strong>--width<\/strong>=<em>COLS<\/em>","description":"<p>set output width to COLS. &nbsp;0 means no limit<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-w"},{"anchor":"<strong>-x<\/strong>","description":"<p>list entries by lines instead of by columns<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-x"},{"anchor":"<strong>-X<\/strong>","description":"<p>sort alphabetically by entry extension<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-X"},{"anchor":"<strong>--zero<\/strong>","description":"<p>end each output line with NUL, not newline<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#--zero"},{"anchor":"<strong>-Z<\/strong>, <strong>--context<\/strong>","description":"<p>print any security context of each file<\/p>","url":"https:\/\/www.mankier.com\/1\/ls#-Z"}]}