| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446 |
- .hy
- .TH "exa" "1" "2017\-07\-07" "exa 0.7.0" ""
- .SH NAME
- .PP
- exa \- a modern replacement for ls
- .SH SYNOPSIS
- .PP
- exa [\f[I]options\f[]] [\f[I]files\f[]]...
- .SH DESCRIPTION
- .PP
- \f[C]exa\f[] is a modern replacement for \f[C]ls\f[].
- It uses colours for information by default, helping you distinguish
- between many types of files, such as whether you are the owner, or in
- the owning group.
- It also has extra features not present in the original \f[C]ls\f[], such
- as viewing the Git status for a directory, or recursing into directories
- with a tree view.
- .SH DISPLAY OPTIONS
- .TP
- .B \-1, \-\-oneline
- display one entry per line
- .RS
- .RE
- .TP
- .B \-G, \-\-grid
- display entries as a grid (default)
- .RS
- .RE
- .TP
- .B \-l, \-\-long
- display extended file metadata as a table
- .RS
- .RE
- .TP
- .B \-x, \-\-across
- sort the grid across, rather than downwards
- .RS
- .RE
- .TP
- .B \-R, \-\-recurse
- recurse into directories
- .RS
- .RE
- .TP
- .B \-T, \-\-tree
- recurse into directories as a tree
- .RS
- .RE
- .TP
- .B \-F, \-\-classify
- display type indicator by file names
- .RS
- .RE
- .TP
- .B \-\-color, \-\-colour=\f[I]WHEN\f[]
- when to use terminal colours (always, automatic, never)
- .RS
- .RE
- .TP
- .B \-\-color-scale, \-\-colour-scale
- highlight levels of file sizes distinctly
- .RS
- .RE
- .SH FILTERING AND SORTING OPTIONS
- .TP
- .B \-a, \-\-all
- show hidden and \[aq]dot\[aq] files.
- Use this twice to also show the \f[C].\f[] and \f[C]..\f[] directories.
- .RS
- .RE
- .TP
- .B \-d, \-\-list\-dirs
- list directories like regular files
- .RS
- .RE
- .TP
- .B \-r, \-\-reverse
- reverse the sort order
- .RS
- .RE
- .TP
- .B \-s, \-\-sort=\f[I]SORT_FIELD\f[]
- which field to sort by.
- Valid fields are name, Name, extension, Extension, size, modified, accessed, created, inode, type, and none.
- The modified field has the aliases date, time, and newest, and its reverse order has the aliases age and oldest.
- Fields starting with a capital letter will sort uppercase before lowercase: 'A' then 'B' then 'a' then 'b'.
- Fields starting with a lowercase letter will mix them: 'A' then 'a' then 'B' then 'b'.
- .RS
- .RE
- .TP
- .B \-I, \-\-ignore\-glob=\f[I]GLOBS\f[]
- Glob patterns, pipe-separated, of files to ignore
- .RS
- .RE
- .TP
- .B \-\-git\-ignore
- ignore files mentioned in '.gitignore'
- .RS
- .RE
- .TP
- .B \-\-group\-directories\-first
- list directories before other files
- .RS
- .RE
- .SH LONG VIEW OPTIONS
- .PP
- These options are available when running with \f[C]\-\-long\f[]
- (\f[C]\-l\f[]):
- .TP
- .B \-b, \-\-binary
- list file sizes with binary prefixes
- .RS
- .RE
- .TP
- .B \-B, \-\-bytes
- list file sizes in bytes, without any prefixes
- .RS
- .RE
- .TP
- .B \-g, \-\-group
- list each file\[aq]s group
- .RS
- .RE
- .TP
- .B \-h, \-\-header
- add a header row to each column
- .RS
- .RE
- .TP
- .B \-H, \-\-links
- list each file\[aq]s number of hard links
- .RS
- .RE
- .TP
- .B \-i, \-\-inode
- list each file\[aq]s inode number
- .RS
- .RE
- .TP
- .B \-L, \-\-level=\f[I]DEPTH\f[]
- limit the depth of recursion
- .RS
- .RE
- .TP
- .B \-m, \-\-modified
- use the modified timestamp field
- .RS
- .RE
- .TP
- .B \-S, \-\-blocks
- list each file\[aq]s number of file system blocks
- .RS
- .RE
- .TP
- .B \-t, \-\-time=\f[I]WORD\f[]
- which timestamp field to list (modified, accessed, created)
- .RS
- .RE
- .TP
- .B \-\-time\-style=\f[I]STYLE\f[]
- how to format timestamps (default, iso, long-iso, full-iso)
- .RS
- .RE
- .TP
- .B \-u, \-\-accessed
- use the accessed timestamp field
- .RS
- .RE
- .TP
- .B \-U, \-\-created
- use the created timestamp field
- .RS
- .RE
- .TP
- .B \-\@, \-\-extended
- list each file\[aq]s extended attributes and sizes
- .RS
- .RE
- .TP
- .B \-\-git
- list each file\[aq]s Git status, if tracked
- .RS
- .RE
- .SH EXAMPLES
- .PP
- To display a list of files, with the largest at the top:
- .IP
- .nf
- \f[C]
- exa\ \-\-reverse\ \-\-sort=size
- \f[]
- .fi
- .PP
- To display a tree of files, three levels deep:
- .IP
- .nf
- \f[C]
- exa\ \-\-long\ \-\-tree\ \-\-level=3
- \f[]
- .fi
- .SH ENVIRONMENT VARIABLES
- .PP
- exa responds to the following environment variables:
- .SS \f[C]COLUMNS\f[]
- .PP
- Overrides the width of the terminal, in characters.
- For example, \f[C]COLUMNS=80\ exa\f[] will show a grid view with a
- maximum width of 80 characters.
- .PP
- This option won\[aq]t do anything when exa\[aq]s output doesn\[aq]t
- wrap, such as when using the \f[C]\-\-long\f[] view.
- .SS \f[C]EXA_STRICT\f[]
- .PP
- Enables \f[I]strict mode\f[], which will make exa error when two
- command\-line options are incompatible.
- Usually, options can override each other going right\-to\-left on the
- command line, so that exa can be given aliases: creating an alias
- \f[C]exa=exa\ \-\-sort=ext\f[] then running \f[C]exa\ \-\-sort=size\f[]
- with that alias will run \f[C]exa\ \-\-sort=ext\ \-\-sort=size\f[], and
- the sorting specified by the user will override the sorting specified by
- the alias.
- In strict mode, the two options will not co\-operate, and exa will
- error.
- .PP
- This option is intended for use with automated scripts and other
- situations where you want to be \f[I]certain\f[] you\[aq]re typing in
- the right command.
- .SS \f[C]EXA_GRID_ROWS\f[]
- .PP
- Limits the grid\-details view (\f[C]exa\ \-\-grid\ \-\-long\f[]) so
- it\[aq]s only activated when at least the given number of rows of output
- would be generated.
- With widescreen displays, it\[aq]s possible for the grid to look very
- wide and sparse, on just one or two lines with none of the columns
- lining up.
- By specifying a minimum number of rows, you can only use the view if
- it\[aq]s going to be worth using.
- .SS \f[C]LS_COLORS\f[] and \f[C]EXA_COLORS\f[]
- .PP
- The \f[C]EXA_COLORS\f[] variable is the traditional way of customising
- the colours used by \f[C]ls\f[].
- .PP
- You can use the \f[C]dircolors\f[] program to generate a script that
- sets the variable from an input file, or if you don\[aq]t mind editing
- long strings of text, you can just type it out directly.
- These variables have the following structure:
- .IP \[bu] 2
- A list of key\-value pairs separated by \f[C]=\f[], such as
- \f[C]*.txt=32\f[].
- .IP \[bu] 2
- Multiple ANSI formatting codes are separated by \f[C];\f[], such as
- \f[C]*.txt=32;1;4\f[].
- .IP \[bu] 2
- Finally, multiple pairs are separated by \f[C]:\f[], such as
- \f[C]*.txt=32:*.mp3=1;35\f[].
- .PP
- The key half of the pair can either be a two\-letter code or a file
- glob, and anything that\[aq]s not a valid code will be treated as a
- glob, including keys that happen to be two letters long.
- .PP
- \f[C]LS_COLORS\f[] can use these ten codes:
- .IP \[bu] 2
- \f[B]di\f[], directories
- .IP \[bu] 2
- \f[B]ex\f[], executable files
- .IP \[bu] 2
- \f[B]fi\f[], regular files
- .IP \[bu] 2
- \f[B]pi\f[], named pipes
- .IP \[bu] 2
- \f[B]so\f[], sockets
- .IP \[bu] 2
- \f[B]bd\f[], block devices
- .IP \[bu] 2
- \f[B]cd\f[], character devices
- .IP \[bu] 2
- \f[B]ln\f[], symlinks
- .IP \[bu] 2
- \f[B]or\f[], symlinks with no target
- .PP
- \f[C]EXA_COLORS\f[] can use many more:
- .IP \[bu] 2
- \f[B]ur\f[], the user\-read permission bit
- .IP \[bu] 2
- \f[B]uw\f[], the user\-write permission bit
- .IP \[bu] 2
- \f[B]ux\f[], the user\-execute permission bit for regular files
- .IP \[bu] 2
- \f[B]ue\f[], the user\-execute for other file kinds
- .IP \[bu] 2
- \f[B]gr\f[], the group\-read permission bit
- .IP \[bu] 2
- \f[B]gw\f[], the group\-write permission bit
- .IP \[bu] 2
- \f[B]gx\f[], the group\-execute permission bit
- .IP \[bu] 2
- \f[B]tr\f[], the others\-read permission bit
- .IP \[bu] 2
- \f[B]tw\f[], the others\-write permission bit
- .IP \[bu] 2
- \f[B]tx\f[], the others\-execute permission bit
- .IP \[bu] 2
- \f[B]su\f[], setuid, setgid, and sticky permission bits for files
- .IP \[bu] 2
- \f[B]sf\f[], setuid, setgid, and sticky for other file kinds
- .IP \[bu] 2
- \f[B]xa\f[], the extended attribute indicator
- .IP \[bu] 2
- \f[B]sn\f[], the numbers of a file\[aq]s size
- .IP \[bu] 2
- \f[B]sb\f[], the units of a file\[aq]s size
- .IP \[bu] 2
- \f[B]df\f[], a device\[aq]s major ID
- .IP \[bu] 2
- \f[B]ds\f[], a device\[aq]s minor ID
- .IP \[bu] 2
- \f[B]uu\f[], a user that\[aq]s you
- .IP \[bu] 2
- \f[B]un\f[], a user that\[aq]s someone else
- .IP \[bu] 2
- \f[B]gu\f[], a group that you belong to
- .IP \[bu] 2
- \f[B]gn\f[], a group you aren\[aq]t a member of
- .IP \[bu] 2
- \f[B]lc\f[], a number of hard links
- .IP \[bu] 2
- \f[B]lm\f[], a number of hard links for a regular file with at least two
- .IP \[bu] 2
- \f[B]ga\f[], a new flag in Git
- .IP \[bu] 2
- \f[B]gm\f[], a modified flag in Git
- .IP \[bu] 2
- \f[B]gd\f[], a deleted flag in Git
- .IP \[bu] 2
- \f[B]gv\f[], a renamed flag in Git
- .IP \[bu] 2
- \f[B]gt\f[], a modified metadata flag in Git
- .IP \[bu] 2
- \f[B]xx\f[], "punctuation", including many background UI elements
- .IP \[bu] 2
- \f[B]da\f[], a file\[aq]s date
- .IP \[bu] 2
- \f[B]in\f[], a file\[aq]s inode number
- .IP \[bu] 2
- \f[B]bl\f[], a file\[aq]s number of blocks
- .IP \[bu] 2
- \f[B]hd\f[], the header row of a table
- .IP \[bu] 2
- \f[B]lp\f[], the path of a symlink
- .IP \[bu] 2
- \f[B]cc\f[], an escaped character in a filename
- .IP \[bu] 2
- \f[B]bO\f[], the overlay style for broken symlink paths
- .PP
- Values in \f[C]EXA_COLORS\f[] override those given in
- \f[C]LS_COLORS\f[], so you don\[aq]t need to re\-write an existing
- \f[C]LS_COLORS\f[] variable with proprietary extensions.
- .PP
- Unlike some versions of \f[C]ls\f[], the given ANSI values must be valid
- colour codes: exa won\[aq]t just print out whichever characters are
- given.
- The codes accepted by exa are:
- .IP \[bu] 2
- \f[C]1\f[], for bold
- .IP \[bu] 2
- \f[C]4\f[], for underline
- .IP \[bu] 2
- \f[C]31\f[], for red text
- .IP \[bu] 2
- \f[C]32\f[], for green text
- .IP \[bu] 2
- \f[C]33\f[], for yellow text
- .IP \[bu] 2
- \f[C]34\f[], for blue text
- .IP \[bu] 2
- \f[C]35\f[], for purple text
- .IP \[bu] 2
- \f[C]36\f[], for cyan text
- .IP \[bu] 2
- \f[C]37\f[], for white text
- .IP \[bu] 2
- \f[C]38;5;\f[]\f[I]\f[C]nnn\f[]\f[], for a colour from 0 to 255 (replace
- the \f[I]nnn\f[] part)
- .PP
- Many terminals will treat bolded text as a different colour, or at least
- provide the option to.
- .PP
- exa provides its own built\-in set of file extension mappings that cover
- a large range of common file extensions, including documents, archives,
- media, and temporary files.
- Any mappings in the environment variables will override this default
- set: running exa with \f[C]LS_COLORS="*.zip=32"\f[] will turn zip files
- green but leave the colours of other compressed files alone.
- .PP
- You can also disable this built\-in set entirely by including a
- \f[C]reset\f[] entry at the beginning of \f[C]EXA_COLORS\f[].
- So setting \f[C]EXA_COLORS="reset:*.txt=31"\f[] will highlight only text
- files; setting \f[C]EXA_COLORS="reset"\f[] will highlight nothing.
- .SS Examples
- .IP \[bu] 2
- Disable the "current user" highlighting: \f[C]EXA_COLORS="uu=0:gu=0"\f[]
- .IP \[bu] 2
- Turn the date column green: \f[C]EXA_COLORS="da=32"\f[]
- .IP \[bu] 2
- Highlight Vagrantfiles: \f[C]EXA_COLORS="Vagrantfile=1;4;33"\f[]
- .IP \[bu] 2
- Override the existing zip colour: \f[C]EXA_COLORS="*.zip=38;5;125"\f[]
- .IP \[bu] 2
- Markdown files a shade of green, log files a shade of grey:
- \f[C]EXA_COLORS="*.md=38;5;121:*.log=38;5;248"\f[]
- .SS BUILT\-IN EXTENSIONS
- .IP \[bu] 2
- "Immediate" files are the files you should look at when downloading and
- building a project for the first time: READMEs, Makefiles, Cargo.toml,
- and others.
- They\[aq]re highlighted in yellow and underlined.
- .IP \[bu] 2
- Images (png, jpeg, gif) are purple.
- .IP \[bu] 2
- Videos (mp4, ogv, m2ts) are a slightly purpler purple.
- .IP \[bu] 2
- Music (mp3, m4a, ogg) is a deeper purple.
- .IP \[bu] 2
- Lossless music (flac, alac, wav) is deeper than \f[I]that\f[] purple.
- In general, most media files are some shade of purple.
- .IP \[bu] 2
- Cryptographic files (asc, enc, p12) are a faint blue.
- .IP \[bu] 2
- Documents (pdf, doc, dvi) are a less faint blue.
- .IP \[bu] 2
- Compressed files (zip, tgz, Z) are red.
- .IP \[bu] 2
- Temporary files (tmp, swp, ~) are grey.
- .IP \[bu] 2
- Compiled files (class, o, pyc) are faint orange.
- A file is also counted as compiled if it uses a common extension and is
- in the same directory as one of its source files: \[aq]styles.css\[aq]
- will count as compiled when next to \[aq]styles.less\[aq] or
- \[aq]styles.sass\[aq], and \[aq]scripts.js\[aq] when next to
- \[aq]scripts.ts\[aq] or \[aq]scripts.coffee\[aq].
- .SH AUTHOR
- .PP
- \f[C]exa\f[] is maintained by Benjamin \[aq]ogham\[aq] Sago and many
- other contributors.
- You can view the full list at
- <https://github.com/ogham/exa/graphs/contributors>.
|