Better GNU Tools

Here are some good alternatives to common GNU tools that are faster and have better defaults.

Installation

Install all of these at once:

Terminal
bun install -g dust eza ouch fd-find ripgrep zoxide

Or install them individually as needed in the sections below.

du → dust

du shows disk usage but the output is hard to parse. dust gives you a visual representation with colored bars that make it easy to see what's eating your storage.

Terminal
bun install -g dust

Before (du):

Terminal
du -h | sort -h | tail
4.0K    ./src/components
8.0K    ./src/styles
12K     ./src/app/articles
156K    ./src/app
512K    ./node_modules/react
2.1M    ./node_modules

After (dust):

Terminal
dust
2.1M  ┌── node_modules     │███████████████████████████████  │ 89%
156K  ├── src              │█                                │  7%
 12K  │  ├── app           │███████████████████████          │ 77%
4.0K  │  ├── components    │████                             │ 17%
 32K  ├── public           │█                                │  1%

ls → eza

ls lists files but it's plain and limited. eza is a modernized version with colors, git status integration, and tree views built in.

Terminal
bun install -g eza

Before (ls -lh):

Terminal
ls -lh
-rw-r--r-- 1 sam sam 1.2K Nov 16 10:30 README.md
-rw-r--r-- 1 sam sam  856 Nov 15 14:22 package.json
drwxr-xr-x 5 sam sam 4.0K Nov 16 09:45 src
drwxr-xr-x 8 sam sam 4.0K Nov 14 18:30 node_modules

After (eza -lh --git):

Terminal
eza -lh --git
.rw-r--r-- 1.2k sam 16 Nov 10:30 -M README.md
.rw-r--r--  856 sam 15 Nov 14:22 -- package.json
drwxr-xr-x    - sam 16 Nov 09:45 N- src
drwxr-xr-x    - sam 14 Nov 18:30 -- node_modules

Use eza -T for a tree view, or add an alias:

~/.bashrc or ~/.zshrc
alias ls='eza'
alias ll='eza -lh --git'
alias tree='eza -T'

tar → ouch

tar handles archives but the syntax is clunky. ouch supports multiple formats with simpler commands.

Terminal
bun install -g ouch

Before (tar):

Terminal
# Compress
tar -czvf archive.tar.gz folder/

# Extract
tar -xzvf archive.tar.gz

# Different format? Different flags
zip -r archive.zip folder/
unzip archive.zip

After (ouch):

Terminal
# Compress (format auto-detected from extension)
ouch compress folder archive.tar.gz

# Extract (format auto-detected)
ouch decompress archive.tar.gz

# Works the same for any format
ouch compress folder archive.zip
ouch decompress archive.zip

find → fd

find locates files but the syntax is verbose. fd is faster and simpler with better defaults.

Terminal
bun install -g fd-find

Before (find):

Terminal
# Find TypeScript files
find . -name "*.ts" -type f

# Find and exclude node_modules
find . -name "*.ts" -type f -not -path "*/node_modules/*"

After (fd):

Terminal
# Find TypeScript files (auto-excludes .gitignore entries)
fd .ts

# Case-insensitive search
fd -i readme

grep → ripgrep

grep searches text but it's slow on large codebases. ripgrep is blazing fast and respects .gitignore.

Terminal
bun install -g ripgrep

Before (grep):

Terminal
# Search for pattern
grep -r "useState" .

# Exclude node_modules manually
grep -r "useState" --exclude-dir=node_modules .

After (rg):

Terminal
# Search (auto-excludes .gitignore entries)
rg "useState"

# Show context lines
rg -C 3 "useState"

cd → zoxide

cd is basic directory navigation. zoxide remembers frequently used paths and lets you jump with fuzzy matching.

Terminal
bun install -g zoxide

Add to your shell config:

~/.bashrc or ~/.zshrc
eval "$(zoxide init bash)"  # or zsh/fish

Before (cd):

Terminal
cd ~/Documents/Repositories/Portfolio/src/components
cd ~/Documents/Repositories/Portfolio/src/app/articles
cd ~/Documents/Repositories/Portfolio/src/styles

After (z):

Terminal
# After visiting once, jump with fuzzy match
z comp      # → ~/Documents/Repositories/Portfolio/src/components
z art       # → ~/Documents/Repositories/Portfolio/src/app/articles
z sty       # → ~/Documents/Repositories/Portfolio/src/styles

# Or just part of the path
z portfolio comp