github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/utils/man/test_ls.txt (about) 1 LS(1) User Commands LS(1) 2 3 NAME 4 ls - list directory contents 5 6 SYNOPSIS 7 ls [OPTION]... [FILE]... 8 9 DESCRIPTION 10 List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified. 11 12 Mandatory arguments to long options are mandatory for short options too. 13 14 -a, --all 15 do not ignore entries starting with . 16 17 -A, --almost-all 18 do not list implied . and .. 19 20 --author 21 with -l, print the author of each file 22 23 -b, --escape 24 print C-style escapes for nongraphic characters 25 26 --block-size=SIZE 27 with -l, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below 28 29 -B, --ignore-backups 30 do not list implied entries ending with ˜ 31 32 -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 33 34 -C list entries by columns 35 36 --color[=WHEN] 37 color the output WHEN; more info below 38 39 -d, --directory 40 list directories themselves, not their contents 41 42 -D, --dired 43 generate output designed for Emacs' dired mode 44 45 -f list all entries in directory order 46 47 -F, --classify[=WHEN] 48 append indicator (one of */=>@|) to entries WHEN 49 50 --file-type 51 likewise, except do not append '*' 52 53 --format=WORD 54 across -x, commas -m, horizontal -x, long -l, single-column -1, verbose -l, vertical -C 55 56 --full-time 57 like -l --time-style=full-iso 58 59 -g like -l, but do not list owner 60 61 --group-directories-first 62 group directories before files; can be augmented with a --sort option, but any use of --sort=none (-U) disables grouping 63 64 -G, --no-group 65 in a long listing, don't print group names 66 67 -h, --human-readable 68 with -l and -s, print sizes like 1K 234M 2G etc. 69 70 --si likewise, but use powers of 1000 not 1024 71 72 -H, --dereference-command-line 73 follow symbolic links listed on the command line 74 75 --dereference-command-line-symlink-to-dir 76 follow each command line symbolic link that points to a directory 77 78 --hide=PATTERN 79 do not list implied entries matching shell PATTERN (overridden by -a or -A) 80 81 --hyperlink[=WHEN] 82 hyperlink file names WHEN 83 84 --indicator-style=WORD 85 append indicator with style WORD to entry names: none (default), slash (-p), file-type (--file-type), classify (-F) 86 87 -i, --inode 88 print the index number of each file 89 90 -I, --ignore=PATTERN 91 do not list implied entries matching shell PATTERN 92 93 -k, --kibibytes 94 default to 1024-byte blocks for file system usage; used only with -s and per directory totals 95 96 -l use a long listing format 97 98 -L, --dereference 99 when showing file information for a symbolic link, show information for the file the link references rather than for the link itself 100 101 -m fill width with a comma separated list of entries 102 103 -n, --numeric-uid-gid 104 like -l, but list numeric user and group IDs 105 106 -N, --literal 107 print entry names without quoting 108 109 -o like -l, but do not list group information 110 111 -p, --indicator-style=slash 112 append / indicator to directories 113 114 -q, --hide-control-chars 115 print ? instead of nongraphic characters 116 117 --show-control-chars 118 show nongraphic characters as-is (the default, unless program is 'ls' and output is a terminal) 119 120 -Q, --quote-name 121 enclose entry names in double quotes 122 123 --quoting-style=WORD 124 use quoting style WORD for entry names: literal, locale, shell, shell-always, shell-escape, shell-escape-always, c, escape (overrides QUOTING_STYLE environment variable) 125 126 -r, --reverse 127 reverse order while sorting 128 129 -R, --recursive 130 list subdirectories recursively 131 132 -s, --size 133 print the allocated size of each file, in blocks 134 135 -S sort by file size, largest first 136 137 --sort=WORD 138 sort by WORD instead of name: none (-U), size (-S), time (-t), version (-v), extension (-X), width 139 140 --time=WORD 141 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; 142 143 with -l, WORD determines which time to show; with --sort=time, sort by WORD (newest first) 144 145 --time-style=TIME_STYLE 146 time/date format with -l; see TIME_STYLE below 147 148 -t sort by time, newest first; see --time 149 150 -T, --tabsize=COLS 151 assume tab stops at each COLS instead of 8 152 153 -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 154 155 -U do not sort; list entries in directory order 156 157 -v natural sort of (version) numbers within text 158 159 -w, --width=COLS 160 set output width to COLS. 0 means no limit 161 162 -x list entries by lines instead of by columns 163 164 -X sort alphabetically by entry extension 165 166 -Z, --context 167 print any security context of each file 168 169 --zero end each output line with NUL, not newline 170 171 -1 list one file per line 172 173 --help display this help and exit 174 175 --version 176 output version information and exit 177 178 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. 179 180 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. 181 TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale. Also the TIME_STYLE environment variable sets the default style to use. 182 183 The WHEN argument defaults to 'always' and can also be 'auto' or 'never'. 184 185 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 186 change the settings. Use the dircolors(1) command to set it. 187 188 Exit status: 189 0 if OK, 190 191 1 if minor problems (e.g., cannot access subdirectory), 192 193 2 if serious trouble (e.g., cannot access command-line argument). 194 195 AUTHOR 196 Written by Richard M. Stallman and David MacKenzie. 197 198 REPORTING BUGS 199 GNU coreutils online help: <https://www.gnu.org/software/coreutils/> 200 Report any translation bugs to <https://translationproject.org/team/> 201 202 COPYRIGHT 203 Copyright © 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. 204 This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. 205 206 SEE ALSO 207 dircolors(1) 208 209 Full documentation <https://www.gnu.org/software/coreutils/ls> 210 or available locally via: info '(coreutils) ls invocation' 211 212 GNU coreutils 9.3 April 2023 LS(1)