---
tags:
- cli
- l1
- flashcard-deck
- modern-cli
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [Modern CLI Tools](../../../../library/portal/topics.md) | **Domain:** CLI Tools
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
modern-cli/fd-001	modern-cli	easy	modern-cli, fd	What does fd replace and what is its key advantage?	"fd replaces find. Key advantages: respects .gitignore by default, regex patterns, colorized output, simpler syntax. Example: fd -e yaml finds all YAML files vs find . -name '*.yaml' -type f"\n\nRemember: fd = modern find. Smart case, colorized, .gitignore-aware. Simpler syntax.	training/library/topics/modern-cli/primer.md
modern-cli/fd-002	modern-cli	medium	modern-cli, fd	How do you find and execute a command on matching files with fd?	"fd -e py -x wc -l (count lines in each Python file). fd -e log -X rm (delete all .log files — -X batches into one command, -x runs per file). Add -H to include hidden files."\n\nRemember: fd = modern find. Smart case, colorized, .gitignore-aware. Simpler syntax.	training/library/topics/modern-cli/primer.md
modern-cli/rg-001	modern-cli	easy	modern-cli, rg, ripgrep	What does rg (ripgrep) replace and why is it faster?	"rg replaces grep -r. Faster because: multi-threaded, respects .gitignore, uses optimized regex engine (Rust). Automatically skips binary files and .git directories."\n\nRemember: rg = faster grep. .gitignore-aware, recursive default, highlights. Rust-powered.	training/library/topics/modern-cli/primer.md
modern-cli/rg-002	modern-cli	medium	modern-cli, rg, ripgrep	How do you search only specific file types with rg?	"rg 'pattern' -t yaml (built-in type filter). rg 'pattern' -g '*.yaml' (glob filter). rg -t py -g '!test*' 'pattern' (Python files excluding tests). rg --type-list shows all built-in types."\n\nRemember: rg = faster grep. .gitignore-aware, recursive default, highlights. Rust-powered.	training/library/topics/modern-cli/primer.md
modern-cli/rg-003	modern-cli	hard	modern-cli, rg, ripgrep	How do you use rg to find files containing a string and show context?	"rg 'error_handler' -C 3 (3 lines before and after). rg -l 'error_handler' (file names only). rg -c 'error_handler' (count per file). --stats flag adds summary totals."\n\nRemember: rg = faster grep. .gitignore-aware, recursive default, highlights. Rust-powered.	training/library/topics/modern-cli/street_ops.md
modern-cli/fzf-001	modern-cli	easy	modern-cli, fzf	What is fzf and what problem does it solve?	"fzf is an interactive fuzzy finder. Turns any list into a searchable, selectable menu. Pipe anything into it: kubectl get pods | fzf, git branch | fzf, history | fzf. Transforms CLI workflows from recall-based to recognition-based."\n\nRemember: fzf = fuzzy finder. Pipe anything: `history | fzf`. Ctrl+R = game-changer.\n\nExample: `FZF_DEFAULT_COMMAND='fd --type f'` uses fd for file search.	training/library/topics/modern-cli/primer.md
modern-cli/fzf-002	modern-cli	medium	modern-cli, fzf	What are the three key fzf shell keybindings?	"Ctrl-R: fuzzy search command history. Ctrl-T: fuzzy find and insert a file path. Alt-C: fuzzy cd into a subdirectory. Enable with: eval \"$(fzf --bash)\" in .bashrc (or --zsh/--fish)."\n\nRemember: fzf = fuzzy finder. Pipe anything: `history | fzf`. Ctrl+R = game-changer.\n\nExample: `FZF_DEFAULT_COMMAND='fd --type f'` uses fd for file search.	training/library/topics/modern-cli/primer.md
modern-cli/fzf-003	modern-cli	hard	modern-cli, fzf	How do you combine fzf with file preview?	"rg --files | fzf --preview 'bat --color=always {}' — browse files with syntax-highlighted preview. For git: git log --oneline | fzf --preview 'git show {1}' — preview commits interactively."\n\nRemember: fzf = fuzzy finder. Pipe anything: `history | fzf`. Ctrl+R = game-changer.\n\nExample: `FZF_DEFAULT_COMMAND='fd --type f'` uses fd for file search.	training/library/topics/modern-cli/street_ops.md
modern-cli/jq-001	modern-cli	easy	modern-cli, jq	What is jq and when do you reach for it?	"jq is a command-line JSON processor. Use whenever you get JSON output: kubectl -o json, AWS CLI, Terraform state, API responses. Basic patterns: jq '.' (pretty-print), jq '.key' (extract), jq '.[] | .name' (iterate)."\n\nRemember: jq = JSON processor. Essential for APIs. `curl url | jq '.data[] | .name'`.\n\nExample: `jq -r '.items[] | [.name, .status] | @tsv'` — JSON to TSV.	training/library/topics/modern-cli/primer.md
modern-cli/jq-002	modern-cli	medium	modern-cli, jq	How do you filter and reshape JSON with jq?	"Filter: jq '.items[] | select(.status == \"running\")'. Reshape: jq '{name: .metadata.name, phase: .status.phase}'. Raw output: jq -r '.name' (no quotes). Slurp: jq -s '.' (read all inputs into array)."\n\nRemember: jq = JSON processor. Essential for APIs. `curl url | jq '.data[] | .name'`.\n\nExample: `jq -r '.items[] | [.name, .status] | @tsv'` — JSON to TSV.	training/library/topics/modern-cli/primer.md
modern-cli/jq-003	modern-cli	hard	modern-cli, jq	How do you count and aggregate with jq?	"Count: jq '.items | length'. Group and count: jq '[.items[] | .status.phase] | group_by(.) | map({(.[0]): length}) | add'. TSV output: jq -r '[.timestamp, .service, .message] | @tsv'"\n\nRemember: jq = JSON processor. Essential for APIs. `curl url | jq '.data[] | .name'`.\n\nExample: `jq -r '.items[] | [.name, .status] | @tsv'` — JSON to TSV.	training/library/topics/modern-cli-workflows/street_ops.md
modern-cli/yq-001	modern-cli	easy	modern-cli, yq	What is yq and how does it relate to jq?	"yq is jq for YAML (and TOML). Same filter syntax, works on YAML files directly. Essential for editing Kubernetes manifests, Helm values, and CI configs. Example: yq '.spec.replicas' deployment.yaml"\n\nRemember: jq = JSON processor. Essential for APIs. `curl url | jq '.data[] | .name'`.\n\nExample: `jq -r '.items[] | [.name, .status] | @tsv'` — JSON to TSV.	training/library/topics/modern-cli/primer.md
modern-cli/yq-002	modern-cli	medium	modern-cli, yq	How do you modify a YAML file in-place with yq?	"yq -i '.spec.replicas = 3' deployment.yaml. Add a field: yq -i '.metadata.labels.env = \"prod\"' deployment.yaml. Delete: yq -i 'del(.spec.template.metadata.annotations)' deployment.yaml."\n\nRemember: Modern CLI = Rust-powered: rg, fd, bat, exa, delta, zoxide. Faster, friendlier.\n\nExample: Replace: grep→rg, find→fd, cat→bat, ls→exa, cd→zoxide, diff→delta.	training/library/topics/modern-cli/primer.md
modern-cli/eza-001	modern-cli	easy	modern-cli, eza	What does eza replace and what does it add over ls?	"eza replaces ls. Adds: colorized output by file type, built-in tree view (eza --tree), git status per file (eza -la --git), and icon support. Useful: eza --sort modified for recently changed files."\n\nRemember: exa/eza = modern ls. Colors, git status, tree. `exa -la --git`.	training/library/topics/modern-cli/primer.md
modern-cli/bat-001	modern-cli	easy	modern-cli, bat	What does bat replace and what does it add over cat?	"bat replaces cat. Adds: syntax highlighting, line numbers, git diff markers, and automatic paging. Use bat -l yaml to force language. Set as MANPAGER for colorized man pages: export MANPAGER='bat -l man -p'"\n\nRemember: bat = cat + syntax highlighting + line numbers + git. Drop-in replacement.	training/library/topics/modern-cli/primer.md
modern-cli/bat-002	modern-cli	medium	modern-cli, bat	How do you use bat as a previewer for other tools?	"With fzf: fzf --preview 'bat --color=always {}'. With git: git diff | bat -l diff. As pager: export BAT_PAGER='less -RF'. bat -A shows whitespace characters (tabs, spaces, newlines)."\n\nRemember: bat = cat + syntax highlighting + line numbers + git. Drop-in replacement.	training/library/topics/modern-cli/primer.md
modern-cli/delta-001	modern-cli	easy	modern-cli, delta	What is delta and how do you set it up with git?	"delta is a syntax-highlighting diff viewer. Add to .gitconfig: [core] pager = delta. Provides side-by-side view (delta -s), line numbers, and language-aware highlighting for git diff, git log -p, and git show."\n\nRemember: delta = better git diff. Highlighting, line numbers. `git config core.pager delta`.	training/library/topics/modern-cli/primer.md
modern-cli/zoxide-001	modern-cli	easy	modern-cli, zoxide	What does zoxide replace and how does it learn?	"zoxide replaces cd. It learns from your navigation — tracks directory frequency and recency (frecency). z exercises jumps to most-visited match. zi opens interactive selection with fzf. Setup: eval \"$(zoxide init bash)\""\n\nRemember: zoxide = smart cd. Learns habits. `z proj` → /home/user/projects.	training/library/topics/modern-cli/primer.md
modern-cli/zoxide-002	modern-cli	hard	modern-cli, zoxide	When should you use z vs zi vs cd?	"z <partial> for known frequent directories (z grok → /home/user/grokdevops). zi when multiple matches exist and you want to pick interactively. Plain cd for explicit paths or parent navigation (cd ..)."\n\nRemember: Modern CLI = Rust-powered: rg, fd, bat, exa, delta, zoxide. Faster, friendlier.\n\nExample: Replace: grep→rg, find→fd, cat→bat, ls→exa, cd→zoxide, diff→delta.	training/library/topics/modern-cli/primer.md
modern-cli/dust-001	modern-cli	easy	modern-cli, dust	What does dust replace and what does it add over du?	"dust replaces du. Provides visual bar charts of disk usage, sorted by size, with automatic depth. dust -n 20 shows top 20 entries. dust -d 2 limits depth. No need to pipe through sort -rh | head like with du."\n\nRemember: Modern CLI = Rust-powered: rg, fd, bat, exa, delta, zoxide. Faster, friendlier.\n\nExample: Replace: grep→rg, find→fd, cat→bat, ls→exa, cd→zoxide, diff→delta.	training/library/topics/modern-cli/primer.md
modern-cli/combo-001	modern-cli	hard	modern-cli, workflow	How do you combine rg + fzf + bat for interactive code search?	"rg 'pattern' -l | fzf --preview 'bat --color=always -H $(rg -n \"pattern\" {} | head -1 | cut -d: -f1) {}' — lists matching files, preview highlights the match line. Powerful for exploring unfamiliar codebases."\n\nRemember: rg = faster grep. .gitignore-aware, recursive default, highlights. Rust-powered.	training/library/topics/modern-cli-workflows/street_ops.md
modern-cli/combo-002	modern-cli	hard	modern-cli, workflow	How do you use jq to triage JSON logs from an application?	"cat app.log | jq 'select(.level == \"error\")' (filter errors). Count by service: jq -r 'select(.level == \"error\") | .service' | sort | uniq -c | sort -rn. Table output: jq -r '[.timestamp, .service, .message] | @tsv' | column -t"\n\nRemember: jq = JSON processor. Essential for APIs. `curl url | jq '.data[] | .name'`.\n\nExample: `jq -r '.items[] | [.name, .status] | @tsv'` — JSON to TSV.	training/library/topics/modern-cli-workflows/street_ops.md
modern-cli/combo-003	modern-cli	medium	modern-cli, workflow	What is the modern-tool equivalent of 'find . -name *.yaml | xargs grep replicas | sort'?	"rg 'replicas' -t yaml. One command replaces the entire pipeline. Add -C 2 for context, -l for file names only, --stats for totals. rg handles .gitignore, binary files, and multi-threading automatically."\n\nRemember: rg = faster grep. .gitignore-aware, recursive default, highlights. Rust-powered.	training/library/topics/modern-cli-workflows/street_ops.md
modern-cli/choice-001	modern-cli	easy	modern-cli, tool-selection	When do you still use classic tools (grep, find, cat) over modern ones?	"On remote servers without modern tools installed. In shell scripts that must be portable. In Dockerfiles (minimize image size). When piping to other programs that expect standard output format. Know both — modern for interactive work, classic for portability."\n\nRemember: Modern CLI = Rust-powered: rg, fd, bat, exa, delta, zoxide. Faster, friendlier.\n\nExample: Replace: grep→rg, find→fd, cat→bat, ls→exa, cd→zoxide, diff→delta.	training/library/topics/modern-cli/primer.md
modern-cli/choice-002	modern-cli	hard	modern-cli, tool-selection	You need to find all YAML files containing 'replicas' in a monorepo. Which tool chain do you pick?	"rg 'replicas' -t yaml for the answer. If you need to browse the results interactively: rg 'replicas' -t yaml -l | fzf --preview 'bat --color=always {}'. Classic equivalent takes 3+ commands; rg does it in one."\n\nRemember: Modern CLI = Rust-powered: rg, fd, bat, exa, delta, zoxide. Faster, friendlier.\n\nExample: Replace: grep→rg, find→fd, cat→bat, ls→exa, cd→zoxide, diff→delta.	training/library/topics/modern-cli-workflows/street_ops.md

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- CLI Tools Flashcards *(CLI)* (flashcard_deck, L1) — Modern CLI Tools
- [Modern CLI Drills](../../../../library/drills/modern_cli_drills.md) (Drill, L0) — Modern CLI Tools
- [Modern CLI Tools](../../../../library/topics/modern-cli/index.md) (Topic Pack, L0) — Modern CLI Tools
- [Skillcheck: Modern CLI Tools](../../../../library/skillchecks/modern-cli-tools.skillcheck.md) (Assessment, L0) — Modern CLI Tools

<!-- wiki:related:end -->
