loading...

exa instead of ls

github logo ・1 min read

linux-tools (4 Part Series)

1) bat instead of cat 2) exa instead of ls 3) rg instead of grep 4) fd instead of find

exa describe itself as the "A modern version of ‘ls’. https://the.exa.website/".

I'm using exa instead of ls locally.

Here are my aliases making this official.

alias l='exa'
alias la='exa -a'
alias ll='exa -lah'
alias ls='exa --color=auto'

Try it out.

twitter logo DISCUSS (2)
markdown guide
 

The thing that puts me off exa is the same as with things like oh-my-zsh:

You list files hundreds of times a day. Why spend your time squinting at black and white text?

exa is an improved file lister with more features and better defaults. It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git. And it’s small, fast, and just one single binary.

ls uses colours to distinguish file types. ls knows about symlinks. ls is small and fast and just one single file. On my system it's 10% the size of exa and over 300% faster, while using 20% as much CPU.

 proteus ~ ls -lh $(which ls)$(which exa)
-rwxr-xr-x 1 root root 135K Nov 12 11:00 /usr/bin/ls
-rwxr-xr-x 1 root root 1.4M Jul 20 05:31 /usr/bin/exa

ls -R projects  0.16s user 0.18s system 19% cpu 1.769 total
exa -R projects  4.06s user 0.21s system 99% cpu 4.278 total

I'm not saying it's bad, but I am saying that the reasons it might be good are not the ones people are pushing.

Personally, I prefer the way ls handles colours. It colourises only the file/directory name or the little symbol for "executable", etc. exa looks like a wall of colour, with everything vying for attention.

The only thing I see exa do over ls is the git integration and the highlighting of the current username.

Not only is the standard tree tool built-in, but it’ll show you your files’ information alongside the hierarchy.

This is an anti-feature as far as I'm concerned. We already have a separate tree command, and it already does one thing, well.

 

@moopet I like the default settings from exa. The colors provides more information and it I got used with its output really fast.

The exa output is different from the ls command but I like it better.

I can always use \ls when I need the raw ls behaviour.

Important detail: I just use exa locally. In servers I keep using the plain old ls and thats why the size of the command don't affect me so much.

Classic DEV Post from Apr 30 '19

Who's looking for open source contributors? (April 30th edition)

João Vitor profile image