ls vs eza | which is more efficient and performant ?
ls
is a command in the famous coreutils. It can be found on all POSIX-compliant operating system shells. The ls
command is meant to list directory contents. Its codebase is written in C and it’s very old.
eza
is a modern commandline application which aims to replace ls
. It is written in Rust programming language. The creator of eza claims that it is small and fast in the official code repository on Github
.
Let’s test if it is faster on macOS and Ubuntu Linux.
Installing eza on macOS ๐
I installed eza on my macbook pro via homebrew with this command.
brew install eza
eza vs ls on macOS ๐
timing ls & eza in fish shell ๐
$ time ls
Executed in 6.25 millis fish external
usr time 1.62 millis 0.50 millis 1.12 millis
sys time 4.62 millis 2.23 millis 2.39 millis
ls took 6.25 ms to execute. Let’s see eza!
$ time eza
Executed in 15.19 millis fish external
usr time 6.09 millis 0.09 millis 6.00 millis
sys time 5.79 millis 1.68 millis 4.11 millis
Oops. eza took 15.19 ms to execute. ls is more than 2X faster than eza.
Let’s test the each one of them with the long output/info.
$ time eza -l
________________________________________________________
Executed in 14.61 millis fish external
usr time 6.58 millis 0.11 millis 6.48 millis
sys time 8.04 millis 1.81 millis 6.23 millis
$ time ls -l
Executed in 8.46 millis fish external
usr time 2.12 millis 0.48 millis 1.65 millis
sys time 4.82 millis 2.03 millis 2.79 millis
ls is still 1.7X faster than eza in the long output/info.
timing ls & eza in zsh shell ๐
$ time ls
ls 0.00s user 0.00s system 78% cpu 0.003 total
$ time eza
eza 0.01s user 0.00s system 75% cpu 0.014 total
ls is more than 4X faster than eza in ZSH shell.
Installing eza on Ubuntu Linux 24.04 LTS ๐
I installed eza on my Linux HP laptop via APT with this command.
sudo apt install -y eza
eza vs ls on Ubuntu Linux ๐
timing ls & eza in Fish shell ๐
$ time eza
________________________________________________________
Executed in 5.88 millis fish external
usr time 2.19 millis 0.00 micros 2.19 millis
sys time 3.77 millis 485.00 micros 3.29 millis
$ time ls
________________________________________________________
Executed in 2.20 millis fish external
usr time 0.34 millis 342.00 micros 0.00 millis
sys time 1.93 millis 233.00 micros 1.70 millis
On Linux, ls is more than 2X faster than eza with default config.
Let’s time the long output.
$ time ls -l
________________________________________________________
Executed in 3.63 millis fish external
usr time 1.82 millis 864.00 micros 0.96 millis
sys time 1.92 millis 0.00 micros 1.92 millis
$ time eza -l
________________________________________________________
Executed in 11.46 millis fish external
usr time 4.18 millis 411.00 micros 3.77 millis
sys time 7.53 millis 0.00 micros 7.53 millis
ls is 3X faster than eza.
timing eza vs ls in Bash shell ๐
Bash shell is the default shell on Ubuntu 24.04 LTS.
$ time eza
real 0m0.006s
user 0m0.002s
sys 0m0.004s
$ time ls
real 0m0.003s
user 0m0.000s
sys 0m0.002s
Actually, ls is 3X faster than eza on Ubuntu Linux when using Bash shell.
other programs ๐
There are too many commandline programs that aim to replace ls and tree. Here are some of them.
- eza: the program we where talking about all that post.
- lsd : It is named LSDeluxe, written in Rust, has ~13K stars on Github.
- colorls : A Ruby gem that beautifies the terminal’s ls command, with color and font-awesome icons.
- ls-go
: A more colorful, user-friendly implementation of
ls
written in Go. - g: powerful and cross-platform ls ๐ built for modern terminal. ls-g is written in Go .
- natls
:
ls
alternative with useful info and a splash of color. It is written in Rust. - logo-ls : Modern ls command with vscode-like File Icon and Git Integrations. Written in Golang.
Evaluation ๐
ls is consistently faster than eza in all benchmarks we did. So, if you want to choose the faster, it is clearly the ls
program pre-installed on your machine.
But eza went too far and offered icons for files and directories like this.
$ eza -l --icons
.rw-r--r-- 25M mbp 1 Jul 05:01 ๎ core_formulas.json
.rw-r--r-- 198 mbp 31 Jul 03:34 ๎ go.mod
.rw-r--r-- 896 mbp 31 Jul 03:32 ๎ go.sum
.rwxr-xr-x 10M mbp 1 Aug 15:29 ๏ gobrew
.rw-r--r-- 13k mbp 31 Jul 03:31 ๎ main.go
.rw-r--r-- 15k mbp 2 Jul 11:43 ๏ readme.md
and offered a tree-like output.
$ eza -TL2
.
โโโ app
โ โโโ build
โ โโโ build.gradle
โ โโโ proguard-rules.pro
โ โโโ release
โ โโโ src
โโโ build
โ โโโ kotlin
โ โโโ reports
โโโ build.gradle
โโโ gradle
โ โโโ wrapper
โโโ gradle.properties
โโโ gradlew
โโโ gradlew.bat
โโโ local.properties
โโโ README.md
โโโ settings.gradle
So if you like a more vibrant colorful output, go with eza.
If you’d like to have tree-view with the same command instead of using ls
and tree
, go with eza.
If you would like to have neat icons before each file and directory, choose eza instead of ls.
I hope you enjoyed reading this post as much as I enjoyed writing it. If you know a person who can benefit from this information, send them a link of this post. If you want to get notified about new posts, follow me on YouTube , Twitter (x) , LinkedIn , and GitHub .