C.W.K.
Stream
Lesson 01 of 08 · published

Modern Replacements: bat, eza, fd, ripgrep, dust, duf

~13 min · bat, eza, fd, ripgrep, dust, duf

Level 0Window Tourist
0 XP0/95 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

Same job, better defaults

Most classic Unix tools (cat, ls, find, grep, du, df) have modern Rust/Go rewrites with sane defaults: color, gitignore-aware, human-readable. They don't replace the originals — the originals are always there — but for daily interactive use they're life-changing.

The lineup

  • bat ← cat. Syntax highlighting, line numbers, paging.
  • eza (formerly exa) ← ls. Color, git status, tree mode built in.
  • fd ← find. Friendly syntax (fd 'name'), respects .gitignore by default.
  • ripgrep (rg) ← grep. 5–10× faster, ignores binaries / .gitignore / .git.
  • dust ← du. Tree of disk usage, sorted, colored.
  • duf ← df. Cleaner mount table.

Install in one shot

brew install bat eza fd ripgrep dust duf

The two killers — rg and fd

rg TODO --type py        # every TODO in Python files
rg -l 'class Foo' src/    # files containing the pattern
rg -A 3 'def main'        # 3 lines after each match
fd '\.test\.ts$'         # find TS test files
fd -e jpg -x convert {} {.}.png   # convert every jpg to png

Don't alias them on top of the originals

Tempting to alias cat=bat, but scripts that pipe to cat may not understand bat's pager. Use the new names. Keep the originals working unchanged.

Code

Daily ripgrep recipes·bash
# Find every Python TODO with 2 lines of context
rg --type py -C 2 TODO
# Files only (for further xargs)
rg -l 'class User' src/ | xargs wc -l
# Search inside a single dir, exclude tests
rg --glob '!**/test_*.py' 'def authenticate'
fd patterns·bash
fd config           # all files / dirs with 'config' in the name
fd -e md            # extension filter
fd -t f -e log -d 2 # files only, .log, depth 2

External links

Exercise

Install the lineup: brew install bat eza fd ripgrep dust duf. Run rg TODO, fd -e md, bat ~/.zshrc, eza -lah --git, dust ~/Downloads. Notice how each is friendlier than its classic counterpart.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.