Enhanced replacements for traditional Unix commands
Modern CLI tools provide significant improvements over traditional Unix utilities:
| Traditional | Modern | Benefits |
|---|---|---|
ls |
eza | Git integration, tree view, icons |
cat |
bat | Syntax highlighting, line numbers, git changes |
find |
fd | Intuitive syntax, respect .gitignore, faster |
grep |
ripgrep | 10-100x faster, respects .gitignore, better UX |
sed |
sd | Intuitive find/replace syntax |
diff |
delta | Syntax highlighting, side-by-side view |
| Traditional | Modern | Benefits |
|---|---|---|
top |
htop | Interactive process viewer, tree view |
ps |
procs | Better formatting, tree view |
df |
duf | Better formatting, device filtering |
du |
dust | Intuitive tree view, faster |
| Traditional | Modern | Benefits |
|---|---|---|
ping |
gping | Graph visualization |
dig |
dog | Colorful output, better UX |
curl |
xh | HTTPie-compatible, faster, single binary |
# Aliases in .zshrc
alias l='eza --group-directories-first --time-style=relative --git --icons --all --header --long'
alias ls='eza --group-directories-first'
alias ll='eza -l --git --time-style=relative'
alias la='eza -a'
alias lt='eza --tree'
# Environment
export BAT_THEME="tokyonight_storm" # or "tokyonight_day" for light
# Aliases
alias cat='bat'
alias less='bat --paging=always'
# Config at ~/.config/ripgrep/config
--smart-case
--colors=match:fg:red
--colors=line:fg:yellow
# Aliases
alias find='fd'
ff() { fd "$@" | fzf }
# In .gitconfig
[core]
pager = delta
[delta]
navigate = true
light = false
side-by-side = true
# Traditional
find . -name "*.py" -type f
# Modern
fd -e py
# With preview
fd -e py | fzf --preview 'bat {}'
# Traditional
grep -r "TODO" . --include="*.js"
# Modern
rg "TODO" -t js
# With context
rg "TODO" -C 2
# Traditional
cat file.py
# Modern with highlighting
bat file.py
# With line numbers
bat -n file.py
# Traditional
ls -la
# Modern with git status
ll
# Tree view
lt --level=2
# Traditional
df -h
# Modern
duf
# Just local disks
duf --only local
# Test: Search Linux kernel source
time grep -r "TODO" linux/
# 18.5s
time rg "TODO" linux/
# 0.5s (37x faster!)
# Test: Find all Python files
time find . -name "*.py" -type f
# 4.2s
time fd -e py
# 0.3s (14x faster!)
# Interactive file search
alias ff='fd | fzf --preview "bat {}"'
# Interactive grep
fif() {
rg "$1" | fzf --preview 'bat {1} --highlight-line {2}'
}
# Use bat for tmux copy mode
set -g @plugin 'laktak/extrakto'
set -g @extrakto_clip_tool 'pbcopy'
# Better git log
alias gl='git log --graph --pretty=format:"%C(auto)%h%d %s %C(black)%C(bold)%cr" | delta'
# Interactive branch selection
fco() {
git branch -a | fzf | xargs git checkout
}
# macOS with Homebrew
brew install eza bat fd ripgrep sd delta htop duf dust procs gping dog xh fzf
# Configuration
mkdir -p ~/.config/ripgrep
echo "--smart-case" > ~/.config/ripgrep/config
Most tools respect terminal colors or have theme support:
# Dark mode
export BAT_THEME="tokyonight_storm"
export EZA_COLORS="di=34:ln=35:ex=31"
# Light mode
export BAT_THEME="tokyonight_day"
export EZA_COLORS="di=94:ln=95:ex=91"
Add to your .zshrc:
# Modern CLI replacements
[ -x "$(command -v eza)" ] && alias ls='eza'
[ -x "$(command -v bat)" ] && alias cat='bat'
[ -x "$(command -v fd)" ] && alias find='fd'
[ -x "$(command -v rg)" ] && alias grep='rg'
[ -x "$(command -v sd)" ] && alias sed='sd'
[ -x "$(command -v htop)" ] && alias top='htop'
[ -x "$(command -v duf)" ] && alias df='duf'