exa.1 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. .hy
  2. .TH "exa" "1" "2019\-07\-15" "exa 0.9.0" ""
  3. .SH NAME
  4. .PP
  5. exa \- a modern replacement for ls
  6. .SH SYNOPSIS
  7. .PP
  8. exa [\f[I]options\f[]] [\f[I]files\f[]]...
  9. .SH DESCRIPTION
  10. .PP
  11. \f[C]exa\f[] is a modern replacement for \f[C]ls\f[].
  12. It uses colours for information by default, helping you distinguish
  13. between many types of files, such as whether you are the owner, or in
  14. the owning group.
  15. It also has extra features not present in the original \f[C]ls\f[], such
  16. as viewing the Git status for a directory, or recursing into directories
  17. with a tree view.
  18. .SH DISPLAY OPTIONS
  19. .TP
  20. .B \-1, \-\-oneline
  21. display one entry per line
  22. .RS
  23. .RE
  24. .TP
  25. .B \-G, \-\-grid
  26. display entries as a grid (default)
  27. .RS
  28. .RE
  29. .TP
  30. .B \-l, \-\-long
  31. display extended file metadata as a table
  32. .RS
  33. .RE
  34. .TP
  35. .B \-x, \-\-across
  36. sort the grid across, rather than downwards
  37. .RS
  38. .RE
  39. .TP
  40. .B \-R, \-\-recurse
  41. recurse into directories
  42. .RS
  43. .RE
  44. .TP
  45. .B \-T, \-\-tree
  46. recurse into directories as a tree
  47. .RS
  48. .RE
  49. .TP
  50. .B \-F, \-\-classify
  51. display type indicator by file names
  52. .RS
  53. .RE
  54. .TP
  55. .B \-\-color, \-\-colour=\f[I]WHEN\f[]
  56. when to use terminal colours (always, automatic, never)
  57. .RS
  58. .RE
  59. .TP
  60. .B \-\-color-scale, \-\-colour-scale
  61. highlight levels of file sizes distinctly
  62. .RS
  63. .RE
  64. .TP
  65. .B \-\-icons
  66. display icons
  67. .RS
  68. .RE
  69. .SH FILTERING AND SORTING OPTIONS
  70. .TP
  71. .B \-a, \-\-all
  72. show hidden and \[aq]dot\[aq] files.
  73. Use this twice to also show the \f[C].\f[] and \f[C]..\f[] directories.
  74. .RS
  75. .RE
  76. .TP
  77. .B \-d, \-\-list\-dirs
  78. list directories like regular files
  79. .RS
  80. .RE
  81. .TP
  82. .B \-L, \-\-level=\f[I]DEPTH\f[]
  83. limit the depth of recursion
  84. .RS
  85. .RE
  86. .TP
  87. .B \-r, \-\-reverse
  88. reverse the sort order
  89. .RS
  90. .RE
  91. .TP
  92. .B \-s, \-\-sort=\f[I]SORT_FIELD\f[]
  93. which field to sort by.
  94. Valid fields are name, Name, extension, Extension, size, modified, changed, accessed, created, inode, type, and none.
  95. The modified field has the aliases date, time, and newest, and its reverse order has the aliases age and oldest.
  96. Fields starting with a capital letter will sort uppercase before lowercase: 'A' then 'B' then 'a' then 'b'.
  97. Fields starting with a lowercase letter will mix them: 'A' then 'a' then 'B' then 'b'.
  98. .RS
  99. .RE
  100. .TP
  101. .B \-I, \-\-ignore\-glob=\f[I]GLOBS\f[]
  102. Glob patterns, pipe-separated, of files to ignore
  103. .RS
  104. .RE
  105. .TP
  106. .B \-\-git\-ignore
  107. ignore files mentioned in '.gitignore'
  108. .RS
  109. .RE
  110. .TP
  111. .B \-\-group\-directories\-first
  112. list directories before other files
  113. .RS
  114. .RE
  115. .TP
  116. .B \-D, \-\-only\-dirs
  117. list only directories
  118. .RS
  119. .RE
  120. .SH LONG VIEW OPTIONS
  121. .PP
  122. These options are available when running with \f[C]\-\-long\f[]
  123. (\f[C]\-l\f[]):
  124. .TP
  125. .B \-b, \-\-binary
  126. list file sizes with binary prefixes
  127. .RS
  128. .RE
  129. .TP
  130. .B \-B, \-\-bytes
  131. list file sizes in bytes, without any prefixes
  132. .RS
  133. .RE
  134. .TP
  135. .B \-\-changed
  136. use the changed timestamp field
  137. .RS
  138. .RE
  139. .TP
  140. .B \-g, \-\-group
  141. list each file\[aq]s group
  142. .RS
  143. .RE
  144. .TP
  145. .B \-h, \-\-header
  146. add a header row to each column
  147. .RS
  148. .RE
  149. .TP
  150. .B \-H, \-\-links
  151. list each file\[aq]s number of hard links
  152. .RS
  153. .RE
  154. .TP
  155. .B \-i, \-\-inode
  156. list each file\[aq]s inode number
  157. .RS
  158. .RE
  159. .TP
  160. .B \-m, \-\-modified
  161. use the modified timestamp field
  162. .RS
  163. .RE
  164. .TP
  165. .B \-S, \-\-blocks
  166. list each file\[aq]s number of file system blocks
  167. .RS
  168. .RE
  169. .TP
  170. .B \-t, \-\-time=\f[I]WORD\f[]
  171. which timestamp field to list (modified, changed, accessed, created)
  172. .RS
  173. .RE
  174. .TP
  175. .B \-\-time\-style=\f[I]STYLE\f[]
  176. how to format timestamps (default, iso, long-iso, full-iso)
  177. .RS
  178. .RE
  179. .TP
  180. .B \-u, \-\-accessed
  181. use the accessed timestamp field
  182. .RS
  183. .RE
  184. .TP
  185. .B \-U, \-\-created
  186. use the created timestamp field
  187. .RS
  188. .RE
  189. .TP
  190. .B \-\-no\-permissions
  191. suppress the permissions field
  192. .RS
  193. .RE
  194. .TP
  195. .B \-\-no\-filesize
  196. suppress the filesize field
  197. .RS
  198. .RE
  199. .TP
  200. .B \-\-no\-user
  201. suppress the user field
  202. .RS
  203. .RE
  204. .TP
  205. .B \-\-no\-time
  206. suppress the time field
  207. .RS
  208. .RE
  209. .TP
  210. .B \-\@, \-\-extended
  211. list each file\[aq]s extended attributes and sizes
  212. .RS
  213. .RE
  214. .TP
  215. .B \-\-git
  216. list each file\[aq]s Git status, if tracked
  217. .RS
  218. .RE
  219. .SH EXAMPLES
  220. .PP
  221. To display a list of files, with the largest at the top:
  222. .IP
  223. .nf
  224. \f[C]
  225. exa\ \-\-reverse\ \-\-sort=size
  226. \f[]
  227. .fi
  228. .PP
  229. To display a tree of files, three levels deep:
  230. .IP
  231. .nf
  232. \f[C]
  233. exa\ \-\-long\ \-\-tree\ \-\-level=3
  234. \f[]
  235. .fi
  236. .SH ENVIRONMENT VARIABLES
  237. .PP
  238. exa responds to the following environment variables:
  239. .SS \f[C]COLUMNS\f[]
  240. .PP
  241. Overrides the width of the terminal, in characters.
  242. For example, \f[C]COLUMNS=80\ exa\f[] will show a grid view with a
  243. maximum width of 80 characters.
  244. .PP
  245. This option won\[aq]t do anything when exa\[aq]s output doesn\[aq]t
  246. wrap, such as when using the \f[C]\-\-long\f[] view.
  247. .SS \f[C]EXA_STRICT\f[]
  248. .PP
  249. Enables \f[I]strict mode\f[], which will make exa error when two
  250. command\-line options are incompatible.
  251. Usually, options can override each other going right\-to\-left on the
  252. command line, so that exa can be given aliases: creating an alias
  253. \f[C]exa=exa\ \-\-sort=ext\f[] then running \f[C]exa\ \-\-sort=size\f[]
  254. with that alias will run \f[C]exa\ \-\-sort=ext\ \-\-sort=size\f[], and
  255. the sorting specified by the user will override the sorting specified by
  256. the alias.
  257. In strict mode, the two options will not co\-operate, and exa will
  258. error.
  259. .PP
  260. This option is intended for use with automated scripts and other
  261. situations where you want to be \f[I]certain\f[] you\[aq]re typing in
  262. the right command.
  263. .SS \f[C]EXA_GRID_ROWS\f[]
  264. .PP
  265. Limits the grid\-details view (\f[C]exa\ \-\-grid\ \-\-long\f[]) so
  266. it\[aq]s only activated when at least the given number of rows of output
  267. would be generated.
  268. With widescreen displays, it\[aq]s possible for the grid to look very
  269. wide and sparse, on just one or two lines with none of the columns
  270. lining up.
  271. By specifying a minimum number of rows, you can only use the view if
  272. it\[aq]s going to be worth using.
  273. .SS \f[C]LS_COLORS\f[] and \f[C]EXA_COLORS\f[]
  274. .PP
  275. The \f[C]EXA_COLORS\f[] variable is the traditional way of customising
  276. the colours used by \f[C]ls\f[].
  277. .PP
  278. You can use the \f[C]dircolors\f[] program to generate a script that
  279. sets the variable from an input file, or if you don\[aq]t mind editing
  280. long strings of text, you can just type it out directly.
  281. These variables have the following structure:
  282. .IP \[bu] 2
  283. A list of key\-value pairs separated by \f[C]=\f[], such as
  284. \f[C]*.txt=32\f[].
  285. .IP \[bu] 2
  286. Multiple ANSI formatting codes are separated by \f[C];\f[], such as
  287. \f[C]*.txt=32;1;4\f[].
  288. .IP \[bu] 2
  289. Finally, multiple pairs are separated by \f[C]:\f[], such as
  290. \f[C]*.txt=32:*.mp3=1;35\f[].
  291. .PP
  292. The key half of the pair can either be a two\-letter code or a file
  293. glob, and anything that\[aq]s not a valid code will be treated as a
  294. glob, including keys that happen to be two letters long.
  295. .PP
  296. \f[C]LS_COLORS\f[] can use these ten codes:
  297. .IP \[bu] 2
  298. \f[B]di\f[], directories
  299. .IP \[bu] 2
  300. \f[B]ex\f[], executable files
  301. .IP \[bu] 2
  302. \f[B]fi\f[], regular files
  303. .IP \[bu] 2
  304. \f[B]pi\f[], named pipes
  305. .IP \[bu] 2
  306. \f[B]so\f[], sockets
  307. .IP \[bu] 2
  308. \f[B]bd\f[], block devices
  309. .IP \[bu] 2
  310. \f[B]cd\f[], character devices
  311. .IP \[bu] 2
  312. \f[B]ln\f[], symlinks
  313. .IP \[bu] 2
  314. \f[B]or\f[], symlinks with no target
  315. .PP
  316. \f[C]EXA_COLORS\f[] can use many more:
  317. .IP \[bu] 2
  318. \f[B]ur\f[], the user\-read permission bit
  319. .IP \[bu] 2
  320. \f[B]uw\f[], the user\-write permission bit
  321. .IP \[bu] 2
  322. \f[B]ux\f[], the user\-execute permission bit for regular files
  323. .IP \[bu] 2
  324. \f[B]ue\f[], the user\-execute for other file kinds
  325. .IP \[bu] 2
  326. \f[B]gr\f[], the group\-read permission bit
  327. .IP \[bu] 2
  328. \f[B]gw\f[], the group\-write permission bit
  329. .IP \[bu] 2
  330. \f[B]gx\f[], the group\-execute permission bit
  331. .IP \[bu] 2
  332. \f[B]tr\f[], the others\-read permission bit
  333. .IP \[bu] 2
  334. \f[B]tw\f[], the others\-write permission bit
  335. .IP \[bu] 2
  336. \f[B]tx\f[], the others\-execute permission bit
  337. .IP \[bu] 2
  338. \f[B]su\f[], setuid, setgid, and sticky permission bits for files
  339. .IP \[bu] 2
  340. \f[B]sf\f[], setuid, setgid, and sticky for other file kinds
  341. .IP \[bu] 2
  342. \f[B]xa\f[], the extended attribute indicator
  343. .IP \[bu] 2
  344. \f[B]sn\f[], the numbers of a file\[aq]s size (sets nb, nk, nm, ng and nh)
  345. .IP \[bu] 2
  346. \f[B]nb\f[], the numbers of a file\[aq]s size if it is lower than 1 KB/Kib
  347. .IP \[bu] 2
  348. \f[B]nk\f[], the numbers of a file\[aq]s size if it is between 1 KB/KiB and 1 MB/MiB
  349. .IP \[bu] 2
  350. \f[B]nm\f[], the numbers of a file\[aq]s size if it is between 1 MB/MiB and 1 GB/GiB
  351. .IP \[bu] 2
  352. \f[B]ng\f[], the numbers of a file\[aq]s size if it is between 1 GB/GiB and 1 TB/TiB
  353. .IP \[bu] 2
  354. \f[B]nt\f[], the numbers of a file\[aq]s size if it is 1 TB/TiB or higher
  355. .IP \[bu] 2
  356. \f[B]sb\f[], the units of a file\[aq]s size (sets ub, uk, um, ug and uh)
  357. .IP \[bu] 2
  358. \f[B]ub\f[], the units of a file\[aq]s size if it is lower than 1 KB/Kib
  359. .IP \[bu] 2
  360. \f[B]uk\f[], the units of a file\[aq]s size if it is between 1 KB/KiB and 1 MB/MiB
  361. .IP \[bu] 2
  362. \f[B]um\f[], the units of a file\[aq]s size if it is between 1 MB/MiB and 1 GB/GiB
  363. .IP \[bu] 2
  364. \f[B]ug\f[], the units of a file\[aq]s size if it is between 1 GB/GiB and 1 TB/TiB
  365. .IP \[bu] 2
  366. \f[B]ut\f[], the units of a file\[aq]s size if it is 1 TB/TiB or higher
  367. .IP \[bu] 2
  368. \f[B]df\f[], a device\[aq]s major ID
  369. .IP \[bu] 2
  370. \f[B]ds\f[], a device\[aq]s minor ID
  371. .IP \[bu] 2
  372. \f[B]uu\f[], a user that\[aq]s you
  373. .IP \[bu] 2
  374. \f[B]un\f[], a user that\[aq]s someone else
  375. .IP \[bu] 2
  376. \f[B]gu\f[], a group that you belong to
  377. .IP \[bu] 2
  378. \f[B]gn\f[], a group you aren\[aq]t a member of
  379. .IP \[bu] 2
  380. \f[B]lc\f[], a number of hard links
  381. .IP \[bu] 2
  382. \f[B]lm\f[], a number of hard links for a regular file with at least two
  383. .IP \[bu] 2
  384. \f[B]ga\f[], a new flag in Git
  385. .IP \[bu] 2
  386. \f[B]gm\f[], a modified flag in Git
  387. .IP \[bu] 2
  388. \f[B]gd\f[], a deleted flag in Git
  389. .IP \[bu] 2
  390. \f[B]gv\f[], a renamed flag in Git
  391. .IP \[bu] 2
  392. \f[B]gt\f[], a modified metadata flag in Git
  393. .IP \[bu] 2
  394. \f[B]xx\f[], "punctuation", including many background UI elements
  395. .IP \[bu] 2
  396. \f[B]da\f[], a file\[aq]s date
  397. .IP \[bu] 2
  398. \f[B]in\f[], a file\[aq]s inode number
  399. .IP \[bu] 2
  400. \f[B]bl\f[], a file\[aq]s number of blocks
  401. .IP \[bu] 2
  402. \f[B]hd\f[], the header row of a table
  403. .IP \[bu] 2
  404. \f[B]lp\f[], the path of a symlink
  405. .IP \[bu] 2
  406. \f[B]cc\f[], an escaped character in a filename
  407. .IP \[bu] 2
  408. \f[B]bO\f[], the overlay style for broken symlink paths
  409. .PP
  410. Values in \f[C]EXA_COLORS\f[] override those given in
  411. \f[C]LS_COLORS\f[], so you don\[aq]t need to re\-write an existing
  412. \f[C]LS_COLORS\f[] variable with proprietary extensions.
  413. .PP
  414. Unlike some versions of \f[C]ls\f[], the given ANSI values must be valid
  415. colour codes: exa won\[aq]t just print out whichever characters are
  416. given.
  417. The codes accepted by exa are:
  418. .IP \[bu] 2
  419. \f[C]1\f[], for bold
  420. .IP \[bu] 2
  421. \f[C]4\f[], for underline
  422. .IP \[bu] 2
  423. \f[C]31\f[], for red text
  424. .IP \[bu] 2
  425. \f[C]32\f[], for green text
  426. .IP \[bu] 2
  427. \f[C]33\f[], for yellow text
  428. .IP \[bu] 2
  429. \f[C]34\f[], for blue text
  430. .IP \[bu] 2
  431. \f[C]35\f[], for purple text
  432. .IP \[bu] 2
  433. \f[C]36\f[], for cyan text
  434. .IP \[bu] 2
  435. \f[C]37\f[], for white text
  436. .IP \[bu] 2
  437. \f[C]38;5;\f[]\f[I]\f[C]nnn\f[]\f[], for a colour from 0 to 255 (replace
  438. the \f[I]nnn\f[] part)
  439. .PP
  440. Many terminals will treat bolded text as a different colour, or at least
  441. provide the option to.
  442. .PP
  443. exa provides its own built\-in set of file extension mappings that cover
  444. a large range of common file extensions, including documents, archives,
  445. media, and temporary files.
  446. Any mappings in the environment variables will override this default
  447. set: running exa with \f[C]LS_COLORS="*.zip=32"\f[] will turn zip files
  448. green but leave the colours of other compressed files alone.
  449. .PP
  450. You can also disable this built\-in set entirely by including a
  451. \f[C]reset\f[] entry at the beginning of \f[C]EXA_COLORS\f[].
  452. So setting \f[C]EXA_COLORS="reset:*.txt=31"\f[] will highlight only text
  453. files; setting \f[C]EXA_COLORS="reset"\f[] will highlight nothing.
  454. .SS Examples
  455. .IP \[bu] 2
  456. Disable the "current user" highlighting: \f[C]EXA_COLORS="uu=0:gu=0"\f[]
  457. .IP \[bu] 2
  458. Turn the date column green: \f[C]EXA_COLORS="da=32"\f[]
  459. .IP \[bu] 2
  460. Highlight Vagrantfiles: \f[C]EXA_COLORS="Vagrantfile=1;4;33"\f[]
  461. .IP \[bu] 2
  462. Override the existing zip colour: \f[C]EXA_COLORS="*.zip=38;5;125"\f[]
  463. .IP \[bu] 2
  464. Markdown files a shade of green, log files a shade of grey:
  465. \f[C]EXA_COLORS="*.md=38;5;121:*.log=38;5;248"\f[]
  466. .SS BUILT\-IN EXTENSIONS
  467. .IP \[bu] 2
  468. "Immediate" files are the files you should look at when downloading and
  469. building a project for the first time: READMEs, Makefiles, Cargo.toml,
  470. and others.
  471. They\[aq]re highlighted in yellow and underlined.
  472. .IP \[bu] 2
  473. Images (png, jpeg, gif) are purple.
  474. .IP \[bu] 2
  475. Videos (mp4, ogv, m2ts) are a slightly purpler purple.
  476. .IP \[bu] 2
  477. Music (mp3, m4a, ogg) is a deeper purple.
  478. .IP \[bu] 2
  479. Lossless music (flac, alac, wav) is deeper than \f[I]that\f[] purple.
  480. In general, most media files are some shade of purple.
  481. .IP \[bu] 2
  482. Cryptographic files (asc, enc, p12) are a faint blue.
  483. .IP \[bu] 2
  484. Documents (pdf, doc, dvi) are a less faint blue.
  485. .IP \[bu] 2
  486. Compressed files (zip, tgz, Z) are red.
  487. .IP \[bu] 2
  488. Temporary files (tmp, swp, ~) are grey.
  489. .IP \[bu] 2
  490. Compiled files (class, o, pyc) are faint orange.
  491. A file is also counted as compiled if it uses a common extension and is
  492. in the same directory as one of its source files: \[aq]styles.css\[aq]
  493. will count as compiled when next to \[aq]styles.less\[aq] or
  494. \[aq]styles.sass\[aq], and \[aq]scripts.js\[aq] when next to
  495. \[aq]scripts.ts\[aq] or \[aq]scripts.coffee\[aq].
  496. .SH AUTHOR
  497. .PP
  498. \f[C]exa\f[] is maintained by Benjamin \[aq]ogham\[aq] Sago and many
  499. other contributors.
  500. You can view the full list at
  501. <https://github.com/ogham/exa/graphs/contributors>.