api: YAML JSON TOON Database version: 1.0.0 format: toon category: id: 339 slug: unix-commands name: Unix Commands description: Common Unix/Linux shell commands and their usage. icon: terminal created_at: 1783090350 dataset_count: 11 topic: overview: "Unix-command reference data collects the tools that make the shell productive: file and process commands, text processors such as grep, sed and awk, networking utilities, package managers, git for version control and the conventions of shell scripting. The commands are decades old and stable, but their flags differ between GNU/Linux, BSD and macOS, and shell syntax differs between bash, zsh and POSIX sh. Many everyday tasks reduce to composing small commands with pipes. The commands here are the common forms; always read the manual page for the system actually in use." key_ideas[7]{term,meaning}: Pipe,"The | operator connects one command's output to the next one's input, building pipelines from small tools." Exit status,"Every command returns a number: 0 for success and non-zero for failure. Scripts branch on it and set -e makes a failure stop the script." Standard streams,"Standard input, output and error (file descriptors 0, 1 and 2), which can be redirected with <, > and 2>." Globbing vs regex,"The shell expands wildcards such as *.txt before the command runs; grep, sed and awk interpret regular expressions themselves." Quoting,"Single quotes prevent all expansion, double quotes allow variable expansion, and unquoted variables are split on whitespace, a common source of bugs." Permissions,"Files carry read, write and execute bits for owner, group and others, set with chmod and shown by ls -l." POSIX vs GNU,POSIX defines portable behavior; GNU tools add extensions (such as sed -i without a suffix) that BSD and macOS may not support. pitfalls[4]: "Running destructive commands (rm -rf, git reset --hard, git clean) without checking the target and having a backup.","Parsing ls output or leaving variables unquoted, which breaks on filenames with spaces.",Assuming GNU flags work on macOS or BSD; check the manual page or use portable forms.,Using sed -i or in-place edits without a backup suffix on files you cannot recover. agent_tips[3]: Show the exact command and explain each flag; state the shell and OS assumptions.,"Prefer a dry run (echo, -n, --dry-run) or a preview before destructive commands, and warn clearly about irreversible effects.",Quote variables and paths in examples to model safe habits. start_with[2]: git-essential-commands,file-operations datasets[11]{id,slug,title,description,tags,view_count,created_at,entry_count,summary}: 2325,awk-reference,AWK Reference,"Essential AWK commands, built-in variables, and common patterns.","unix,awk,text-processing,scripting",24,1792832553,16,"AWK one-liners and patterns for working with columns and records: printing fields, setting the field separator, built-in variables, conditionals, sums, pattern matching and functions, extended with last-field printing, de-duplication, line ranges, averages, maxima and substitutions." 2388,git-essential-commands,Git Essential Commands,Common Git commands for everyday version control workflows.,"unix,git,version-control,vcs",32,1792832553,36,"Essential git commands with a one-line description: init, clone, add, commit, push, pull, branch, checkout, merge, rebase, stash, log, diff, reset and cherry-pick, extended with status, fetch, restore, switch, tag, blame, bisect, revert, reflog, worktrees and configuration." 2389,git-recovery-workflows,Git Recovery and Inspection Workflows,"Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes.","unix-commands,git recovery workflows,reference,engineering",50,1791798640,10,"Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes. Each row includes a practical application and a failure to check before using it." 2482,shell-safe-file-patterns,Safer Bash File and Process Patterns,"Bash patterns for filenames, temporary files, pipelines, and exit status, with portability boundaries.","unix-commands,shell safe file patterns,reference,engineering",51,1791798640,10,"Bash patterns for filenames, temporary files, pipelines, and exit status, with portability boundaries. Each row includes a practical application and a failure to check before using it." 2478,sed-reference,Sed Reference,"Common sed commands, substitutions, and flags.","unix,sed,text-processing,stream-editor",22,1792832553,16,"sed stream-editor patterns: substitution, in-place edits, deleting and printing lines, inserting and appending, regex groups, multiple commands and address ranges, extended with line deletion by pattern, nth-occurrence replacement, case-insensitive matching, trailing-whitespace removal and alternate delimiters." 2483,shell-scripting-guide,Shell Scripting Guide (Bash),"Comprehensive reference for Bash shell scripting: variables, control flow, functions, error handling, debugging, and best practices.","bash,shell,scripting,unix,linux,automation,devops",43,1777673262,8,"A guide to Bash scripting by topic with examples: variables and expansion, control flow, functions, error handling, file operations, arrays and maps, debugging and best practices." 2383,file-operations,Unix File Operation Commands,"Common Unix commands for file and directory operations: ls, find, grep, awk, sed, and tar with examples and usage notes.","unix,linux,commands,shell",36,1777673262,21,"Essential file-operation commands with a description and an example: ls, find, grep, awk, sed and tar, extended with cp, mv, rm, mkdir, touch, chmod, chown, ln, cat, head, tail, wc, diff, stat and xargs." 2511,unix-networking-commands,"Unix Networking Commands (curl, wget, netstat, ss, nmap, dig, ping, traceroute)","Network diagnostics and data transfer: curl/wget (HTTP), netstat/ss (socket stats), nmap (port scanning), dig (DNS), ping/traceroute (connectivity).","unix,linux,networking,curl,wget,dns,ports",41,1777673262,8,"Unix networking commands with purpose, common usage, important options and notes: curl, wget, ss, netstat, nmap, dig, ping and traceroute." 2467,process-management-commands,Unix Process & System Management Commands,Essential Unix commands for monitoring and managing processes and system resources.,"unix,linux,commands,process,system,admin",47,1777673262,10,"Unix process and system-management commands with a description, example and category: ps, top, htop, kill, nice, df, du, free, uname and lscpu." 2513,unix-text-processing-commands,"Unix Text Processing Commands (grep, sed, awk, cut, sort, uniq)","Essential text manipulation tools: pattern searching (grep), stream editing (sed), text processing language (awk), field extraction (cut), sorting (sort), duplicate removal (uniq).","unix,linux,text-processing,grep,sed,awk,cli",40,1777673262,8,"Core text-processing commands with category, description, common flags, example usage and related commands: grep, sed, awk, cut, sort, uniq, tr and wc." 2512,unix-package-management,"Unix/Linux Package Management (apt, yum, dnf, brew, pacman)","Package managers across distributions: Debian/Ubuntu (apt), RHEL/Fedora (yum/dnf), macOS (brew), Arch (pacman). Installation, removal, repository management.","unix,linux,package-manager,apt,yum,dnf,brew,pacman",36,1777673262,6,"Package managers by platform with description, common commands, configuration files and notes: apt, yum, dnf, Homebrew, pacman and dpkg."