README.md 3.0 KB
Newer Older
B
Ben S 已提交
1
# exa [![Build status](https://travis-ci.org/ogham/exa.svg)](https://travis-ci.org/ogham/exa)
B
Ben S 已提交
2

B
Ben S 已提交
3
[exa](http://bsago.me/exa) is a replacement for `ls` written in Rust.
B
Ben S 已提交
4

F
Florian Gilcher 已提交
5
Works on all recent Rust versions >= 1.4.0.
B
Ben S 已提交
6

B
Ben S 已提交
7

B
Ben S 已提交
8
## Screenshots
B
Ben S 已提交
9

B
Ben S 已提交
10
![Screenshots of exa](screenshots.png)
B
Ben S 已提交
11

B
Ben S 已提交
12 13

## Options
B
Ben S 已提交
14

B
Ben S 已提交
15 16 17 18 19 20 21 22 23 24 25
exa’s options are similar, but not exactly the same, as `ls`.

### Display Options

- **-1**, **--oneline**: display one entry per line
- **-G**, **--grid**: display entries in a grid view (default)
- **-l**, **--long**: display extended details and attributes
- **-R**, **--recurse**: recurse into directories
- **-T**, **--tree**: recurse into subdirectories in a tree view
- **-x**, **--across**: sort multi-column view entries across
- **--color**, **--colour**: when to colourise the output
B
Ben S 已提交
26 27 28

### Filtering Options

B
Ben S 已提交
29
- **-a**, **--all**: show dot files
B
Ben S 已提交
30 31 32 33
- **-d**, **--list-dirs**: list directories as regular files
- **-L**, **--level=(depth)**: maximum depth of recursion
- **-r**, **--reverse**: reverse sort order
- **-s**, **--sort=(field)**: field to sort by
B
Ben S 已提交
34
- **--group-directories-first**: list directories before other files
B
Ben S 已提交
35

B
Ben S 已提交
36
### Long View Options
B
Ben S 已提交
37

B
Ben S 已提交
38
These options are available when running with --long (`-l`):
B
Ben S 已提交
39

B
Ben S 已提交
40
- **-b**, **--binary**: use binary (power of two) file sizes
B
Ben S 已提交
41
- **-B**, **--bytes**: list file sizes in bytes, without prefixes
B
Ben S 已提交
42 43
- **-g**, **--group**: show group as well as user
- **-h**, **--header**: show a header row
B
Ben S 已提交
44
- **-H**, **--links**: show number of hard links column
B
Ben S 已提交
45
- **-i**, **--inode**: show inode number column
B
Ben S 已提交
46
- **-m**, **--modified**: display timestamp of most recent modification
B
Ben S 已提交
47
- **-S**, **--blocks**: show number of file system blocks
B
Ben S 已提交
48 49 50 51
- **-t**, **--time=(field)**: which timestamp to show for a file
- **-u**, **--accessed**: display timestamp of last access for a file
- **-U**, **--created**: display timestamp of creation of a file
- **-@**, **--extended**: display extended attribute keys and sizes
B
Ben S 已提交
52 53 54 55 56
- **--git**: show Git status for a file

Accepted **--color** options are **always**, **automatic**, and **never**.
Valid sort fields are **name**, **size**, **extension**, **modified**, **accessed**, **created**, **inode**, and **none**.
Valid time fields are **modified**, **accessed**, and **created**.
B
Ben S 已提交
57

B
Ben S 已提交
58 59

## Installation
B
Ben S 已提交
60

B
Ben S 已提交
61 62
exa is written in [Rust](http://www.rust-lang.org).
Once you have it set up, a simple `make install` will compile exa and install it into `/usr/local/bin`.
B
Ben S 已提交
63

B
Ben S 已提交
64 65
exa depends on [libgit2](https://github.com/alexcrichton/git2-rs) for certain features.
If you’re unable to compile libgit2, you can opt out of Git support by running `cargo build --release --no-default-features`.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

### Cargo Install

If you're using a recent version of Cargo (0.5.0 or higher), you can
use the `cargo install` command:

    cargo install --git https://github.com/ogham/exa

or:

    cargo install --no-default-features --git https://github.com/ogham/exa

Cargo will clone the repository to a temporary directory, build it
there and place the `exa` binary to: `$HOME/.cargo` (and can be
overridden by setting the `--root` option).