DEV Community

João Vitor
João Vitor

Posted on

exa instead of ls

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'
Enter fullscreen mode Exit fullscreen mode

Try it out.

Top comments (5)

Collapse
 
ragnarsalvator profile image
Saiful Islam Sakib • Edited

exa is by far the best alternative of ls.
I'm using these alias(s)

alias ls="exa --icons --grid --classify --colour=auto --sort=type --group-directories-first --header --modified --created --git --binary --group"
alias la="ls -a"
alias ll="ls -al"
Enter fullscreen mode Exit fullscreen mode
Collapse
 
moopet profile image
Ben Sinclair • Edited

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.

Collapse
 
joaovitor profile image
João Vitor

@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.

Collapse
 
nazareth profile image
َ
alias ls="exa -1 --color=auto --icons"
alias -g ls="exa -1 --color=auto --icons"
Enter fullscreen mode Exit fullscreen mode
Collapse
 
abhimanyuaryan profile image
Abhi... • Edited

nice can't keep using exa because mistypes ex which enters in Ex mode. Using this instead alias ls='exa --grid --color=auto --icons'. I don't like long lists :)