| [{"nl": "Print the exit status of the previous command.", "cmd": "echo $?", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "Print a random number between 0 and 32767.", "cmd": "echo $RANDOM", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "List how many arguments the current context has.", "cmd": "echo $#", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "Read JSON from `stdin` and execute a specified JSONPath expression.", "cmd": "cat {{path/to/file.json}} | ajson '{{$..json[?(@.path)]}}'", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Translate a text file from English to Hindi.", "cmd": "cat {{path/to/file.txt}} | argos-translate --from-lang en --to-lang hi", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "When the method returns or an exception occurs, observe the count property of the second parameter.", "cmd": "watch {{class-pattern}} {{method-pattern}} '{{{ params[1].count }}}' -e -s", "category": "single", "utility": "watch", "source": "tldr"}, {"nl": "List misspelled words from `stdin`.", "cmd": "cat {{path/to/file}} | aspell list", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "List misspelled words from `stdin` and ignore words from personal word list.", "cmd": "cat {{path/to/file}} | aspell --personal {{personal-word-list.pws}} list", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print the fifth column (a.k.a. field) in a space-separated file.", "cmd": "awk '{print $5}' {{path/to/file}}", "category": "single", "utility": "awk", "source": "tldr"}, {"nl": "Print the last column of each line in a file, using a comma (instead of space) as a field separator.", "cmd": "awk -F ',' '{print $NF}' {{path/to/file}}", "category": "single", "utility": "awk", "source": "tldr"}, {"nl": "Sum the values in the first column of a file and print the total.", "cmd": "awk '{s+=$1} END {print s}' {{path/to/file}}", "category": "single", "utility": "awk", "source": "tldr"}, {"nl": "Print every third line starting from the first line.", "cmd": "awk 'NR%3==1' {{path/to/file}}", "category": "single", "utility": "awk", "source": "tldr"}, {"nl": "Print different values based on conditions.", "cmd": "awk '{if ($1 == \"foo\") print \"Exact match foo\"; else if ($1 ~ \"bar\") print \"Partial match bar\"; else print \"Baz\"}' {{path/to/file}}", "category": "pipeline", "utility": "awk", "source": "tldr"}, {"nl": "Calculate the BLAKE2 checksum for one or more files.", "cmd": "b2sum {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "b2sum", "source": "tldr"}, {"nl": "Calculate and save the list of BLAKE2 checksums to a file.", "cmd": "b2sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.b2}}", "category": "single", "utility": "b2sum", "source": "tldr"}, {"nl": "Encode a file.", "cmd": "base32 {{path/to/file}}", "category": "single", "utility": "base32", "source": "tldr"}, {"nl": "Encode a file.", "cmd": "base64 {{path/to/file}}", "category": "single", "utility": "base64", "source": "tldr"}, {"nl": "Show only the file name from a path.", "cmd": "basename {{path/to/file}}", "category": "single", "utility": "basename", "source": "tldr"}, {"nl": "Show only the rightmost directory name from a path.", "cmd": "basename {{path/to/directory}}", "category": "single", "utility": "basename", "source": "tldr"}, {"nl": "Pretty print the contents of one or more files to `stdout`.", "cmd": "bat {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "bat", "source": "tldr"}, {"nl": "Concatenate several files into the target file.", "cmd": "bat {{path/to/file1 path/to/file2 ...}} > {{path/to/target_file}}", "category": "single", "utility": "bat", "source": "tldr"}, {"nl": "Remove all decorations except line numbers in the output.", "cmd": "bat {{[-n|--number]}} {{path/to/file}}", "category": "single", "utility": "bat", "source": "tldr"}, {"nl": "Execute a command from `stdin`.", "cmd": "echo \"{{./make_db_backup.sh}}\" | batch", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Bind [i]nput to a sequence of lines from `stdin`.", "cmd": "printf \"first\\nsecond\" | bb -i \"(map clojure.string/capitalize *input*)\"", "category": "pipeline", "utility": "printf", "source": "tldr"}, {"nl": "Bind [I]nput to a sequence of EDN (Extensible Data Notation) values from `stdin`.", "cmd": "echo \"{:key 'val}\" | bb -I \"(:key (first *input*))\"", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Calculate an expression.", "cmd": "echo '{{5 / 3}}' | bc", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Calculate an expression with the specified scale.", "cmd": "echo 'scale = {{10}}; {{5 / 3}}' | bc", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Execute an inline factorial script.", "cmd": "echo \"define factorial(n) { if (n <= 1) return 1; return n*factorial(n-1); }; factorial({{10}})\" | bc", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Compress a file.", "cmd": "bzip2 {{path/to/file_to_compress}}", "category": "single", "utility": "bzip2", "source": "tldr"}, {"nl": "Display a calendar for the current month.", "cmd": "cal", "category": "single", "utility": "cal", "source": "tldr"}, {"nl": "Hunt for secrets using custom `regex`es and output results in JSON.", "cmd": "cat {{path/to/urls.txt}} | cariddi -s -sf {{path/to/custom_secrets.txt}} -json", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Hunt for juicy endpoints with high concurrency and timeout with plain output results.", "cmd": "cat {{path/to/urls.txt}} | cariddi -e -c {{250}} -t {{15}} -plain", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Crawl with debug mode and store HTTP responses and output results in `txt` file.", "cmd": "cat {{path/to/urls.txt}} | cariddi -debug -sr -ot {{path/to/debug_output.txt}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Perform an intensive crawl with a proxy and random user agent and output results in `html` file.", "cmd": "cat {{path/to/urls.txt}} | cariddi -intensive -proxy {{http://127.0.0.1:8080}} -rua -oh {{path/to/intensive_crawl.html}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Hunt for errors and useful information with a custom delay and use `.cariddi_cache` folder as cache.", "cmd": "cat {{path/to/urls.txt}} | cariddi -err -info -d {{3}} -cache", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print the contents of a file to `stdout`.", "cmd": "cat {{path/to/file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Concatenate several files into an output file.", "cmd": "cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Append several files to an output file.", "cmd": "cat {{path/to/file1 path/to/file2 ...}} >> {{path/to/output_file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Copy the contents of a file into an output file without buffering.", "cmd": "cat -u {{/dev/tty12}} > {{/dev/tty13}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Write `stdin` to a file.", "cmd": "cat - > {{path/to/file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Pipe the result of a command to `chatgpt` as a prompt.", "cmd": "echo \"{{How to view running processes on Ubuntu?}}\" | chatgpt", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Change the owner group of a file/directory.", "cmd": "chgrp {{group}} {{path/to/file_or_directory}}", "category": "single", "utility": "chgrp", "source": "tldr"}, {"nl": "Change the owner group of a file/directory to match a reference file.", "cmd": "chgrp --reference {{path/to/reference_file}} {{path/to/file_or_directory}}", "category": "single", "utility": "chgrp", "source": "tldr"}, {"nl": "Give the [u]ser who owns a file the right to e[x]ecute it.", "cmd": "chmod u+x {{path/to/file}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Give the [u]ser rights to [r]ead and [w]rite to a file/directory.", "cmd": "chmod u+rw {{path/to/file_or_directory}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Remove e[x]ecutable rights from the [g]roup.", "cmd": "chmod g-x {{path/to/file}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Give [a]ll users rights to [r]ead and e[x]ecute.", "cmd": "chmod a+rx {{path/to/file}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Give [o]thers (not in the file owner's group) the same rights as the [g]roup.", "cmd": "chmod o=g {{path/to/file}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Remove all rights from [o]thers.", "cmd": "chmod o= {{path/to/file}}", "category": "single", "utility": "chmod", "source": "tldr"}, {"nl": "Change the owner user of a file/directory.", "cmd": "sudo chown {{user}} {{path/to/file_or_directory}}", "category": "single", "utility": "chown", "source": "tldr"}, {"nl": "Change the owner user and group of a file/directory.", "cmd": "sudo chown {{user}}:{{group}} {{path/to/file_or_directory}}", "category": "single", "utility": "chown", "source": "tldr"}, {"nl": "Change the owner user and group to both have the name `user`.", "cmd": "sudo chown {{user}}: {{path/to/file_or_directory}}", "category": "single", "utility": "chown", "source": "tldr"}, {"nl": "Change the group of a file to a group that the current user belongs to.", "cmd": "chown :{{group}} {{path/to/file_or_directory}}", "category": "single", "utility": "chown", "source": "tldr"}, {"nl": "Change the owner of a file/directory to match a reference file.", "cmd": "sudo chown --reference {{path/to/reference_file}} {{path/to/file_or_directory}}", "category": "single", "utility": "chown", "source": "tldr"}, {"nl": "Display a 32-bit checksum, size in bytes and filename.", "cmd": "cksum {{path/to/file}}", "category": "single", "utility": "cksum", "source": "tldr"}, {"nl": "Output char and line number of the first difference between two files.", "cmd": "cmp {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "cmp", "source": "tldr"}, {"nl": "Produce three tab-separated columns: lines only in first file, lines only in second file, and common lines.", "cmd": "comm {{file1}} {{file2}}", "category": "single", "utility": "comm", "source": "tldr"}, {"nl": "Print only lines common to both files.", "cmd": "comm -12 {{file1}} {{file2}}", "category": "single", "utility": "comm", "source": "tldr"}, {"nl": "Print only lines common to both files, reading one file from `stdin`.", "cmd": "cat {{file1}} | comm -12 - {{file2}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Get lines only found in first file, saving the result to a third file.", "cmd": "comm -23 {{file1}} {{file2}} > {{file1_only}}", "category": "single", "utility": "comm", "source": "tldr"}, {"nl": "Print lines only found in second file, when the files aren't sorted.", "cmd": "comm -13 <(sort {{file1}}) <(sort {{file2}})", "category": "single", "utility": "comm", "source": "tldr"}, {"nl": "Execute the `ls` program literally, even if an `ls` alias exists.", "cmd": "command ls", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Connect to the local server and show fireworks.", "cmd": "ssh {{[-p|--port]}} {{2222}} localhost -t fireworks", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "Copy a file to another location.", "cmd": "cp {{path/to/source_file}} {{path/to/target_file}}", "category": "single", "utility": "cp", "source": "tldr"}, {"nl": "Copy a file into another directory, keeping the filename.", "cmd": "cp {{path/to/source_file}} {{path/to/target_parent_directory}}", "category": "single", "utility": "cp", "source": "tldr"}, {"nl": "Copy multiple files at once to a directory.", "cmd": "cp {{[-t|--target-directory]}} {{path/to/destination_directory}} {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "cp", "source": "tldr"}, {"nl": "Use the full path of source files, creating any missing intermediate directories when copying.", "cmd": "cp --parents {{source/path/to/file}} {{path/to/target_file}}", "category": "single", "utility": "cp", "source": "tldr"}, {"nl": "[e]dit the crontab file for the current user.", "cmd": "crontab -e", "category": "single", "utility": "crontab", "source": "tldr"}, {"nl": "[e]dit the crontab file for a specific [u]ser.", "cmd": "sudo crontab -e -u {{user}}", "category": "single", "utility": "crontab", "source": "tldr"}, {"nl": "Replace the current crontab with the contents of the given file.", "cmd": "crontab {{path/to/file}}", "category": "single", "utility": "crontab", "source": "tldr"}, {"nl": "[l]ist existing cron jobs for the current user.", "cmd": "crontab -l", "category": "single", "utility": "crontab", "source": "tldr"}, {"nl": "[r]emove all cron jobs for the current user.", "cmd": "crontab -r", "category": "single", "utility": "crontab", "source": "tldr"}, {"nl": "Test all PPD files under the current directory, printing the names of each file that does not conform.", "cmd": "find . -name \\*.ppd \\! -execdir cupstestppd -q '{}' \\; -print", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Make an HTTP GET request and dump the contents in `stdout`.", "cmd": "curl {{https://example.com}}", "category": "single", "utility": "curl", "source": "tldr"}, {"nl": "Display the current date using the default locale's format.", "cmd": "date +%c", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Display the current date as a Unix timestamp (seconds since the Unix epoch).", "cmd": "date +%s", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Convert a date specified as a Unix timestamp to the default format.", "cmd": "date {{[-d|--date]}} @{{1473305798}}", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Display the current date using the RFC-3339 format (`YYYY-MM-DD hh:mm:ss TZ`) and specify its precision.", "cmd": "date --rfc-3339 {{date|seconds|ns}}", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Set the current date using the format `MMDDhhmmYYYY.ss` (`YYYY` and `.ss` are optional).", "cmd": "sudo date {{093023592021.59}}", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Display the current ISO week number.", "cmd": "date +%V", "category": "single", "utility": "date", "source": "tldr"}, {"nl": "Display all filesystems and their disk usage (using 512-byte units).", "cmd": "df", "category": "single", "utility": "df", "source": "tldr"}, {"nl": "Display the filesystem containing the specified file or directory.", "cmd": "df {{path/to/file_or_directory}}", "category": "single", "utility": "df", "source": "tldr"}, {"nl": "Use [k]ibibyte (1024 byte) units when showing size figures.", "cmd": "df -k", "category": "single", "utility": "df", "source": "tldr"}, {"nl": "Display information in a portable way.", "cmd": "df -P", "category": "single", "utility": "df", "source": "tldr"}, {"nl": "Compare files (lists changes to turn `old_file` into `new_file`).", "cmd": "diff {{path/to/old_file}} {{path/to/new_file}}", "category": "single", "utility": "diff", "source": "tldr"}, {"nl": "Display changes in a histogram.", "cmd": "diff {{path/to/file1}} {{path/to/file2}} | diffstat", "category": "pipeline", "utility": "diff", "source": "tldr"}, {"nl": "Display inserted, deleted, and modified changes as a table.", "cmd": "diff {{path/to/file1}} {{path/to/file2}} | diffstat -t", "category": "pipeline", "utility": "diff", "source": "tldr"}, {"nl": "Lookup the IP(s) associated with a hostname (A records).", "cmd": "dig +short {{example.com}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Get a detailed answer for a given domain (A records).", "cmd": "dig +noall +answer {{example.com}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Perform a reverse DNS lookup on an IP address (PTR record).", "cmd": "dig -x {{8.8.8.8}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Find authoritative name servers for the zone and display SOA records.", "cmd": "dig +nssearch {{example.com}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Perform iterative queries and display the entire trace path to resolve a domain name.", "cmd": "dig +trace {{example.com}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Query a DNS server over a non-standard [p]ort using the TCP protocol.", "cmd": "dig +tcp -p {{port}} @{{dns_server_ip}} {{example.com}}", "category": "single", "utility": "dig", "source": "tldr"}, {"nl": "Calculate the parent directory of a given path.", "cmd": "dirname {{path/to/file_or_directory}}", "category": "single", "utility": "dirname", "source": "tldr"}, {"nl": "Calculate the parent directory of multiple paths.", "cmd": "dirname {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}", "category": "single", "utility": "dirname", "source": "tldr"}, {"nl": "Read CSV from `stdin` and write CSV to `stdout`.", "cmd": "cat {{path/to/source.csv}} | duckdb -c \"{{COPY (FROM read_csv('/dev/stdin')) TO '/dev/stdout' WITH (FORMAT CSV, HEADER)}}\"", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print the exit status of the last executed command (Note: In Windows Command Prompt and PowerShell the equivalent commands are `echo %errorlevel%` and `$lastexitcode` respectively).", "cmd": "echo $?", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "Preprocess from `stdin` and write to a file.", "cmd": "cat input.pgc | ecpg -o output.c -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Update the default Organization policy (the default Organization policy will be applied to all of the API keys within the Organization).", "cmd": "cat {{path/to/policy.json}} | exo iam org-policy update -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Convert tabs in each file to spaces, writing to `stdout`.", "cmd": "expand {{path/to/file}}", "category": "single", "utility": "expand", "source": "tldr"}, {"nl": "Convert tabs to spaces, reading from `stdin`.", "cmd": "expand", "category": "single", "utility": "expand", "source": "tldr"}, {"nl": "Take the input from `stdin` if no argument is specified.", "cmd": "echo {{number}} | factor", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Print only the filename.", "cmd": "fd --format \"{/}\"", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Print the parent directory.", "cmd": "fd --format \"{//}\"", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Print the file path without file extension.", "cmd": "fd --format \"{.}\"", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Print only the filename without extension.", "cmd": "fd --format \"{/.}\"", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Recursively find files matching a specific pattern in the current directory.", "cmd": "fd \"{{regex}}\"", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Find files in a specific directory.", "cmd": "fd \"{{regex}}\" {{path/to/directory}}", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Find files only in the current directory.", "cmd": "fd \"{{regex}}\" {{[-d|--max-depth]}} 1", "category": "single", "utility": "fd", "source": "tldr"}, {"nl": "Give a description of the type of the specified file.", "cmd": "file {{path/to/file}}", "category": "single", "utility": "file", "source": "tldr"}, {"nl": "Allow `file` to work with special or device files.", "cmd": "file {{[-s|--special-files]}} {{path/to/file}}", "category": "single", "utility": "file", "source": "tldr"}, {"nl": "Find files by extension.", "cmd": "find {{path/to/directory}} -name '{{*.ext}}'", "category": "single", "utility": "find", "source": "tldr"}, {"nl": "Find files matching multiple path/name patterns.", "cmd": "find {{path/to/directory}} -path '{{*/path/*/*.ext}}' -or -name '{{*pattern*}}'", "category": "single", "utility": "find", "source": "tldr"}, {"nl": "Find files matching a given pattern, excluding specific paths.", "cmd": "find {{path/to/directory}} -name '{{*.py}}' -not -path '{{*/site-packages/*}}'", "category": "single", "utility": "find", "source": "tldr"}, {"nl": "Find all files modified today and pass the results to a single command as arguments.", "cmd": "find {{path/to/directory}} -daystart -mtime {{-1}} -exec {{tar -cvf archive.tar}} {} \\+", "category": "single", "utility": "find", "source": "tldr"}, {"nl": "Reformat a file.", "cmd": "fmt {{path/to/file}}", "category": "single", "utility": "fmt", "source": "tldr"}, {"nl": "Wrap each line to default width (80 characters).", "cmd": "fold {{path/to/file}}", "category": "single", "utility": "fold", "source": "tldr"}, {"nl": "Wrap each line to width \"30\".", "cmd": "fold -w30 {{path/to/file}}", "category": "single", "utility": "fold", "source": "tldr"}, {"nl": "Wrap each line to width \"5\" and break the line at spaces (puts each space separated word in a new line, words with length > 5 are wrapped).", "cmd": "fold -w5 -s {{path/to/file}}", "category": "single", "utility": "fold", "source": "tldr"}, {"nl": "Pretty-print and colorize JSON from `stdin`.", "cmd": "cat {{path/to/file.json}} | fx", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Open JSON data from a URL.", "cmd": "curl {{url}} | fx", "category": "pipeline", "utility": "curl", "source": "tldr"}, {"nl": "Start `fzf` on all files in the specified directory.", "cmd": "find {{path/to/directory}} -type f | fzf", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Start `fzf` for running processes.", "cmd": "ps aux | fzf", "category": "pipeline", "utility": "ps", "source": "tldr"}, {"nl": "Log in with a token from `stdin` (created in <https://github.com/settings/tokens>).", "cmd": "echo {{your_token}} | gh auth login --with-token", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Generate shell-specific aliases for Bash.", "cmd": "echo 'eval \"$(gh copilot alias -- bash)\"' >> ~/.bashrc", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Generate shell-specific aliases for Zsh.", "cmd": "echo 'eval \"$(gh copilot alias -- zsh)\"' >> ~/.zshrc", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Format `stdin` as multiple columns with a maximum width of `100`.", "cmd": "ls | git column --mode=column --width={{100}}", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Format `stdin` as multiple columns with a maximum padding of `30`.", "cmd": "ls | git column --mode=column --padding={{30}}", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Display credential information, retrieving the username and password from configuration files.", "cmd": "echo \"{{url=http://example.com}}\" | git credential fill", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Send credential information to all configured credential helpers to store for later use.", "cmd": "echo \"{{url=http://example.com}}\" | git credential approve", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Erase the specified credential information from all the configured credential helpers.", "cmd": "echo \"{{url=http://example.com}}\" | git credential reject", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Compute the object ID from `stdin`.", "cmd": "cat {{path/to/file}} | git hash-object --stdin", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Read commit IDs from `stdin`.", "cmd": "echo \"{{commit-ish}}\" | git name-rev --annotate-stdin", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Trim whitespace from a file.", "cmd": "cat {{path/to/file}} | git stripspace", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Trim whitespace and Git comments from a file.", "cmd": "cat {{path/to/file}} | git stripspace {{[-s|--strip-comments]}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Analyze a rendered configuration dump via `stdin` (`-`).", "cmd": "cat {{path/to/nginx-dump.conf}} | gixy-next -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.gml}} | gml2gv > {{output.gv}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Import a public key from WKD (Web Key Directory) if the key isn't already in the keyring.", "cmd": "gpg --locate-keys {{alice@example.com}}", "category": "single", "utility": "gpg", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.gml}} | graphml2gv > {{output.gv}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Search for a pattern within files.", "cmd": "grep \"{{search_pattern}}\" {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "grep", "source": "tldr"}, {"nl": "Print file name and line number for each match with color output.", "cmd": "grep {{[-Hn|--with-filename --line-number]}} --color=always \"{{search_pattern}}\" {{path/to/file}}", "category": "single", "utility": "grep", "source": "tldr"}, {"nl": "Use extended `regex`es (supports `?`, `+`, `{}`, `()`, and `|`), in case-insensitive mode.", "cmd": "grep {{[-Ei|--extended-regexp --ignore-case]}} \"{{search_pattern}}\" {{path/to/file}}", "category": "single", "utility": "grep", "source": "tldr"}, {"nl": "Print group memberships for the current user.", "cmd": "groups", "category": "single", "utility": "groups", "source": "tldr"}, {"nl": "Print group memberships for a list of users.", "cmd": "groups {{username1 username2 ...}}", "category": "single", "utility": "groups", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.gv}} | gv2gml > {{output.gml}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.gv}} | gv2gxl > {{output.gxl}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.gxl}} | gxl2gv > {{output.gv}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Compress a file, replacing it with a `gzip` archive.", "cmd": "gzip {{path/to/file}}", "category": "single", "utility": "gzip", "source": "tldr"}, {"nl": "Output the first few lines of a file.", "cmd": "head -n {{count}} {{path/to/file}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Print the hexadecimal representation of a file, replacing duplicate lines by `*`.", "cmd": "hexdump {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Display the input offset in hexadecimal and its ASCII representation in two columns.", "cmd": "hexdump -C {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Display the hexadecimal representation of a file, but interpret only a specific number of bytes of the input.", "cmd": "hexdump -C -n {{number_of_bytes}} {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Verbose - no suppression by `*` on duplicate lines.", "cmd": "hexdump -v {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Format output using printf-like format string.", "cmd": "hexdump -e '{{element_format .. end_format}}' {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Lookup A, AAAA, and MX records of a domain.", "cmd": "host {{domain}}", "category": "single", "utility": "host", "source": "tldr"}, {"nl": "Reverse lookup an IP.", "cmd": "host {{ip_address}}", "category": "single", "utility": "host", "source": "tldr"}, {"nl": "Specify an alternate DNS server to query.", "cmd": "host {{domain}} {{8.8.8.8}}", "category": "single", "utility": "host", "source": "tldr"}, {"nl": "Show current host name.", "cmd": "hostname", "category": "single", "utility": "hostname", "source": "tldr"}, {"nl": "Show the network address of the host name.", "cmd": "hostname {{[-i|--ip-address]}}", "category": "single", "utility": "hostname", "source": "tldr"}, {"nl": "Set current host name.", "cmd": "hostname {{new_hostname}}", "category": "single", "utility": "hostname", "source": "tldr"}, {"nl": "Return all elements of class `card`.", "cmd": "cat {{path/to/file.html}} | htmlq '.card'", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Start `htop`.", "cmd": "htop", "category": "single", "utility": "htop", "source": "tldr"}, {"nl": "Disable all system and process changing features.", "cmd": "htop --readonly", "category": "single", "utility": "htop", "source": "tldr"}, {"nl": "Probe a list of domains from a text file.", "cmd": "cat {{input_file}} | httprobe", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Only check for HTTP if HTTPS is not working.", "cmd": "cat {{input_file}} | httprobe --prefer-https", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Display current user's ID (UID), group ID (GID), and groups to which they belong.", "cmd": "id", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display the current user identity.", "cmd": "id {{[-un|--user --name]}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display the current primary group identity.", "cmd": "id {{[-gn|--group --name]}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display the current primary group identity as a number.", "cmd": "id {{[-g|--group]}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display all groups the current user belongs to.", "cmd": "id {{[-Gn|--groups --name]}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display an arbitrary user's ID (UID), group ID (GID), and groups to which they belong.", "cmd": "id {{username}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Skip name lookup and specify the UID number explicitly.", "cmd": "id +{{uid_number}}", "category": "single", "utility": "id", "source": "tldr"}, {"nl": "Display RCS identification strings from `stdin`.", "cmd": "cat {{path/to/file}} | ident", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Display details of all interfaces, including disabled interfaces.", "cmd": "ifconfig -a", "category": "single", "utility": "ifconfig", "source": "tldr"}, {"nl": "View the current `$IFS` value.", "cmd": "echo \"$IFS\"", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "Pretty-print JSON or JSON-Lines data from `stdin` to `stdout`.", "cmd": "cat {{file.json}} | jello", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Output a schema of JSON or JSON Lines data from `stdin` to `stdout` (useful for grep).", "cmd": "cat {{file.json}} | jello -s", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Output all elements from arrays (or all the values from objects) in JSON or JSON-Lines data from `stdin` to `stdout`.", "cmd": "cat {{file.json}} | jello -l", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Output the first element in JSON or JSON-Lines data from `stdin` to `stdout`.", "cmd": "cat {{file.json}} | jello _[0]", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Output the value of multiple keys as a new JSON object (assuming the input JSON has the keys `key_name1` and `key_name2`).", "cmd": "cat {{file.json}} | jello '{{{\"key1\": _.key_name1, \"key2\": _.key_name2, ...}}}'", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Read JSON from `stdin`.", "cmd": "cat {{path/to/file.json}} | jless", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Show status of all jobs.", "cmd": "jobs", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Show status and process IDs of all jobs.", "cmd": "jobs -l", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Show process IDs of all jobs.", "cmd": "jobs -p", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Join two files on the first (default) field.", "cmd": "join {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "join", "source": "tldr"}, {"nl": "Join two files using a comma (instead of a space) as the field separator.", "cmd": "join -t ',' {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "join", "source": "tldr"}, {"nl": "Join field3 of file1 with field1 of file2.", "cmd": "join -1 {{3}} -2 {{1}} {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "join", "source": "tldr"}, {"nl": "Produce a line for each unpairable line for file1.", "cmd": "join -a {{1}} {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "join", "source": "tldr"}, {"nl": "Join a file from `stdin`.", "cmd": "cat {{path/to/file1}} | join - {{path/to/file2}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Execute a specific expression only using the `jq` binary (print a colored and formatted JSON output).", "cmd": "jq '.' {{path/to/file.json}}", "category": "single", "utility": "jq", "source": "tldr"}, {"nl": "Print a table from JSON or JSON Lines input.", "cmd": "cat {{file.json}} | jtbl", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print a table and specify the column width for wrapping.", "cmd": "cat {{file.json}} | jtbl --cols={{width}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Terminate a program using the default SIGTERM (terminate) signal.", "cmd": "kill {{process_id}}", "category": "single", "utility": "kill", "source": "tldr"}, {"nl": "List available signal names (to be used without the `SIG` prefix).", "cmd": "kill -l", "category": "single", "utility": "kill", "source": "tldr"}, {"nl": "Send a `SIGUSR1` signal to all processes with the given GID (group id).", "cmd": "kill -SIGUSR1 -{{group_id}}", "category": "single", "utility": "kill", "source": "tldr"}, {"nl": "Terminate a process using the default SIGTERM (terminate) signal.", "cmd": "killall {{process_name}}", "category": "single", "utility": "killall", "source": "tldr"}, {"nl": "Terminate a process using the SIGINT (interrupt) signal, which is the same signal sent by pressing `<Ctrl c>`.", "cmd": "killall -INT {{process_name}}", "category": "single", "utility": "killall", "source": "tldr"}, {"nl": "Force kill a process.", "cmd": "killall -KILL {{process_name}}", "category": "single", "utility": "killall", "source": "tldr"}, {"nl": "Read an IR file from `stdin` and assemble it.", "cmd": "cat {{path/to/source.ll}} | llvm-as -o {{path/to/out.bc}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Read a Bitcode file from `stdin` and analyze it.", "cmd": "cat {{path/to/file.bc}} | llvm-bcanalyzer", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Create a hard link to a file.", "cmd": "ln /{{path/to/file}} {{path/to/hardlink}}", "category": "single", "utility": "ln", "source": "tldr"}, {"nl": "Print the output of a command to the default printer (see `lpstat` command).", "cmd": "echo \"test\" | lp", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "List files one per line.", "cmd": "ls -1", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Only list directories.", "cmd": "ls {{[-d|--directory]}} */", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Find the processes that have a given file open.", "cmd": "lsof {{path/to/file}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "Find the process that opened a local internet port.", "cmd": "lsof -i :{{port}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "Only output the process ID (PID).", "cmd": "lsof -t {{path/to/file}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "List files opened by the given user.", "cmd": "lsof -u {{username}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "List files opened by the given command or process.", "cmd": "lsof -c {{process_or_command_name}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "List open files in a directory.", "cmd": "lsof +D {{path/to/directory}}", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "Find the process that is listening on a local IPv6 TCP port and don't convert network or port numbers.", "cmd": "lsof -i6TCP:{{port}} -sTCP:LISTEN -n -P", "category": "single", "utility": "lsof", "source": "tldr"}, {"nl": "Package and compress a directory and its contents.", "cmd": "tar cvf - {{path/to/directory}} | lz4 - {{dir.tar.lz4}}", "category": "pipeline", "utility": "tar", "source": "tldr"}, {"nl": "Calculate the MD5 checksum for one or more files.", "cmd": "md5sum {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "md5sum", "source": "tldr"}, {"nl": "Calculate and save the list of MD5 checksums to a file.", "cmd": "md5sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.md5}}", "category": "single", "utility": "md5sum", "source": "tldr"}, {"nl": "Create specific directories.", "cmd": "mkdir {{path/to/directory1 path/to/directory2 ...}}", "category": "single", "utility": "mkdir", "source": "tldr"}, {"nl": "Receive data through a named pipe.", "cmd": "cat {{path/to/pipe}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Convert a graph using `stdin` and `stdout`.", "cmd": "cat {{input.mm}} | mm2gv > {{output.gv}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Traceroute to a host and continuously ping all intermediary hops.", "cmd": "mtr {{example.com}}", "category": "single", "utility": "mtr", "source": "tldr"}, {"nl": "Generate output after pinging each hop 10 times.", "cmd": "mtr {{[-w|--report-wide]}} {{example.com}}", "category": "single", "utility": "mtr", "source": "tldr"}, {"nl": "Force IPv4 or IPv6.", "cmd": "mtr -4 {{example.com}}", "category": "single", "utility": "mtr", "source": "tldr"}, {"nl": "Display both IP address and reverse DNS name.", "cmd": "mtr {{[-b|--show-ips]}} {{example.com}}", "category": "single", "utility": "mtr", "source": "tldr"}, {"nl": "Rename a file or directory when the target is not an existing directory.", "cmd": "mv {{path/to/source}} {{path/to/target}}", "category": "single", "utility": "mv", "source": "tldr"}, {"nl": "Move a file or directory into an existing directory.", "cmd": "mv {{path/to/source}} {{path/to/existing_directory}}", "category": "single", "utility": "mv", "source": "tldr"}, {"nl": "Move multiple files into an existing directory, keeping the filenames unchanged.", "cmd": "mv {{path/to/source1 path/to/source2 ...}} {{path/to/existing_directory}}", "category": "single", "utility": "mv", "source": "tldr"}, {"nl": "Start a [l]istener on the specified TCP [p]ort and send a file into it.", "cmd": "nc < {{filename}} -l -p {{port}}", "category": "single", "utility": "nc", "source": "tldr"}, {"nl": "Connect to a target listener on the specified port and receive a file from it.", "cmd": "nc {{host}} {{port}} > {{received_filename}}", "category": "single", "utility": "nc", "source": "tldr"}, {"nl": "Scan the open TCP ports of a specified host.", "cmd": "nc -v -z -w {{timeout_in_seconds}} {{host}} {{start_port}}-{{end_port}}", "category": "single", "utility": "nc", "source": "tldr"}, {"nl": "Act as a proxy and forward data from a local TCP port to the given remote host.", "cmd": "nc -l -p {{local_port}} | nc {{host}} {{remote_port}}", "category": "pipeline", "utility": "nc", "source": "tldr"}, {"nl": "Send an HTTP GET request.", "cmd": "echo -e \"GET / HTTP/1.1\\nHost: {{host}}\\n\\n\" | nc {{host}} 80", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Analyze the current working directory.", "cmd": "ncdu", "category": "single", "utility": "ncdu", "source": "tldr"}, {"nl": "Analyze a given directory.", "cmd": "ncdu {{path/to/directory}}", "category": "single", "utility": "ncdu", "source": "tldr"}, {"nl": "Save results to a file.", "cmd": "ncdu -o {{path/to/file}}", "category": "single", "utility": "ncdu", "source": "tldr"}, {"nl": "Exclude files that match a pattern, argument can be given multiple times to add more patterns.", "cmd": "ncdu --exclude '{{*.txt}}'", "category": "single", "utility": "ncdu", "source": "tldr"}, {"nl": "List routes and do not resolve IP addresses to hostnames.", "cmd": "netstat {{[-rn|--route --numeric]}}", "category": "single", "utility": "netstat", "source": "tldr"}, {"nl": "Alternatively, add feeds manually.", "cmd": "echo {{http://example.com/path/to/feed}} >> \"${HOME}/.newsboat/urls\"", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "Print the current niceness value.", "cmd": "nice", "category": "single", "utility": "nice", "source": "tldr"}, {"nl": "Increment the current niceness value by 10.", "cmd": "nice nice", "category": "single", "utility": "nice", "source": "tldr"}, {"nl": "Number non-blank lines in a file.", "cmd": "nl {{path/to/file}}", "category": "single", "utility": "nl", "source": "tldr"}, {"nl": "Number only the [b]ody lines that match a basic `regex` (BRE) [p]attern.", "cmd": "nl -b p'FooBar[0-9]' {{path/to/file}}", "category": "single", "utility": "nl", "source": "tldr"}, {"nl": "Specify the line numbering's [w]idth (6 by default).", "cmd": "nl -w {{col_width}} {{path/to/file}}", "category": "single", "utility": "nl", "source": "tldr"}, {"nl": "Query your system's default name server for an IP address (A record) of the domain.", "cmd": "nslookup {{example.com}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query a given name server for a NS record of the domain.", "cmd": "nslookup -type=NS {{example.com}} {{8.8.8.8}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query for a reverse lookup (PTR record) of an IP address.", "cmd": "nslookup -type=PTR {{54.240.162.118}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query for ANY available records using TCP protocol.", "cmd": "nslookup -vc -type=ANY {{example.com}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query a given name server for the whole zone file (zone transfer) of the domain using TCP protocol.", "cmd": "nslookup -vc -type=AXFR {{example.com}} {{name_server}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query for a mail server (MX record) of the domain, showing details of the transaction.", "cmd": "nslookup -type=MX -debug {{example.com}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Query a given name server on a specific port number for a TXT record of the domain.", "cmd": "nslookup -port={{port_number}} -type=TXT {{example.com}} {{name_server}}", "category": "single", "utility": "nslookup", "source": "tldr"}, {"nl": "Convert 5th field (1-indexed) to IEC Units without converting header.", "cmd": "ls -l | numfmt --header=1 --field 5 --to iec", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`.", "cmd": "od {{path/to/file}}", "category": "single", "utility": "od", "source": "tldr"}, {"nl": "Terminate the connection that is running in the background.", "cmd": "sudo killall -SIGINT openconnect", "category": "single", "utility": "killall", "source": "tldr"}, {"nl": "List site-wide script library.", "cmd": "ls /usr/local/share/openocd/scripts", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Calculate the SHA256 digest for a file, saving the result to a specific file.", "cmd": "openssl dgst -sha256 -binary -out {{output_file}} {{input_file}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Sign a file using and ECDSA key.", "cmd": "openssl dgst -sign {{private_key_file}} -sha256 -out {{output_file}} {{input_file}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Verify an ECDSA signature.", "cmd": "openssl dgst -verify {{public_key_file}} -signature {{signature_file}} {{signature_message_file}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate an RSA private key of 2048 bits to `stdout`.", "cmd": "openssl genrsa", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Save an RSA private key of an arbitrary number of bits to the output file.", "cmd": "openssl genrsa -out {{output_file.key}} {{1234}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate a 2048bit prime number and display it in hexadecimal.", "cmd": "openssl prime -generate -bits 2048 -hex", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Check if a given number is prime.", "cmd": "openssl prime {{number}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate an 8-byte (16 characters) hex string and write it to `stdout`.", "cmd": "openssl rand -hex 8", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate 20 random bytes encoded in base64.", "cmd": "openssl rand -base64 20", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate random bytes and write them to a file (without encoding).", "cmd": "openssl rand -out {{path/to/file}} {{length}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate a certificate signing request to be sent to a certificate authority.", "cmd": "openssl req -new -sha256 -key {{filename.key}} -out {{filename.csr}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Benchmark all available algorithms.", "cmd": "openssl speed", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Benchmark the most common algorithms.", "cmd": "openssl speed {{md5 sha1 sha256 aes rsa}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Benchmark algorithms for a specific duration (in seconds).", "cmd": "openssl speed -seconds {{10}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Benchmark using wall-clock time instead of CPU user time.", "cmd": "openssl speed -elapsed", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Output in machine readable format.", "cmd": "openssl speed -mr", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Benchmark multiple algorithms in parallel using all available CPU cores.", "cmd": "openssl speed -multi $(nproc)", "category": "pipeline", "utility": "openssl", "source": "tldr"}, {"nl": "Generate a SHA-512 timestamp request of a specific file and output to `file.tsq`.", "cmd": "openssl ts -query -data {{path/to/file}} -sha512 -out {{path/to/file.tsq}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Check the date and metadata of a specific timestamp response file.", "cmd": "openssl ts -reply -in {{path/to/file.tsr}} -text", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Verify a timestamp request file and a timestamp response file from the server with an SSL certificate file.", "cmd": "openssl ts -verify -in {{path/to/file.tsr}} -queryfile {{path/to/file.tsq}} -partial_chain -CAfile {{path/to/cert.pem}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Create a timestamp response for request using key and signing certificate and output it to `file.tsr`.", "cmd": "openssl ts -reply -queryfile {{path/to/file.tsq}} -inkey {{path/to/tsakey.pem}} -signer tsacert.pem -out {{path/to/file.tsr}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Display certificate information.", "cmd": "openssl x509 -in {{filename.crt}} -noout -text", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Display a certificate's expiration date.", "cmd": "openssl x509 -enddate -noout -in {{filename.pem}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Store a certificate's public key in a file.", "cmd": "openssl x509 -in {{certificate_file}} -noout -pubkey -out {{output_file}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate the corresponding public key from the private key `private.key` using `rsa`.", "cmd": "openssl rsa -in {{path/to/private.key}} -pubout -out {{path/to/public.key}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate a self-signed certificate valid for a specified number of days (365).", "cmd": "openssl req -new -x509 -key {{path/to/private.key}} -out {{path/to/certificate.crt}} -days 365", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Check certificate details.", "cmd": "openssl x509 -in {{path/to/certificate.crt}} -text -noout", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Generate a certificate signing request (CSR).", "cmd": "openssl req -new -key {{path/to/private.key}} -out {{path/to/request.csr}}", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Display help.", "cmd": "openssl help", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Display version.", "cmd": "openssl version", "category": "single", "utility": "openssl", "source": "tldr"}, {"nl": "Merge two files side by side, each in its column, using `TAB` as delimiter.", "cmd": "paste {{path/to/file1}} {{path/to/file2}}", "category": "single", "utility": "paste", "source": "tldr"}, {"nl": "Start `peco` on all files in the specified directory.", "cmd": "find {{path/to/directory}} -type f | peco", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Start `peco` for running processes.", "cmd": "ps aux | peco", "category": "pipeline", "utility": "ps", "source": "tldr"}, {"nl": "Return PIDs of any running processes with a matching command string.", "cmd": "pgrep {{process_name}}", "category": "single", "utility": "pgrep", "source": "tldr"}, {"nl": "Print the process name in addition to the PID ([l]ong output).", "cmd": "pgrep -l {{process_name}}", "category": "single", "utility": "pgrep", "source": "tldr"}, {"nl": "Print the PID together with the [f]ull argument [l]ist for each match.", "cmd": "pgrep -fl \"{{process_name}}\"", "category": "single", "utility": "pgrep", "source": "tldr"}, {"nl": "Search for processes run by a specific [u]ser (effective UID).", "cmd": "pgrep -u {{username}} {{process_name}}", "category": "single", "utility": "pgrep", "source": "tldr"}, {"nl": "Select only the [n]ewest (most recently started) matching process.", "cmd": "pgrep -n {{process_name}}", "category": "single", "utility": "pgrep", "source": "tldr"}, {"nl": "Compress a directory using tar.", "cmd": "tar cf - {{path/to/directory}} | pigz > {{path/to/file.tar.gz}}", "category": "pipeline", "utility": "tar", "source": "tldr"}, {"nl": "Ping a host with IP `10.0.0.1` (Note: `10.0.0.1` can be shortened to `10.1`).", "cmd": "ping 10.0.0.1", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping a host only a specific number of times.", "cmd": "ping -c {{count}} {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping host, specifying the interval in seconds between requests (default is 1 second).", "cmd": "ping -i {{seconds}} {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping host without trying to lookup symbolic names for addresses.", "cmd": "ping -n {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping host and ring the bell when a packet is received (if your terminal supports it).", "cmd": "ping -a {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Also display a message if no response was received.", "cmd": "ping -O {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping a host with specific [c]ount of pings, per-packet time to [W]ait for a response, and total [w]ait time limit of the entire ping run.", "cmd": "ping -c {{count}} -W {{seconds}} -w {{seconds}} {{host}}", "category": "single", "utility": "ping", "source": "tldr"}, {"nl": "Ping a host.", "cmd": "ping6 {{host}}", "category": "single", "utility": "ping6", "source": "tldr"}, {"nl": "Ping a host only a specific number of times.", "cmd": "ping6 -c {{count}} {{host}}", "category": "single", "utility": "ping6", "source": "tldr"}, {"nl": "Ping a host, specifying the interval in seconds between requests (default is 1 second).", "cmd": "ping6 -i {{seconds}} {{host}}", "category": "single", "utility": "ping6", "source": "tldr"}, {"nl": "Ping a host without trying to lookup symbolic names for addresses.", "cmd": "ping6 -n {{host}}", "category": "single", "utility": "ping6", "source": "tldr"}, {"nl": "Ping a host and ring the bell when a packet is received (if your terminal supports it).", "cmd": "ping6 -a {{host}}", "category": "single", "utility": "ping6", "source": "tldr"}, {"nl": "Speak twice as fast, with huge gaps between sentences.", "cmd": "echo {{Speaking twice the speed. With added drama!}} | piper -m {{file.onnx}} --length_scale {{0.5}} --sentence_silence {{2}} -f {{drama.wav}}", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Kill all processes which match.", "cmd": "pkill \"{{process_name}}\"", "category": "single", "utility": "pkill", "source": "tldr"}, {"nl": "Force kill matching processes (can't be blocked).", "cmd": "pkill -9 \"{{process_name}}\"", "category": "single", "utility": "pkill", "source": "tldr"}, {"nl": "Send SIGUSR1 signal to processes which match.", "cmd": "pkill -USR1 \"{{process_name}}\"", "category": "single", "utility": "pkill", "source": "tldr"}, {"nl": "Receive an image from `stdin` and display detailed information.", "cmd": "cat {{path/to/image.png}} | pngcheck -cvt", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print multiple files with a default header and footer.", "cmd": "pr {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "pr", "source": "tldr"}, {"nl": "Print, beginning at page 2 up to page 5, with a given page length (including header and footer).", "cmd": "pr +2:5 {{[-l|--length]}} {{page_length}} {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "pr", "source": "tldr"}, {"nl": "Convert numeric bytes value from `stdin` to a human-readable string.", "cmd": "echo {{1337}} | pretty-bytes", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Display key-value pairs of all environment variables.", "cmd": "printenv", "category": "single", "utility": "printenv", "source": "tldr"}, {"nl": "Print an integer in bold blue.", "cmd": "printf \"{{\\e[1;34m%.3d\\e[0m\\n}}\" {{42}}", "category": "single", "utility": "printf", "source": "tldr"}, {"nl": "Print a float number with the Unicode Euro sign.", "cmd": "printf \"{{\\u20AC %.2f\\n}}\" {{123.4}}", "category": "single", "utility": "printf", "source": "tldr"}, {"nl": "Pass Prometheus metrics over `stdin` to check them for consistency and correctness.", "cmd": "curl --silent {{http://example.com:9090/metrics/}} | promtool check metrics", "category": "pipeline", "utility": "curl", "source": "tldr"}, {"nl": "List all running processes.", "cmd": "ps aux", "category": "single", "utility": "ps", "source": "tldr"}, {"nl": "List all running processes including the full command string.", "cmd": "ps auxww", "category": "single", "utility": "ps", "source": "tldr"}, {"nl": "Transform a raw HTML file into a cleaned, indented, and colored format.", "cmd": "cat {{index.html}} | pup --color", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Print the contents of the file and display a progress bar.", "cmd": "pv {{path/to/file}}", "category": "single", "utility": "pv", "source": "tldr"}, {"nl": "Read an erroneous file, skip errors as `dd conv=sync,noerror` would.", "cmd": "pv {{[-EE|--skip-errors --skip-errors]}} {{path/to/faulty_media}} > {{path/to/image.img}}", "category": "single", "utility": "pv", "source": "tldr"}, {"nl": "Calculate hash (MD5, SHA1, SHA256, etc) of a large file and show progress.", "cmd": "pv {{path/to/file}} | {{sha256sum}}", "category": "pipeline", "utility": "pv", "source": "tldr"}, {"nl": "[Interactive] Dump raw bytes of current block to a file.", "cmd": "pr > {{path/to/file.bin}}", "category": "single", "utility": "pr", "source": "tldr"}, {"nl": "Get the actual file to which the symlink points.", "cmd": "readlink {{path/to/file}}", "category": "single", "utility": "readlink", "source": "tldr"}, {"nl": "Display the absolute path for a file or directory.", "cmd": "realpath {{path/to/file_or_directory}}", "category": "single", "utility": "realpath", "source": "tldr"}, {"nl": "Connect to the local server.", "cmd": "redis-cli", "category": "single", "utility": "redis-cli", "source": "tldr"}, {"nl": "Connect to a remote server on the default port (6379).", "cmd": "redis-cli -h {{host}}", "category": "single", "utility": "redis-cli", "source": "tldr"}, {"nl": "Connect to a remote server specifying a port number.", "cmd": "redis-cli -h {{host}} -p {{port}}", "category": "single", "utility": "redis-cli", "source": "tldr"}, {"nl": "Connect to the local cluster.", "cmd": "redis-cli -c", "category": "single", "utility": "redis-cli", "source": "tldr"}, {"nl": "Increase/decrease the priority of all processes that belong to a process [g]roup.", "cmd": "renice -n {{5}} -g {{process_group}}", "category": "single", "utility": "renice", "source": "tldr"}, {"nl": "Recursively search current directory for a pattern (`regex`).", "cmd": "rg {{pattern}}", "category": "single", "utility": "rg", "source": "tldr"}, {"nl": "Recursively search for a pattern in a file or directory.", "cmd": "rg {{pattern}} {{path/to/file_or_directory}}", "category": "single", "utility": "rg", "source": "tldr"}, {"nl": "Include hidden files and entries listed in `.gitignore`.", "cmd": "rg {{[-.|--hidden]}} --no-ignore {{pattern}}", "category": "single", "utility": "rg", "source": "tldr"}, {"nl": "Recursively list filenames in the current directory that match a pattern.", "cmd": "rg --files | rg {{pattern}}", "category": "pipeline", "utility": "rg", "source": "tldr"}, {"nl": "Only list matched files (useful when piping to other commands).", "cmd": "rg {{[-l|--files-with-matches]}} {{pattern}}", "category": "single", "utility": "rg", "source": "tldr"}, {"nl": "Remove specific directories.", "cmd": "rmdir {{path/to/directory1 path/to/directory2 ...}}", "category": "single", "utility": "rmdir", "source": "tldr"}, {"nl": "Clean a directory of empty directories.", "cmd": "rmdir *", "category": "single", "utility": "rmdir", "source": "tldr"}, {"nl": "Transfer a file (use `--dry-run` to simulate the transfer).", "cmd": "rsync {{path/to/source}} {{path/to/destination}}", "category": "single", "utility": "rsync", "source": "tldr"}, {"nl": "Use archive mode, resolve symlinks, and skip files that are newer on the destination.", "cmd": "rsync {{[-auL|--archive --update --copy-links]}} {{path/to/source}} {{path/to/destination}}", "category": "single", "utility": "rsync", "source": "tldr"}, {"nl": "Shut down runit.", "cmd": "kill --CONT {{runit_pid}}", "category": "single", "utility": "kill", "source": "tldr"}, {"nl": "Copy a local file to a remote host.", "cmd": "scp {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Use a specific port when connecting to the remote host.", "cmd": "scp -P {{port}} {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Copy a file from a remote host to a local directory.", "cmd": "scp {{remote_host}}:{{path/to/remote_file}} {{path/to/local_directory}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Recursively copy the contents of a directory from a remote host to a local directory.", "cmd": "scp -r {{remote_host}}:{{path/to/remote_directory}} {{path/to/local_directory}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Copy a file between two remote hosts transferring through the local host.", "cmd": "scp -3 {{host1}}:{{path/to/remote_file}} {{host2}}:{{path/to/remote_directory}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Use a specific username when connecting to the remote host.", "cmd": "scp {{path/to/local_file}} {{remote_username}}@{{remote_host}}:{{path/to/remote_directory}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Use a specific SSH private key for authentication with the remote host.", "cmd": "scp -i {{~/.ssh/private_key}} {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Use a specific proxy when connecting to the remote host.", "cmd": "scp -J {{proxy_username}}@{{proxy_host}} {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}", "category": "single", "utility": "scp", "source": "tldr"}, {"nl": "Print a sequence from 1 to 10.", "cmd": "seq 10", "category": "single", "utility": "seq", "source": "tldr"}, {"nl": "Print a sequence from 10 to 20.", "cmd": "seq 10 20", "category": "single", "utility": "seq", "source": "tldr"}, {"nl": "Print every 3rd number from 5 to 20.", "cmd": "seq 5 3 20", "category": "single", "utility": "seq", "source": "tldr"}, {"nl": "Describe ANSI escape sequences from a string.", "cmd": "printf \"{{\\x1b[38;5;4mCiao, \\x1b[1;7mBaby.\\x1b[0m\\n}}\" | sequin", "category": "pipeline", "utility": "printf", "source": "tldr"}, {"nl": "Inspect colorized output from another command (e.g., `ls`).", "cmd": "ls -l --color=always | sequin", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Examine a file containing ANSI sequences (e.g., a TUI golden file).", "cmd": "cat {{path/to/file.golden}} | sequin", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Connect using a predefined host (in `~/.ssh/config`).", "cmd": "sftp {{host}}", "category": "single", "utility": "sftp", "source": "tldr"}, {"nl": "[Interactive] Get a list of files on the remote machine.", "cmd": "ls", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Calculate the SHA1 checksum for one or more files.", "cmd": "sha1sum {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "sha1sum", "source": "tldr"}, {"nl": "Calculate and save the list of SHA1 checksums to a file.", "cmd": "sha1sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha1}}", "category": "single", "utility": "sha1sum", "source": "tldr"}, {"nl": "Calculate the SHA256 checksum for one or more files.", "cmd": "sha256sum {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "sha256sum", "source": "tldr"}, {"nl": "Calculate and save the list of SHA256 checksums to a file.", "cmd": "sha256sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha256}}", "category": "single", "utility": "sha256sum", "source": "tldr"}, {"nl": "Calculate the SHA512 checksum for one or more files.", "cmd": "sha512sum {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "sha512sum", "source": "tldr"}, {"nl": "Calculate and save the list of SHA512 checksums to a file.", "cmd": "sha512sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha512}}", "category": "single", "utility": "sha512sum", "source": "tldr"}, {"nl": "Randomize the order of lines in a file and output the result.", "cmd": "shuf {{path/to/file}}", "category": "single", "utility": "shuf", "source": "tldr"}, {"nl": "Only output the first 5 entries of the result.", "cmd": "shuf {{[-n|--head-count]}} 5 {{path/to/file}}", "category": "single", "utility": "shuf", "source": "tldr"}, {"nl": "Start `skim` on all files in the specified directory.", "cmd": "find {{path/to/directory}} -type f | sk", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Start `skim` for running processes.", "cmd": "ps aux | sk", "category": "pipeline", "utility": "ps", "source": "tldr"}, {"nl": "Select multiple files with `<Shift Tab>` and write to a file.", "cmd": "find {{path/to/directory}} -type f | sk --multi > {{path/to/file}}", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Delay in seconds.", "cmd": "sleep {{seconds}}", "category": "single", "utility": "sleep", "source": "tldr"}, {"nl": "Show the difference between two `sops` files.", "cmd": "diff <(sops -d {{path/to/secret1.enc.yaml}}) <(sops -d {{path/to/secret2.enc.yaml}})", "category": "single", "utility": "diff", "source": "tldr"}, {"nl": "Sort a file in ascending order.", "cmd": "sort {{path/to/file}}", "category": "single", "utility": "sort", "source": "tldr"}, {"nl": "Sort a file using numeric rather than alphabetic order.", "cmd": "sort {{[-n|--numeric-sort]}} {{path/to/file}}", "category": "single", "utility": "sort", "source": "tldr"}, {"nl": "Split a file, each split having 10 lines (except the last split).", "cmd": "split {{[-l|--lines]}} 10 {{path/to/file}}", "category": "single", "utility": "split", "source": "tldr"}, {"nl": "Split a file into 5 files. File is split such that each split has same size (except the last split).", "cmd": "split {{[-n|--number]}} 5 {{path/to/file}}", "category": "single", "utility": "split", "source": "tldr"}, {"nl": "Append file content to the source file.", "cmd": "cat {{path/to/file}} | sponge -a {{path/to/file}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Start an interactive shell with a new database.", "cmd": "sqlite3", "category": "single", "utility": "sqlite3", "source": "tldr"}, {"nl": "Open an interactive shell against an existing database.", "cmd": "sqlite3 {{path/to/database.sqlite3}}", "category": "single", "utility": "sqlite3", "source": "tldr"}, {"nl": "Copy your keys to the remote machine.", "cmd": "ssh-copy-id {{username}}@{{remote_host}}", "category": "single", "utility": "ssh-copy-id", "source": "tldr"}, {"nl": "Copy the given public key to the remote.", "cmd": "ssh-copy-id -i {{path/to/certificate}} {{username}}@{{remote_host}}", "category": "single", "utility": "ssh-copy-id", "source": "tldr"}, {"nl": "Copy the given public key to the remote with specific port.", "cmd": "ssh-copy-id -i {{path/to/certificate}} -p {{port}} {{username}}@{{remote_host}}", "category": "single", "utility": "ssh-copy-id", "source": "tldr"}, {"nl": "Generate a key interactively.", "cmd": "ssh-keygen", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Generate an ed25519 key with 32 key derivation function rounds and save the key to a specific file.", "cmd": "ssh-keygen -f {{~/.ssh/filename}} -t ed25519 -a 32", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Generate an RSA 4096-bit key with email as a comment.", "cmd": "ssh-keygen -t rsa -b 4096 -C \"{{comment|email}}\"", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Remove the keys of a host from the `known_hosts` file (useful when a known host has a new key).", "cmd": "ssh-keygen -R {{remote_host}}", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Retrieve the fingerprint of a key in MD5 Hex.", "cmd": "ssh-keygen -f {{~/.ssh/filename}} -l -E md5", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Change the password of a key.", "cmd": "ssh-keygen -f {{~/.ssh/filename}} -p", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Change the type of the key format (for example from OPENSSH format to PEM), the file will be rewritten in-place.", "cmd": "ssh-keygen -f {{~/.ssh/OpenSSH_private_key}} -p -m PEM", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Retrieve public key from private key.", "cmd": "ssh-keygen -f {{~/.ssh/OpenSSH_private_key}} -y", "category": "single", "utility": "ssh-keygen", "source": "tldr"}, {"nl": "Connect to a remote server.", "cmd": "ssh {{username}}@{{remote_host}}", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "Connect to a remote server with a specific [i]dentity (private key).", "cmd": "ssh {{username}}@{{remote_host}} -i {{path/to/key_file}}", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "Connect to a remote server with IP `10.0.0.1` and using a specific [p]ort (Note: `10.0.0.1` can be shortened to `10.1`).", "cmd": "ssh {{username}}@10.0.0.1 -p {{2222}}", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "SSH tunneling: [D]ynamic port forwarding (SOCKS proxy on `localhost:1080`).", "cmd": "ssh {{username}}@{{remote_host}} -D {{1080}}", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "SSH tunneling: Forward a specific port (`localhost:9999` to `example.org:80`) along with disabling pseudo-[T]ty allocation and executio[N] of remote commands.", "cmd": "ssh {{username}}@{{remote_host}} -L {{9999}}:{{example.org}}:{{80}} -N -T", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "SSH [J]umping: Connect through a jumphost to a remote server (Multiple jump hops may be specified separated by comma characters).", "cmd": "ssh {{username}}@{{remote_host}} -J {{username}}@{{jump_host}}", "category": "single", "utility": "ssh", "source": "tldr"}, {"nl": "Print statistics from `stdin`.", "cmd": "cat {{path/to/file}} | st", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Display properties about a specific file such as size, permissions, creation date, and access date among others.", "cmd": "stat {{path/to/file}}", "category": "single", "utility": "stat", "source": "tldr"}, {"nl": "Display information about the filesystem where a specific file is located.", "cmd": "stat {{[-f|--file-system]}} {{path/to/file}}", "category": "single", "utility": "stat", "source": "tldr"}, {"nl": "Print all strings in a binary.", "cmd": "strings {{path/to/file}}", "category": "single", "utility": "strings", "source": "tldr"}, {"nl": "Convert an SVG from `stdin` to PNG on `stdout`.", "cmd": "cat {{path/to/file.svg}} | svg2png - - > {{path/to/output.png}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Flush all pending write operations on all disks.", "cmd": "sync", "category": "single", "utility": "sync", "source": "tldr"}, {"nl": "Flush all pending write operations on a single file to disk.", "cmd": "sync {{path/to/file}}", "category": "single", "utility": "sync", "source": "tldr"}, {"nl": "Concatenate specific files in reversed order.", "cmd": "tac {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "tac", "source": "tldr"}, {"nl": "Show last 10 lines in a file.", "cmd": "tail {{path/to/file}}", "category": "single", "utility": "tail", "source": "tldr"}, {"nl": "Show last 10 lines of multiple files.", "cmd": "tail {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "tail", "source": "tldr"}, {"nl": "Show last 5 lines in file.", "cmd": "tail {{[-5|--lines 5]}} {{path/to/file}}", "category": "single", "utility": "tail", "source": "tldr"}, {"nl": "Print a file from a specific line number.", "cmd": "tail {{[-n|--lines]}} +{{count}} {{path/to/file}}", "category": "single", "utility": "tail", "source": "tldr"}, {"nl": "[c]reate an archive and write it to a [f]ile.", "cmd": "tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "[c]reate a g[z]ipped archive and write it to a [f]ile.", "cmd": "tar czf {{path/to/target.tar.gz}} {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "[c]reate a g[z]ipped (compressed) archive from a directory using relative paths.", "cmd": "tar czf {{path/to/target.tar.gz}} {{[-C|--directory]}} {{path/to/directory}} .", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely.", "cmd": "tar xvf {{path/to/source.tar[.gz|.bz2|.xz]}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "E[x]tract a (compressed) archive [f]ile into the target directory.", "cmd": "tar xf {{path/to/source.tar[.gz|.bz2|.xz]}} {{[-C|--directory]}} {{path/to/directory}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "[c]reate a compressed archive and write it to a [f]ile, using the file extension to [a]utomatically determine the compression program.", "cmd": "tar caf {{path/to/target.tar.xz}} {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "Lis[t] the contents of a tar [f]ile [v]erbosely.", "cmd": "tar tvf {{path/to/source.tar}}", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "E[x]tract files matching a pattern from an archive [f]ile.", "cmd": "tar xf {{path/to/source.tar}} --wildcards \"{{*.html}}\"", "category": "single", "utility": "tar", "source": "tldr"}, {"nl": "Copy `stdin` to each file, and also to `stdout`.", "cmd": "echo \"example\" | tee {{path/to/file}}", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Format a file read from `stdin` and print to `stdout`.", "cmd": "cat {{path/to/file.tex}} | tex-fmt --stdin", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Pretty-print data piped from `stdin`.", "cmd": "cat {{path/to/file.csv}} | tidy-viewer", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Run `sleep 10` and terminate it after 3 seconds.", "cmd": "timeout 3s sleep 10", "category": "single", "utility": "timeout", "source": "tldr"}, {"nl": "Add a key from `stdin`.", "cmd": "cat {{path/to/key.gpg}} | sudo tlmgr key add -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Create specific files or update their timestamps if they already exist.", "cmd": "touch {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "touch", "source": "tldr"}, {"nl": "Set the timestamp by parsing a string.", "cmd": "touch {{[-d|--date]}} \"{{last year|5 hours|next thursday|nov 14|...}}\" {{path/to/file}}", "category": "single", "utility": "touch", "source": "tldr"}, {"nl": "Create multiple files with an increasing number.", "cmd": "touch {{path/to/file{1..10}}}", "category": "single", "utility": "touch", "source": "tldr"}, {"nl": "Create multiple files with a letter range.", "cmd": "touch {{path/to/file{a..z}}}", "category": "single", "utility": "touch", "source": "tldr"}, {"nl": "Create an archive with tar and create a progress bar (system agnostic, GNU tar uses `stdout` while BSD tar uses `stderr`).", "cmd": "tar vzcf {{path/to/archive.tar.gz}} {{path/to/directory}} 2>&1 | tqdm --total $(find {{path/to/directory}} | wc {{[-l|--lines]}}) --unit files --null", "category": "pipeline", "utility": "tar", "source": "tldr"}, {"nl": "Translate the contents of a file to upper-case.", "cmd": "tr < {{path/to/file}} \"[:lower:]\" \"[:upper:]\"", "category": "single", "utility": "tr", "source": "tldr"}, {"nl": "Traceroute to a host.", "cmd": "traceroute {{example.com}}", "category": "single", "utility": "traceroute", "source": "tldr"}, {"nl": "Disable IP address and host name mapping.", "cmd": "traceroute -n {{example.com}}", "category": "single", "utility": "traceroute", "source": "tldr"}, {"nl": "Specify size in bytes of probing packet.", "cmd": "traceroute {{example.com}} {{42}}", "category": "single", "utility": "traceroute", "source": "tldr"}, {"nl": "Determine the MTU to the destination.", "cmd": "traceroute --mtu {{example.com}}", "category": "single", "utility": "traceroute", "source": "tldr"}, {"nl": "Print files and directories up to `num` levels of depth (where 1 means the current directory).", "cmd": "tree -L {{num}}", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print directories only.", "cmd": "tree -d", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print hidden files too with colorization on.", "cmd": "tree -a -C", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print the tree without indentation lines, showing the full path instead (use `-N` to not escape non-printable characters).", "cmd": "tree -i -f", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print the size of each file and the cumulative size of each directory, in human-readable format.", "cmd": "tree -s -h --du", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print files within the tree hierarchy, using a wildcard (glob) pattern, and pruning out directories that don't contain matching files.", "cmd": "tree -P '{{*.txt}}' --prune", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print directories within the tree hierarchy, using the wildcard (glob) pattern, and pruning out directories that aren't ancestors of the wanted one.", "cmd": "tree -P {{directory_name}} --matchdirs --prune", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Print the tree ignoring the given directories.", "cmd": "tree -I '{{directory_name1|directory_name2}}'", "category": "single", "utility": "tree", "source": "tldr"}, {"nl": "Convert existing timestamps in a text file (eg. a log file) into [r]elative format.", "cmd": "cat {{path/to/file}} | ts -r", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Perform a topological sort consistent with a partial sort per line of input separated by blanks.", "cmd": "tsort {{path/to/file}}", "category": "single", "utility": "tsort", "source": "tldr"}, {"nl": "Perform a topological sort consistent on strings.", "cmd": "echo -e \"{{UI Backend\\nBackend Database\\nDocs UI}}\" | tsort", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Print the file name of this terminal.", "cmd": "tty", "category": "single", "utility": "tty", "source": "tldr"}, {"nl": "Unmount a filesystem, by passing the path to the source it is mounted from.", "cmd": "umount {{path/to/device_file}}", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "Unmount a filesystem, by passing the path to the target where it is mounted.", "cmd": "umount {{path/to/mounted_directory}}", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "Unmount all mounted filesystems (except the `proc` filesystem).", "cmd": "umount -a", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "Print kernel name.", "cmd": "uname", "category": "single", "utility": "uname", "source": "tldr"}, {"nl": "Print system architecture and processor information.", "cmd": "uname {{[-mp|--machine --processor]}}", "category": "single", "utility": "uname", "source": "tldr"}, {"nl": "Display help.", "cmd": "uname --help", "category": "single", "utility": "uname", "source": "tldr"}, {"nl": "Read filenames from `stdin`, and take backups before writing output back to the original filepaths.", "cmd": "find . -name \"*.cpp\" | uncrustify -F - --replace", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Don't make backups (useful if files are under version control).", "cmd": "find . -name \"*.cpp\" | uncrustify -F - --no-backup", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Convert blanks in each file to tabs, writing to `stdout`.", "cmd": "unexpand {{path/to/file}}", "category": "single", "utility": "unexpand", "source": "tldr"}, {"nl": "Convert blanks to tabs, reading from `stdout`.", "cmd": "unexpand", "category": "single", "utility": "unexpand", "source": "tldr"}, {"nl": "Convert only leading sequences of blanks (overrides -a).", "cmd": "unexpand --first-only {{path/to/file}}", "category": "single", "utility": "unexpand", "source": "tldr"}, {"nl": "Display each line once.", "cmd": "sort {{path/to/file}} | uniq", "category": "pipeline", "utility": "sort", "source": "tldr"}, {"nl": "Display number of occurrences of each line along with that line.", "cmd": "sort {{path/to/file}} | uniq {{[-c|--count]}}", "category": "pipeline", "utility": "sort", "source": "tldr"}, {"nl": "Display number of occurrences of each line, sorted by the most frequent.", "cmd": "sort {{path/to/file}} | uniq {{[-c|--count]}} | sort {{[-nr|--numeric-sort --reverse]}}", "category": "pipeline", "utility": "sort", "source": "tldr"}, {"nl": "Compare text after the first 5 characters on each line for uniqueness.", "cmd": "sort {{path/to/file}} | uniq {{[-s|--skip-chars]}} 5", "category": "pipeline", "utility": "sort", "source": "tldr"}, {"nl": "Extract all files/directories from specific archives into the current directory.", "cmd": "unzip {{path/to/archive1.zip path/to/archive2.zip ...}}", "category": "single", "utility": "unzip", "source": "tldr"}, {"nl": "Extract files/directories from archives to a specific path.", "cmd": "unzip {{path/to/archive1.zip path/to/archive2.zip ...}} -d {{path/to/output}}", "category": "single", "utility": "unzip", "source": "tldr"}, {"nl": "Extract files/directories from archives to `stdout` alongside the extracted file names.", "cmd": "unzip -c {{path/to/archive1.zip path/to/archive2.zip ...}}", "category": "single", "utility": "unzip", "source": "tldr"}, {"nl": "List the contents of a specific archive without extracting them.", "cmd": "unzip -l {{path/to/archive}}.zip", "category": "single", "utility": "unzip", "source": "tldr"}, {"nl": "Extract specific files from an archive.", "cmd": "unzip -j {{path/to/archive}}.zip {{path/to/file1_in_archive path/to/file2_in_archive ...}}", "category": "single", "utility": "unzip", "source": "tldr"}, {"nl": "Print current time, uptime, number of logged-in users, and other information.", "cmd": "uptime", "category": "single", "utility": "uptime", "source": "tldr"}, {"nl": "Print logged in usernames.", "cmd": "users", "category": "single", "utility": "users", "source": "tldr"}, {"nl": "Print logged in usernames according to a given file.", "cmd": "users {{/var/log/wmtp}}", "category": "single", "utility": "users", "source": "tldr"}, {"nl": "Check the style from `stdin`, specifying markup format.", "cmd": "cat {{file.md}} | vale --ext=.md", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Display information about all users who are currently logged in.", "cmd": "w", "category": "single", "utility": "w", "source": "tldr"}, {"nl": "Display information about a specific user.", "cmd": "w {{username}}", "category": "single", "utility": "w", "source": "tldr"}, {"nl": "Count all lines in a file.", "cmd": "wc {{[-l|--lines]}} {{path/to/file}}", "category": "single", "utility": "wc", "source": "tldr"}, {"nl": "Count the length of the longest line in number of characters.", "cmd": "wc {{[-L|--max-line-length]}} {{path/to/file}}", "category": "single", "utility": "wc", "source": "tldr"}, {"nl": "Download the contents of a URL to a file (named \"foo\" in this case).", "cmd": "wget {{https://example.com/foo}}", "category": "single", "utility": "wget", "source": "tldr"}, {"nl": "Download all URLs stored in a text file to a specific directory.", "cmd": "wget {{[-P|--directory-prefix]}} {{path/to/directory}} {{[-i|--input-file]}} {{path/to/URLs.txt}}", "category": "single", "utility": "wget", "source": "tldr"}, {"nl": "Display the username, line, and time of all currently logged-in sessions.", "cmd": "who", "category": "single", "utility": "who", "source": "tldr"}, {"nl": "Execute a shellscript, joining every `N` lines into a single call.", "cmd": "echo -e 'a\\nb' | xe -N{{2}} -s 'echo $2 $1'", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Convert an XML document from `stdin` to PYX format.", "cmd": "cat {{path/to/input.xml}} | xml pyx > {{path/to/output.pyx}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Generate a hexdump from a binary file and display the output.", "cmd": "xxd {{input_file}}", "category": "single", "utility": "xxd", "source": "tldr"}, {"nl": "Generate a hexdump from a binary file and save it as a text file.", "cmd": "xxd {{input_file}} {{output_file}}", "category": "single", "utility": "xxd", "source": "tldr"}, {"nl": "Display a more compact output, replacing consecutive zeros (if any) with a star.", "cmd": "xxd {{[-a|-autoskip]}} {{input_file}}", "category": "single", "utility": "xxd", "source": "tldr"}, {"nl": "Display the output in plain mode, without any gaps between the columns.", "cmd": "xxd {{[-p|-postscript]}} {{input_file}}", "category": "single", "utility": "xxd", "source": "tldr"}, {"nl": "Compress a file into XZ format.", "cmd": "xz {{path/to/file}}", "category": "single", "utility": "xz", "source": "tldr"}, {"nl": "Compress a file using the fastest compression.", "cmd": "xz -0 {{path/to/file}}", "category": "single", "utility": "xz", "source": "tldr"}, {"nl": "Compress a file using the best compression.", "cmd": "xz -9 {{path/to/file}}", "category": "single", "utility": "xz", "source": "tldr"}, {"nl": "Execute and print the result of one statement, then exit.", "cmd": "echo \"{{Echo( Deriv(x)Cos(1/x) );}}\" | yacas -p -c /dev/stdin", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Create the necessary files and folders for encryption.", "cmd": "touch {{path/to/encrypt_file}} && mkdir {{path/to/archive_folder}}", "category": "pipeline", "utility": "touch", "source": "tldr"}, {"nl": "Read from `stdin`.", "cmd": "cat {{path/to/file.yaml}} | yamllint -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Repeatedly output `y`.", "cmd": "yes", "category": "single", "utility": "yes", "source": "tldr"}, {"nl": "Repeatedly output a newline to always accept the default option of a prompt.", "cmd": "yes ''", "category": "single", "utility": "yes", "source": "tldr"}, {"nl": "Generate a Go struct from a given XML from `stdin` and display output on `stdout`.", "cmd": "cat {{path/to/input.xml}} | zek", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Generate an example Go program from a given XML from `stdin` and send output to a file.", "cmd": "cat {{path/to/input.xml}} | zek -p -o {{path/to/output.go}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Grep a pattern in a compressed file (case-sensitive).", "cmd": "zgrep {{pattern}} {{path/to/compressed_file}}", "category": "single", "utility": "zgrep", "source": "tldr"}, {"nl": "Output count of lines containing matched pattern in a compressed file.", "cmd": "zgrep {{[-c|--count]}} {{pattern}} {{path/to/compressed_file}}", "category": "single", "utility": "zgrep", "source": "tldr"}, {"nl": "Grep a compressed file for multiple patterns.", "cmd": "zgrep {{[-e|--regexp]}} \"{{pattern_1}}\" {{[-e|--regexp]}} \"{{pattern_2}}\" {{path/to/compressed_file}}", "category": "single", "utility": "zgrep", "source": "tldr"}, {"nl": "Use extended `regex` (supports `?`, `+`, `{}`, `()`, and `|`).", "cmd": "zgrep {{[-E|--extended-regexp]}} {{regex}} {{path/to/file}}", "category": "single", "utility": "zgrep", "source": "tldr"}, {"nl": "Print a specific archive contents.", "cmd": "zip {{[-sf|--split-size --freshen]}} {{path/to/compressed.zip}}", "category": "single", "utility": "zip", "source": "tldr"}, {"nl": "Brace expand sequences.", "cmd": "echo {{{1..3}}} {{{a..c}}}{{{dir1,dir2,dir3}}}", "category": "single", "utility": "echo", "source": "tldr"}, {"nl": "List the current user's home directory contents.", "cmd": "ls ~", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "List the home directory contents of another user.", "cmd": "ls ~{{username}}", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "List the contents of the previous directory you were in.", "cmd": "ls ~-", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Unmount a directory.", "cmd": "sudo umount {{path/to/mount_point}}", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "List all partitions.", "cmd": "sudo blkid", "category": "single", "utility": "blkid", "source": "tldr"}, {"nl": "Write to a file interactively.", "cmd": "cat > {{path/to/file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Number all output lines.", "cmd": "cat {{[-n|--number]}} {{path/to/file}}", "category": "single", "utility": "cat", "source": "tldr"}, {"nl": "Create a subgroup.", "cmd": "mkdir /sys/fs/cgroup/{{group_type}}/{{group_name}}/{{subgroup_name}}", "category": "single", "utility": "mkdir", "source": "tldr"}, {"nl": "Format the output of a command for a 30 characters wide display.", "cmd": "printf \"header1 header2\\nbar foo\\n\" | column {{[-c|--output-width]}} {{30}}", "category": "pipeline", "utility": "printf", "source": "tldr"}, {"nl": "Split a file in two parts, starting the second one at line 10.", "cmd": "csplit {{path/to/file}} 10", "category": "single", "utility": "csplit", "source": "tldr"}, {"nl": "Split a file in three parts, starting the latter parts in lines 7 and 23.", "cmd": "csplit {{path/to/file}} 7 23", "category": "single", "utility": "csplit", "source": "tldr"}, {"nl": "Start a new part at every 5th line (will fail if number of lines is not divisible by 5).", "cmd": "csplit {{path/to/file}} 5 {*}", "category": "single", "utility": "csplit", "source": "tldr"}, {"nl": "Start a new part at every 5th line, ignoring exact-division error.", "cmd": "csplit {{[-k|--keep-files]}} {{path/to/file}} 5 {*}", "category": "single", "utility": "csplit", "source": "tldr"}, {"nl": "Split a file above the first line matching a `regex` pattern.", "cmd": "csplit {{path/to/file}} /{{regex}}/", "category": "single", "utility": "csplit", "source": "tldr"}, {"nl": "Get max, min, mean, and median of a single column of numbers.", "cmd": "seq 3 | datamash max 1 min 1 mean 1 median 1", "category": "pipeline", "utility": "seq", "source": "tldr"}, {"nl": "Get the mean of a single column of float numbers (floats must use \",\" and not \".\").", "cmd": "echo -e '1.0\\n2.5\\n3.1\\n4.3\\n5.6\\n5.7' | tr '.' ',' | datamash mean 1", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Get the mean of a single column of numbers ignoring \"Na\" and \"NaN\" (literal) strings.", "cmd": "echo -e '1\\n2\\nNa\\n3\\nNaN' | datamash --narm mean 1", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "List available releases.", "cmd": "ls /usr/share/debootstrap/scripts/", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Display all filesystems and their disk usage.", "cmd": "df", "category": "single", "utility": "df", "source": "tldr"}, {"nl": "Launch dmenu on a specific monitor.", "cmd": "ls | dmenu -m {{1}}", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Display dmenu at the bottom of the screen.", "cmd": "ls | dmenu -b", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Show kernel messages.", "cmd": "sudo dmesg", "category": "single", "utility": "dmesg", "source": "tldr"}, {"nl": "Show kernel error messages.", "cmd": "sudo dmesg {{[-l|--level]}} err", "category": "single", "utility": "dmesg", "source": "tldr"}, {"nl": "Show kernel messages emitted in the last hour.", "cmd": "sudo dmesg --since \"1 hour ago\"", "category": "single", "utility": "dmesg", "source": "tldr"}, {"nl": "List all mounted filesystems.", "cmd": "findmnt", "category": "single", "utility": "findmnt", "source": "tldr"}, {"nl": "Search for a mountpoint.", "cmd": "findmnt {{/}}", "category": "single", "utility": "findmnt", "source": "tldr"}, {"nl": "Fold lines in a fixed width.", "cmd": "fold {{[-w|--width]}} {{width}} {{path/to/file}}", "category": "single", "utility": "fold", "source": "tldr"}, {"nl": "Display system memory.", "cmd": "free", "category": "single", "utility": "free", "source": "tldr"}, {"nl": "Refresh the output every 2 seconds.", "cmd": "free {{[-s|--seconds]}} 2", "category": "single", "utility": "free", "source": "tldr"}, {"nl": "Get list of all groups.", "cmd": "getent group", "category": "single", "utility": "getent", "source": "tldr"}, {"nl": "See the members of a group.", "cmd": "getent group {{group_name}}", "category": "single", "utility": "getent", "source": "tldr"}, {"nl": "Get list of all services.", "cmd": "getent services", "category": "single", "utility": "getent", "source": "tldr"}, {"nl": "Find a username by UID.", "cmd": "getent passwd 1000", "category": "single", "utility": "getent", "source": "tldr"}, {"nl": "Perform a reverse DNS lookup.", "cmd": "getent hosts {{host}}", "category": "single", "utility": "getent", "source": "tldr"}, {"nl": "Capture a video from the replay buffer.", "cmd": "pkill -SIGUSR1 -f gpu-screen-recorder", "category": "single", "utility": "pkill", "source": "tldr"}, {"nl": "Show first 10 lines in a file.", "cmd": "head {{path/to/file}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Show first 10 lines of multiple files.", "cmd": "head {{path/to/file1 path/to/file2 ...}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Output the first 5 lines of a file.", "cmd": "head {{[-5|--lines 5]}} {{path/to/file}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Output the first few lines of a file.", "cmd": "head {{[-n|--lines]}} {{count}} {{path/to/file}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Output everything but the last few lines of a file.", "cmd": "head {{[-n|--lines]}} -{{count}} {{path/to/file}}", "category": "single", "utility": "head", "source": "tldr"}, {"nl": "Print the hexadecimal representation of a file, replacing duplicate lines by '*'.", "cmd": "hexdump {{path/to/file}}", "category": "single", "utility": "hexdump", "source": "tldr"}, {"nl": "Open multiple images via `stdin`.", "cmd": "find . -type f -name \"{{*.svg}}\" | imv", "category": "pipeline", "utility": "find", "source": "tldr"}, {"nl": "Display a report of CPU and disk statistics since system startup.", "cmd": "iostat", "category": "single", "utility": "iostat", "source": "tldr"}, {"nl": "Display a report of CPU and disk statistics with units converted to megabytes.", "cmd": "iostat -m", "category": "single", "utility": "iostat", "source": "tldr"}, {"nl": "Display disk statistics with disk names (including LVM).", "cmd": "iostat -N", "category": "single", "utility": "iostat", "source": "tldr"}, {"nl": "Display incremental reports of CPU and disk statistics every 2 seconds.", "cmd": "iostat {{2}}", "category": "single", "utility": "iostat", "source": "tldr"}, {"nl": "View jobs spawned by the current shell.", "cmd": "jobs", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "List jobs and their process IDs.", "cmd": "jobs -l", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Display information about jobs with changed status.", "cmd": "jobs -n", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Display only process IDs.", "cmd": "jobs -p", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Display running processes.", "cmd": "jobs -r", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Display stopped processes.", "cmd": "jobs -s", "category": "single", "utility": "jobs", "source": "tldr"}, {"nl": "Show all messages by a specific unit.", "cmd": "journalctl {{[-u|--unit]}} {{unit}}", "category": "single", "utility": "journalctl", "source": "tldr"}, {"nl": "Show logs for a given unit since the last time it started.", "cmd": "journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show --value --property=InvocationID {{unit}})", "category": "pipeline", "utility": "journalctl", "source": "tldr"}, {"nl": "Delete journal logs which are older than 2 days.", "cmd": "journalctl --vacuum-time 2d", "category": "single", "utility": "journalctl", "source": "tldr"}, {"nl": "View last login information (e.g., username, terminal, boot time, kernel) of all users as read from `/var/log/wtmp`.", "cmd": "last", "category": "single", "utility": "last", "source": "tldr"}, {"nl": "List login information of a specific user.", "cmd": "last {{username}}", "category": "single", "utility": "last", "source": "tldr"}, {"nl": "View all logins by a specific user and show the IP address instead of the hostname.", "cmd": "last {{username}} {{[-i|--ip]}}", "category": "single", "utility": "last", "source": "tldr"}, {"nl": "Display the most recent login of all users.", "cmd": "lastlog", "category": "single", "utility": "lastlog", "source": "tldr"}, {"nl": "Display the lastlog record of the specified user.", "cmd": "lastlog --user {{username}}", "category": "single", "utility": "lastlog", "source": "tldr"}, {"nl": "Display records older than 7 days.", "cmd": "lastlog --before 7", "category": "single", "utility": "lastlog", "source": "tldr"}, {"nl": "Display records more recent than 3 days.", "cmd": "lastlog --time 3", "category": "single", "utility": "lastlog", "source": "tldr"}, {"nl": "[Interactive] Rename a file on the remote server.", "cmd": "mv {{original_filename}} {{new_filename}}", "category": "single", "utility": "mv", "source": "tldr"}, {"nl": "List all storage devices in a tree-like format.", "cmd": "lsblk", "category": "single", "utility": "lsblk", "source": "tldr"}, {"nl": "Display information about all CPUs.", "cmd": "lscpu", "category": "single", "utility": "lscpu", "source": "tldr"}, {"nl": "List all currently loaded kernel modules.", "cmd": "lsmod", "category": "single", "utility": "lsmod", "source": "tldr"}, {"nl": "Show a brief list of devices.", "cmd": "lspci", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "Display [v]erbose information (Note: the `-v` flag can be repeated to increase verbosity).", "cmd": "lspci -v", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "Display [k]ernel drivers and modules handling each device.", "cmd": "lspci -k", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "[s]elect a specific device.", "cmd": "lspci -s {{00:18.3}}", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "Dump info in a ([m]achine) readable form.", "cmd": "lspci -vm", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "Show PCI vendor and device codes as both [n]umbers and [n]ames.", "cmd": "lspci -nn", "category": "single", "utility": "lspci", "source": "tldr"}, {"nl": "List all the USB devices available.", "cmd": "lsusb", "category": "single", "utility": "lsusb", "source": "tldr"}, {"nl": "Show all mounted filesystems.", "cmd": "mount", "category": "single", "utility": "mount", "source": "tldr"}, {"nl": "Mount a device to a directory.", "cmd": "mount {{path/to/device_file}} {{path/to/target_directory}}", "category": "single", "utility": "mount", "source": "tldr"}, {"nl": "Create a specific directory if it does not exist and mount a device to it.", "cmd": "mount {{[-m|--mkdir]}} {{path/to/device_file}} {{path/to/target_directory}}", "category": "single", "utility": "mount", "source": "tldr"}, {"nl": "Mount a specific filesystem described in `/etc/fstab` (e.g. `/dev/sda1 /path/to/mount_point ext2 defaults 0 2`).", "cmd": "mount {{path/to/mount_point}}", "category": "single", "utility": "mount", "source": "tldr"}, {"nl": "Play the mp3 from `stdin`.", "cmd": "cat {{file.mp3}} | mpg123 -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Display CPU statistics every 2 seconds.", "cmd": "mpstat {{2}}", "category": "single", "utility": "mpstat", "source": "tldr"}, {"nl": "Display 5 reports, one by one, at 2 second intervals.", "cmd": "mpstat {{2}} {{5}}", "category": "single", "utility": "mpstat", "source": "tldr"}, {"nl": "Display 5 reports, one by one, from a given processor, at 2 second intervals.", "cmd": "mpstat -P {{0}} {{2}} {{5}}", "category": "single", "utility": "mpstat", "source": "tldr"}, {"nl": "Write output of specified file to the specified host on the specified port.", "cmd": "ncat < {{path/to/file}} {{address}} {{port}}", "category": "single", "utility": "ncat", "source": "tldr"}, {"nl": "Connect to an open `ncat` connection over SSL.", "cmd": "ncat --ssl {{host}} {{port}}", "category": "single", "utility": "ncat", "source": "tldr"}, {"nl": "Number only the body lines that match a basic `regex` (BRE) [p]attern.", "cmd": "nl {{[-b|--body-numbering]}} p'FooBar[0-9]' {{path/to/file}}", "category": "single", "utility": "nl", "source": "tldr"}, {"nl": "Specify the line numbering's width (6 by default).", "cmd": "nl {{[-w|--number-width]}} {{col_width}} {{path/to/file}}", "category": "single", "utility": "nl", "source": "tldr"}, {"nl": "Show CPU statistics at a 2 second interval for 10 times.", "cmd": "pidstat {{2}} {{10}}", "category": "single", "utility": "pidstat", "source": "tldr"}, {"nl": "Show page faults and memory utilization.", "cmd": "pidstat -r", "category": "single", "utility": "pidstat", "source": "tldr"}, {"nl": "Show input/output usage per process ID.", "cmd": "pidstat -d", "category": "single", "utility": "pidstat", "source": "tldr"}, {"nl": "View the current security context of a file or directory.", "cmd": "ls {{[-dlZ|--directory -l --context]}} {{path/to/file_or_directory}}", "category": "single", "utility": "ls", "source": "tldr"}, {"nl": "Reverse text typed into terminal.", "cmd": "rev", "category": "single", "utility": "rev", "source": "tldr"}, {"nl": "Reverse the text string \"hello\".", "cmd": "echo \"hello\" | rev", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Reverse an entire file and print to `stdout`.", "cmd": "rev {{path/to/file}}", "category": "single", "utility": "rev", "source": "tldr"}, {"nl": "Report I/O and transfer rate issued to physical devices, one per second (press `<Ctrl c>` to quit).", "cmd": "sar -b {{1}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Report a total of 10 network device statistics, one per 2 seconds.", "cmd": "sar -n DEV {{2}} {{10}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Report CPU utilization, one per 2 seconds.", "cmd": "sar -u ALL {{2}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Report a total of 20 memory utilization statistics, one per second.", "cmd": "sar -r ALL {{1}} {{20}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Report the run queue length and load averages, one per second.", "cmd": "sar -q {{1}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Report paging statistics, one per 5 seconds.", "cmd": "sar -B {{5}}", "category": "single", "utility": "sar", "source": "tldr"}, {"nl": "Delay in [m]inutes. (Other units [d]ay, [h]our, [s]econd, [inf]inity can also be used).", "cmd": "sleep {{minutes}}m", "category": "single", "utility": "sleep", "source": "tldr"}, {"nl": "Delay for 1 [d]ay 3 [h]ours.", "cmd": "sleep 1d 3h", "category": "single", "utility": "sleep", "source": "tldr"}, {"nl": "Display help.", "cmd": "sleep --help", "category": "single", "utility": "sleep", "source": "tldr"}, {"nl": "Read a text file at a specific speed.", "cmd": "cat {{path/to/file.txt}} | speedread -wpm {{250}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Resume from a specific line.", "cmd": "cat {{path/to/file.txt}} | speedread -resume {{5}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Show multiple words at a time.", "cmd": "cat {{path/to/file.txt}} | speedread -multiword", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Create a squashfs filesystem from a `.tar` archive compressed with `gzip`, and [comp]ress the filesystem using a specific algorithm.", "cmd": "zcat {{archive.tar.gz}} | sqfstar -comp {{gzip|lzo|lz4|xz|zstd|lzma}} {{filesystem.squashfs}}", "category": "pipeline", "utility": "zcat", "source": "tldr"}, {"nl": "Show all TCP sockets along with processes connected to a remote SSH port.", "cmd": "ss {{[-pt|--processes --tcp]}} dst :ssh", "category": "single", "utility": "ss", "source": "tldr"}, {"nl": "Show all TCP IPv4 sockets locally connected on the subnet 192.168.0.0/16.", "cmd": "ss {{[-4t|--ipv4 --tcp]}} src 192.168/16", "category": "single", "utility": "ss", "source": "tldr"}, {"nl": "Show swap information.", "cmd": "swapon", "category": "single", "utility": "swapon", "source": "tldr"}, {"nl": "Enable a given swap area.", "cmd": "sudo swapon {{path/to/file}}", "category": "single", "utility": "swapon", "source": "tldr"}, {"nl": "Open a newline-separated list of images, reading filenames from `stdin`.", "cmd": "echo {{path/to/file}} | sxiv -i", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Schedule a suspend after a 5 minute delay.", "cmd": "sleep 300 && systemctl suspend", "category": "pipeline", "utility": "sleep", "source": "tldr"}, {"nl": "Start `top`.", "cmd": "top", "category": "single", "utility": "top", "source": "tldr"}, {"nl": "Unmount a filesystem, by passing the path to the source it is mounted from.", "cmd": "sudo umount {{path/to/device_file}}", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "Unmount a filesystem, by passing the path to the target where it is mounted.", "cmd": "sudo umount {{path/to/mounted_directory}}", "category": "single", "utility": "umount", "source": "tldr"}, {"nl": "Create a self-extracting binary file of a Zip archive.", "cmd": "cat $(which unzipsfx) {{path/to/archive.zip}} > {{filename}} && chmod 755 {{filename}}", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Add a custom certificate (copy it first, then update).", "cmd": "sudo cp {{path/to/certificate.crt}} /usr/local/share/ca-certificates/ && sudo update-ca-certificates", "category": "pipeline", "utility": "cp", "source": "tldr"}, {"nl": "Display virtual memory statistics.", "cmd": "vmstat", "category": "single", "utility": "vmstat", "source": "tldr"}, {"nl": "Display reports every 2 seconds for 5 times.", "cmd": "vmstat 2 5", "category": "single", "utility": "vmstat", "source": "tldr"}, {"nl": "Locate [u]nusual binaries (those that have more or less than one binary on the system).", "cmd": "whereis -u *", "category": "single", "utility": "whereis", "source": "tldr"}, {"nl": "Locate binaries that have [u]nusual [m]anual entries (binaries that have more or less than one manual installed).", "cmd": "whereis -u -m *", "category": "single", "utility": "whereis", "source": "tldr"}, {"nl": "Merge the authorization entries from a specific file into the authorization database.", "cmd": "cat {{path/to/file}} | xauth merge -", "category": "pipeline", "utility": "cat", "source": "tldr"}, {"nl": "Copy the output from a command to the X11 primary selection area (clipboard).", "cmd": "echo 123 | xclip", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Display a cow with output from another command.", "cmd": "ls | xcowsay", "category": "pipeline", "utility": "ls", "source": "tldr"}, {"nl": "Use a command's output as input of the clipboard (equivalent to `<Ctrl c>`).", "cmd": "echo 123 | xsel {{[-ib|--input --clipboard]}}", "category": "pipeline", "utility": "echo", "source": "tldr"}, {"nl": "Use the contents of a file as input of the clipboard.", "cmd": "cat {{path/to/file}} | xsel {{[-ib|--input --clipboard]}}", "category": "pipeline", "utility": "cat", "source": "tldr"}] |