1LS(1)                            User Commands                           LS(1)
2
3
4

NAME

6       ls - list directory contents
7

SYNOPSIS

9       ls [OPTION]... [FILE]...
10

DESCRIPTION

12       List  information  about  the FILEs (the current directory by default).
13       Sort entries alphabetically if none of -cftuvSUX nor --sort.
14
15       Mandatory arguments to long options are  mandatory  for  short  options
16       too.
17
18       -a, --all
19              do not ignore entries starting with .
20
21       -A, --almost-all
22              do not list implied . and ..
23
24       --author
25              with -l, print the author of each file
26
27       -b, --escape
28              print octal escapes for nongraphic characters
29
30       --block-size=SIZE
31              use SIZE-byte blocks.  See SIZE format below
32
33       -B, --ignore-backups
34              do not list implied entries ending with ~
35
36       -c     with -lt: sort by, and show, ctime (time of last modification of
37              file status information) with -l: show ctime and  sort  by  name
38              otherwise: sort by ctime
39
40       -C     list entries by columns
41
42       --color[=WHEN]
43              colorize  the  output.   WHEN  defaults  to  `always'  or can be
44              `never' or `auto'.  More info below
45
46       -d, --directory
47              list directory entries instead of contents, and do not  derefer‐
48              ence symbolic links
49
50       -D, --dired
51              generate output designed for Emacs' dired mode
52
53       -f     do not sort, enable -aU, disable -ls --color
54
55       -F, --classify
56              append indicator (one of */=>@|) to entries
57
58       --file-type
59              likewise, except do not append `*'
60
61       --format=WORD
62              across  -x, commas -m, horizontal -x, long -l, single-column -1,
63              verbose -l, vertical -C
64
65       --full-time
66              like -l --time-style=full-iso
67
68       -g     like -l, but do not list owner
69
70       --group-directories-first
71              group directories before files.
72
73              augment with a --sort option, but any use  of  --sort=none  (-U)
74              disables grouping
75
76       -G, --no-group
77              in a long listing, don't print group names
78
79       -h, --human-readable
80              with -l, print sizes in human readable format (e.g., 1K 234M 2G)
81
82       --si   likewise, but use powers of 1000 not 1024
83
84       -H, --dereference-command-line
85              follow symbolic links listed on the command line
86
87       --dereference-command-line-symlink-to-dir
88              follow  each  command line symbolic link that points to a direc‐
89              tory
90
91       --hide=PATTERN
92              do not list implied entries matching shell  PATTERN  (overridden
93              by -a or -A)
94
95       --indicator-style=WORD
96              append indicator with style WORD to entry names: none (default),
97              slash (-p), file-type (--file-type), classify (-F)
98
99       -i, --inode
100              print the index number of each file
101
102       -I, --ignore=PATTERN
103              do not list implied entries matching shell PATTERN
104
105       -k     like --block-size=1K
106
107       -l     use a long listing format
108
109       -L, --dereference
110              when showing file information for a symbolic link, show informa‐
111              tion  for  the file the link references rather than for the link
112              itself
113
114       -m     fill width with a comma separated list of entries
115
116       -n, --numeric-uid-gid
117              like -l, but list numeric user and group IDs
118
119       -N, --literal
120              print raw entry names (don't treat e.g. control characters  spe‐
121              cially)
122
123       -o     like -l, but do not list group information
124
125       -p, --indicator-style=slash
126              append / indicator to directories
127
128       -q, --hide-control-chars
129              print ? instead of non graphic characters
130
131       --show-control-chars
132              show  non  graphic  characters  as-is (default unless program is
133              `ls' and output is a terminal)
134
135       -Q, --quote-name
136              enclose entry names in double quotes
137
138       --quoting-style=WORD
139              use quoting style WORD for entry names: literal, locale,  shell,
140              shell-always, c, escape
141
142       -r, --reverse
143              reverse order while sorting
144
145       -R, --recursive
146              list subdirectories recursively
147
148       -s, --size
149              print the allocated size of each file, in blocks
150
151       -S     sort by file size
152
153       --sort=WORD
154              sort  by  WORD  instead of name: none -U, extension -X, size -S,
155              time -t, version -v
156
157       --time=WORD
158              with -l, show time as WORD instead of modification  time:  atime
159              -u,  access  -u,  use  -u, ctime -c, or status -c; use specified
160              time as sort key if --sort=time
161
162       --time-style=STYLE
163              with -l, show times using style STYLE: full-iso, long-iso,  iso,
164              locale,  +FORMAT.   FORMAT is interpreted like `date'; if FORMAT
165              is FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent  files
166              and FORMAT2 to recent files; if STYLE is prefixed with `posix-',
167              STYLE takes effect only outside the POSIX locale
168
169       -t     sort by modification time
170
171       -T, --tabsize=COLS
172              assume tab stops at each COLS instead of 8
173
174       -u     with -lt: sort by, and show, access time with  -l:  show  access
175              time and sort by name otherwise: sort by access time
176
177       -U     do not sort; list entries in directory order
178
179       -v     natural sort of (version) numbers within text
180
181       -w, --width=COLS
182              assume screen width instead of current value
183
184       -x     list entries by lines instead of by columns
185
186       -X     sort alphabetically by entry extension
187
188       -1     list one file per line
189
190       SELinux options:
191
192       --lcontext
193              Display  security  context.    Enable -l. Lines will probably be
194              too wide for most displays.
195
196       -Z, --context
197              Display security context so it fits on most displays.   Displays
198              only mode, user, group, security context and file name.
199
200       --scontext
201              Display only security context and file name.
202
203       --help display this help and exit
204
205       --version
206              output version information and exit
207
208       SIZE  may  be (or may be an integer optionally followed by) one of fol‐
209       lowing: KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T,
210       P, E, Z, Y.
211
212       Using  color  to distinguish file types is disabled both by default and
213       with --color=never.  With --color=auto, ls emits color codes only  when
214       standard  output is connected to a terminal.  The LS_COLORS environment
215       variable can change the settings.  Use the dircolors command to set it.
216
217   Exit status:
218       0      if OK,
219
220       1      if minor problems (e.g., cannot access subdirectory),
221
222       2      if serious trouble (e.g., cannot access command-line argument).
223

AUTHOR

225       Written by Richard M. Stallman and David MacKenzie.
226

REPORTING BUGS

228       Report ls bugs to bug-coreutils@gnu.org
229       GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
230       General help using GNU software: <http://www.gnu.org/gethelp/>
231       Report ls translation bugs to <http://translationproject.org/team/>
232
234       Copyright © 2010 Free Software Foundation, Inc.   License  GPLv3+:  GNU
235       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
236       This  is  free  software:  you  are free to change and redistribute it.
237       There is NO WARRANTY, to the extent permitted by law.
238

SEE ALSO

240       The full documentation for ls is maintained as a  Texinfo  manual.   If
241       the  info and ls programs are properly installed at your site, the com‐
242       mand
243
244              info coreutils 'ls invocation'
245
246       should give you access to the complete manual.
247
248
249
250GNU coreutils 8.4                  June 2018                             LS(1)
Impressum