1exa(1) exa(1)
2
3
4
6 exa - a modern replacement for ls
7
9 exa [options] [files]...
10
12 exa is a modern replacement for ls. It uses colours for information by
13 default, helping you distinguish between many types of files, such as
14 whether you are the owner, or in the owning group. It also has extra
15 features not present in the original ls, such as viewing the Git status
16 for a directory, or recursing into directories with a tree view.
17
19 -1, --oneline
20 display one entry per line
21
22 -G, --grid
23 display entries as a grid (default)
24
25 -l, --long
26 display extended file metadata as a table
27
28 -x, --across
29 sort the grid across, rather than downwards
30
31 -R, --recurse
32 recurse into directories
33
34 -T, --tree
35 recurse into directories as a tree
36
37 --color, --colour=WHEN
38 when to use terminal colours (always, automatic, never)
39
40 --color-scale, --colour-scale
41 highlight levels of file sizes distinctly
42
44 -a, --all
45 show hidden and 'dot' files. Use this twice to also show the .
46 and .. directories.
47
48 -d, --list-dirs
49 list directories like regular files
50
51 -r, --reverse
52 reverse the sort order
53
54 -s, --sort=SORT_FIELD
55 which field to sort by. Valid fields are name, Name, extension,
56 Extension, size, modified, accessed, created, inode, type, and
57 none. The modified field has the aliases date, time, and new‐
58 est, and its reverse order has the aliases age and oldest.
59 Fields starting with a capital letter will sort uppercase before
60 lowercase: 'A' then 'B' then 'a' then 'b'. Fields starting with
61 a lowercase letter will mix them: 'A' then 'a' then 'B' then
62 'b'.
63
64 -I, --ignore-glob=GLOBS
65 Glob patterns, pipe-separated, of files to ignore
66
67 --git-ignore
68 ignore files mentioned in '.gitignore'
69
70 --group-directories-first
71 list directories before other files
72
74 These options are available when running with --long (-l):
75
76 -b, --binary
77 list file sizes with binary prefixes
78
79 -B, --bytes
80 list file sizes in bytes, without any prefixes
81
82 -g, --group
83 list each file's group
84
85 -h, --header
86 add a header row to each column
87
88 -H, --links
89 list each file's number of hard links
90
91 -i, --inode
92 list each file's inode number
93
94 -L, --level=DEPTH
95 limit the depth of recursion
96
97 -m, --modified
98 use the modified timestamp field
99
100 -S, --blocks
101 list each file's number of file system blocks
102
103 -t, --time=WORD
104 which timestamp field to list (modified, accessed, created)
105
106 --time-style=STYLE
107 how to format timestamps (default, iso, long-iso, full-iso)
108
109 -u, --accessed
110 use the accessed timestamp field
111
112 -U, --created
113 use the created timestamp field
114
115 -@, --extended
116 list each file's extended attributes and sizes
117
118 --git list each file's Git status, if tracked
119
121 To display a list of files, with the largest at the top:
122
123 exa --reverse --sort=size
124
125 To display a tree of files, three levels deep:
126
127 exa --long --tree --level=3
128
130 exa responds to the following environment variables:
131
132 COLUMNS
133 Overrides the width of the terminal, in characters. For example, COL‐
134 UMNS=80 exa will show a grid view with a maximum width of 80 charac‐
135 ters.
136
137 This option won't do anything when exa's output doesn't wrap, such as
138 when using the --long view.
139
140 EXA_STRICT
141 Enables strict mode, which will make exa error when two command-line
142 options are incompatible. Usually, options can override each other
143 going right-to-left on the command line, so that exa can be given
144 aliases: creating an alias exa=exa --sort=ext then running
145 exa --sort=size with that alias will run exa --sort=ext --sort=size,
146 and the sorting specified by the user will override the sorting speci‐
147 fied by the alias. In strict mode, the two options will not co-oper‐
148 ate, and exa will error.
149
150 This option is intended for use with automated scripts and other situa‐
151 tions where you want to be certain you're typing in the right command.
152
153 EXA_GRID_ROWS
154 Limits the grid-details view (exa --grid --long) so it's only activated
155 when at least the given number of rows of output would be generated.
156 With widescreen displays, it's possible for the grid to look very wide
157 and sparse, on just one or two lines with none of the columns lining
158 up. By specifying a minimum number of rows, you can only use the view
159 if it's going to be worth using.
160
161 LS_COLORS and EXA_COLORS
162 The EXA_COLORS variable is the traditional way of customising the
163 colours used by ls.
164
165 You can use the dircolors program to generate a script that sets the
166 variable from an input file, or if you don't mind editing long strings
167 of text, you can just type it out directly. These variables have the
168 following structure:
169
170 · A list of key-value pairs separated by =, such as *.txt=32.
171
172 · Multiple ANSI formatting codes are separated by ;, such as
173 *.txt=32;1;4.
174
175 · Finally, multiple pairs are separated by :, such as
176 *.txt=32:*.mp3=1;35.
177
178 The key half of the pair can either be a two-letter code or a file
179 glob, and anything that's not a valid code will be treated as a glob,
180 including keys that happen to be two letters long.
181
182 LS_COLORS can use these ten codes:
183
184 · di, directories
185
186 · ex, executable files
187
188 · fi, regular files
189
190 · pi, named pipes
191
192 · so, sockets
193
194 · bd, block devices
195
196 · cd, character devices
197
198 · ln, symlinks
199
200 · or, symlinks with no target
201
202 · mi, a missing symlink target
203
204 EXA_COLORS can use many more:
205
206 · ur, the user-read permission bit
207
208 · uw, the user-write permission bit
209
210 · ux, the user-execute permission bit for regular files
211
212 · ue, the user-execute for other file kinds
213
214 · gr, the group-read permission bit
215
216 · gw, the group-write permission bit
217
218 · gx, the group-execute permission bit
219
220 · tr, the others-read permission bit
221
222 · tw, the others-write permission bit
223
224 · tx, the others-execute permission bit
225
226 · su, setuid, setgid, and sticky permission bits for files
227
228 · sf, setuid, setgid, and sticky for other file kinds
229
230 · xa, the extended attribute indicator
231
232 · sn, the numbers of a file's size
233
234 · sb, the units of a file's size
235
236 · df, a device's major ID
237
238 · ds, a device's minor ID
239
240 · uu, a user that's you
241
242 · un, a user that's someone else
243
244 · gu, a group that you belong to
245
246 · gn, a group you aren't a member of
247
248 · lc, a number of hard links
249
250 · lm, a number of hard links for a regular file with at least two
251
252 · ga, a new file in Git
253
254 · gm, a modified file in Git
255
256 · gd, a deleted file in Git
257
258 · gv, a renamed file in Git
259
260 · gt, a file with modified metadata in Git
261
262 · xx, "punctuation", including many background UI elements
263
264 · da, a file's date
265
266 · in, a file's inode number
267
268 · bl, a file's number of blocks
269
270 · hd, the header row of a table
271
272 · lp, the path of a symlink
273
274 · cc, an escaped character in a filename
275
276 Values in EXA_COLORS override those given in LS_COLORS, so you don't
277 need to re-write an existing LS_COLORS variable with proprietary exten‐
278 sions.
279
280 Unlike some versions of ls, the given ANSI values must be valid colour
281 codes: exa won't just print out whichever characters are given. The
282 codes accepted by exa are:
283
284 · 1, for bold
285
286 · 4, for underline
287
288 · 31, for red text
289
290 · 32, for green text
291
292 · 33, for yellow text
293
294 · 34, for blue text
295
296 · 35, for purple text
297
298 · 36, for cyan text
299
300 · 37, for white text
301
302 · 38;5;nnn, for a colour from 0 to 255 (replace the nnn part)
303
304 Many terminals will treat bolded text as a different colour, or at
305 least provide the option to.
306
307 exa provides its own built-in set of file extension mappings that cover
308 a large range of common file extensions, including documents, archives,
309 media, and temporary files. Any mappings in the environment variables
310 will override this default set: running exa with LS_COLORS="*.zip=32"
311 will turn zip files green but leave the colours of other compressed
312 files alone.
313
314 You can also disable this built-in set entirely by including a reset
315 entry at the beginning of EXA_COLORS. So setting EXA_COL‐
316 ORS="reset:*.txt=31" will highlight only text files; setting EXA_COL‐
317 ORS="reset" will highlight nothing.
318
319 Examples
320 · Disable the "current user" highlighting: EXA_COLORS="uu=0:gu=0"
321
322 · Turn the date column green: EXA_COLORS="da=32"
323
324 · Highlight Vagrantfiles: EXA_COLORS="Vagrantfile=1;4;33"
325
326 · Override the existing zip colour: EXA_COLORS="*.zip=38;5;125"
327
328 · Markdown files a shade of green, log files a shade of grey: EXA_COL‐
329 ORS="*.md=38;5;121:*.log=38;5;248"
330
331 BUILT-IN EXTENSIONS
332 · "Immediate" files are the files you should look at when downloading
333 and building a project for the first time: READMEs, Makefiles,
334 Cargo.toml, and others. They're highlighted in yellow and under‐
335 lined.
336
337 · Images (png, jpeg, gif) are purple.
338
339 · Videos (mp4, ogv, m2ts) are a slightly purpler purple.
340
341 · Music (mp3, m4a, ogg) is a deeper purple.
342
343 · Lossless music (flac, alac, wav) is deeper than that purple. In gen‐
344 eral, most media files are some shade of purple.
345
346 · Cryptographic files (asc, enc, p12) are a faint blue.
347
348 · Documents (pdf, doc, dvi) are a less faint blue.
349
350 · Compressed files (zip, tgz, Z) are red.
351
352 · Temporary files (tmp, swp, ~) are grey.
353
354 · Compiled files (class, o, pyc) are faint orange. A file is also
355 counted as compiled if it uses a common extension and is in the same
356 directory as one of its source files: 'styles.css' will count as com‐
357 piled when next to 'styles.less' or 'styles.sass', and 'scripts.js'
358 when next to 'scripts.ts' or 'scripts.coffee'.
359
361 exa is maintained by Benjamin 'ogham' Sago and many other contributors.
362 You can view the full list at <https://github.com/ogham/exa/graphs/con‐
363 tributors>.
364
365
366
367exa 0.7.0 2017-07-07 exa(1)