bat, eza and fd Review: The Classic Linux Commands Got a Makeover

cat, ls and find have done the same job since before most of us were born. bat, eza and fd do it with colours, Git awareness and fewer flags to memorise. A review of the makeover, plus the one rule for keeping your server skills sharp.

Tux Harlow

4 min read

cat, ls and find are older than the internet. They've been doing the same job since disco. They are, in a word, reliable. In another word, beige.

So a group of developers (mostly writing in Rust, because of course they are) gave them a makeover. Same bones, new outfit, fancier haircut. It's the reality TV moment where the dad with the cargo shorts comes out from behind the curtain in a tailored suit and his family bursts into tears. [The family is weeping. The dad does a slow turn. One kid whispers, "Is that... syntax highlighting?"]

Let's meet the contestants: bat, eza and fd.

bat: cat, but it went to art school

bat prints files like cat does, then adds everything you wish cat had:

  • Syntax highlighting for hundreds of languages and config formats.
  • Line numbers down the side.
  • Git markers in the margin showing lines you've added or changed since the last commit.
  • Paging for long files, so they don't scroll off the top of the screen at warp speed.
Bash
bat ~/.bashrc
bat src/main.rs

When you pipe it into something else, it's smart enough to drop the decorations and behave exactly like plain cat. It knows when it's on stage and when it's backstage.

Name quirk: on Debian and Ubuntu the package is bat, but the command is batcat, because another package already took the name. Add alias bat=batcat to your .bashrc and pretend this never happened.

eza: ls, now with opinions

eza is a modern ls. It's the actively maintained successor to an older tool called exa, which stopped being maintained.

Bash
eza -l --git
eza --tree --level 2
eza -l --icons
  • Colour-coded everything: permissions, sizes and dates, each readable at a glance.
  • --git adds a column showing each file's Git status: modified, new, ignored.
  • --tree shows folders as a tree, so you no longer need to install tree separately.
  • --icons adds little file-type icons, if your terminal font has them (look up "Nerd Fonts"). Without the right font you get mysterious boxes. Abstract art, but not helpful.

Sizes come out human-readable by default. No more ls -lh and squinting at "4.0K".

fd: find, without the homework

find is powerful, but its syntax was clearly designed during a dare. find . -type f -name '*.md'? Come on. fd keeps the useful 90% and makes it easy:

Bash
fd readme
fd -e md
fd -e log -x rm {}
  • fd readme finds anything with "readme" in the name, in any case, recursively. No -name, no quotes, no asterisks.
  • -e md filters by file extension.
  • -x runs a command for each result (careful with that last example, obviously).
  • It respects .gitignore and skips hidden files by default, so searching a project doesn't drown you in node_modules. Use -H for hidden files and -I to include ignored ones.
  • It's quick. It searches in parallel, and it shows.

Name quirk, round two: on Debian and Ubuntu the package is fd-find and the command is fdfind. Alias it. Breathe.

The one rule: don't alias over the originals on servers

Tempting: alias cat=bat, alias ls=eza, alias find=fd. On your own laptop, sure, go wild. But know this. Your servers won't have these tools, your scripts shouldn't depend on them, and fd's options are not the same as find's. If your fingers forget the classic commands, the day you're on a rescue shell at 2 a.m. is the day you'll miss them. Our "find: the man page nobody finished" post is still worth a read for exactly that reason.

Use the makeover tools alongside the originals, not instead of them.

The verdict

ToolReplacesBest bitInstall name (Debian/Ubuntu)
batcatHighlighting and Git markersbat (command batcat)
ezals--git and --treeeza where packaged, or cargo install eza
fdfindSimple syntax, respects .gitignorefd-find (command fdfind)

Install all three on your own machine. They make daily terminal life noticeably nicer, and none of them takes more than a minute to learn.

Keep the originals in your muscle memory for everywhere else.

The beige classics aren't going anywhere. They've just got some very well-dressed cousins now. Somebody pass the tissues.