instruction
stringlengths
17
36
input
stringclasses
1 value
output
stringlengths
101
1.77k
What is git-var command
# git var > Prints a Git logical variable's value. See `git config`, which is preferred > over `git var`. More information: https://git-scm.com/docs/git-var. * Print the value of a Git logical variable: `git var {{GIT_AUTHOR_IDENT|GIT_COMMITTER_IDENT|GIT_EDITOR|GIT_PAGER}}` * [l]ist all Git logical variables: `git var -l`
What is make command
# make > Task runner for targets described in Makefile. Mostly used to control the > compilation of an executable from source code. More information: > https://www.gnu.org/software/make/manual/make.html. * Call the first target specified in the Makefile (usually named "all"): `make` * Call a specific target: `make {{target}}` * Call a specific target, executing 4 jobs at a time in parallel: `make -j{{4}} {{target}}` * Use a specific Makefile: `make --file {{path/to/file}}` * Execute make from another directory: `make --directory {{path/to/directory}}` * Force making of a target, even if source files are unchanged: `make --always-make {{target}}` * Override a variable defined in the Makefile: `make {{target}} {{variable}}={{new_value}}` * Override variables defined in the Makefile by the environment: `make --environment-overrides {{target}}`
What is uudecode command
# uudecode > Decode files encoded by `uuencode`. More information: > https://manned.org/uudecode. * Decode a file that was encoded with `uuencode` and print the result to `stdout`: `uudecode {{path/to/encoded_file}}` * Decode a file that was encoded with `uuencode` and write the result to a file: `uudecode -o {{path/to/decoded_file}} {{path/to/encoded_file}}`
What is diff command
# diff > Compare files and directories. More information: https://man7.org/linux/man- > pages/man1/diff.1.html. * Compare files (lists changes to turn `old_file` into `new_file`): `diff {{old_file}} {{new_file}}` * Compare files, ignoring white spaces: `diff --ignore-all-space {{old_file}} {{new_file}}` * Compare files, showing the differences side by side: `diff --side-by-side {{old_file}} {{new_file}}` * Compare files, showing the differences in unified format (as used by `git diff`): `diff --unified {{old_file}} {{new_file}}` * Compare directories recursively (shows names for differing files/directories as well as changes made to files): `diff --recursive {{old_directory}} {{new_directory}}` * Compare directories, only showing the names of files that differ: `diff --recursive --brief {{old_directory}} {{new_directory}}` * Create a patch file for Git from the differences of two text files, treating nonexistent files as empty: `diff --text --unified --new-file {{old_file}} {{new_file}} > {{diff.patch}}`
What is ln command
# ln > Creates links to files and directories. More information: > https://www.gnu.org/software/coreutils/ln. * Create a symbolic link to a file or directory: `ln -s {{/path/to/file_or_directory}} {{path/to/symlink}}` * Overwrite an existing symbolic link to point to a different file: `ln -sf {{/path/to/new_file}} {{path/to/symlink}}` * Create a hard link to a file: `ln {{/path/to/file}} {{path/to/hardlink}}`
What is cal command
# cal > Prints calendar information. More information: > https://ss64.com/osx/cal.html. * Display a calendar for the current month: `cal` * Display previous, current and next month: `cal -3` * Display a calendar for a specific month (1-12 or name): `cal -m {{month}}` * Display a calendar for the current year: `cal -y` * Display a calendar for a specific year (4 digits): `cal {{year}}` * Display a calendar for a specific month and year: `cal {{month}} {{year}}` * Display date of Easter (Western Christian churches) in a given year: `ncal -e {{year}}`
What is file command
# file > Determine file type. More information: https://manned.org/file. * Give a description of the type of the specified file. Works fine for files with no file extension: `file {{path/to/file}}` * Look inside a zipped file and determine the file type(s) inside: `file -z {{foo.zip}}` * Allow file to work with special or device files: `file -s {{path/to/file}}` * Don't stop at first file type match; keep going until the end of the file: `file -k {{path/to/file}}` * Determine the MIME encoding type of a file: `file -i {{path/to/file}}`
What is vi command
# vi > This command is an alias of `vim`. * View documentation for the original command: `tldr vim`
What is pwdx command
# pwdx > Print working directory of a process. More information: > https://manned.org/pwdx. * Print current working directory of a process: `pwdx {{process_id}}`
What is locate command
# locate > Find filenames quickly. More information: https://manned.org/locate. * Look for pattern in the database. Note: the database is recomputed periodically (usually weekly or daily): `locate "{{pattern}}"` * Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`): `locate */{{filename}}` * Recompute the database. You need to do it if you want to find recently added files: `sudo /usr/libexec/locate.updatedb`
What is rm command
# rm > Remove files or directories. See also: `rmdir`. More information: > https://www.gnu.org/software/coreutils/rm. * Remove specific files: `rm {{path/to/file1 path/to/file2 ...}}` * Remove specific files ignoring nonexistent ones: `rm -f {{path/to/file1 path/to/file2 ...}}` * Remove specific files [i]nteractively prompting before each removal: `rm -i {{path/to/file1 path/to/file2 ...}}` * Remove specific files printing info about each removal: `rm -v {{path/to/file1 path/to/file2 ...}}` * Remove specific files and directories [r]ecursively: `rm -r {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}`
What is ldapsearch command
# ldapsearch > Query an LDAP directory. More information: https://docs.ldap.com/ldap- > sdk/docs/tool-usages/ldapsearch.html. * Query an LDAP server for all items that are a member of the given group and return the object's displayName value: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} -b {{base_ou}} '{{memberOf=group1}}' displayName` * Query an LDAP server with a no-newline password file for all items that are a member of the given group and return the object's displayName value: `ldapsearch -D '{{admin_DN}}' -y '{{password_file}}' -h {{ldap_host}} -b {{base_ou}} '{{memberOf=group1}}' displayName` * Return 5 items that match the given filter: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} -b {{base_ou}} '{{memberOf=group1}}' -z 5 displayName` * Wait up to 7 seconds for a response: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} -b {{base_ou}} '{{memberOf=group1}}' -l 7 displayName` * Invert the filter: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} -b {{base_ou}} '(!(memberOf={{group1}}))' displayName` * Return all items that are part of multiple groups, returning the display name for each item: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} '(&({{memberOf=group1}})({{memberOf=group2}})({{memberOf=group3}}))' "displayName"` * Return all items that are members of at least 1 of the specified groups: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} '(|({{memberOf=group1}})({{memberOf=group1}})({{memberOf=group3}}))' displayName` * Combine multiple boolean logic filters: `ldapsearch -D '{{admin_DN}}' -w '{{password}}' -h {{ldap_host}} '(&({{memberOf=group1}})({{memberOf=group2}})(!({{memberOf=group3}})))' displayName`
What is git-clean command
# git clean > Remove untracked files from the working tree. More information: https://git- > scm.com/docs/git-clean. * Delete files that are not tracked by Git: `git clean` * Interactively delete files that are not tracked by Git: `git clean -i` * Show what files would be deleted without actually deleting them: `git clean --dry-run` * Forcefully delete files that are not tracked by Git: `git clean -f` * Forcefully delete directories that are not tracked by Git: `git clean -fd` * Delete untracked files, including ignored files in `.gitignore` and `.git/info/exclude`: `git clean -x`
What is git-bugreport command
# git bugreport > Captures debug information from the system and user, generating a text file > to aid in the reporting of a bug in Git. More information: https://git- > scm.com/docs/git-bugreport. * Create a new bug report file in the current directory: `git bugreport` * Create a new bug report file in the specified directory, creating it if it does not exist: `git bugreport --output-directory {{path/to/directory}}` * Create a new bug report file with the specified filename suffix in `strftime` format: `git bugreport --suffix {{%m%d%y}}`
What is keyctl command
# keyctl > Manipulate the Linux kernel keyring. More information: > https://manned.org/keyctl. * List keys in a specific keyring: `keyctl list {{target_keyring}}` * List current keys in the user default session: `keyctl list {{@us}}` * Store a key in a specific keyring: `keyctl add {{type_keyring}} {{key_name}} {{key_value}} {{target_keyring}}` * Store a key with its value from `stdin`: `echo -n {{key_value}} | keyctl padd {{type_keyring}} {{key_name}} {{target_keyring}}` * Put a timeout on a key: `keyctl timeout {{key_name}} {{timeout_in_seconds}}` * Read a key and format it as a hex-dump if not printable: `keyctl read {{key_name}}` * Read a key and format as-is: `keyctl pipe {{key_name}}` * Revoke a key and prevent any further action on it: `keyctl revoke {{key_name}}`
What is dpkg-query command
# dpkg-query > A tool that shows information about installed packages. More information: > https://manpages.debian.org/latest/dpkg/dpkg-query.1.html. * List all installed packages: `dpkg-query --list` * List installed packages matching a pattern: `dpkg-query --list '{{libc6*}}'` * List all files installed by a package: `dpkg-query --listfiles {{libc6}}` * Show information about a package: `dpkg-query --status {{libc6}}` * Search for packages that own files matching a pattern: `dpkg-query --search {{/etc/ld.so.conf.d}}`
What is git-blame command
# git blame > Show commit hash and last author on each line of a file. More information: > https://git-scm.com/docs/git-blame. * Print file with author name and commit hash on each line: `git blame {{path/to/file}}` * Print file with author email and commit hash on each line: `git blame -e {{path/to/file}}` * Print file with author name and commit hash on each line at a specific commit: `git blame {{commit}} {{path/to/file}}` * Print file with author name and commit hash on each line before a specific commit: `git blame {{commit}}~ {{path/to/file}}`
What is login command
# login > Initiates a session for a user. More information: https://manned.org/login. * Log in as a user: `login {{user}}` * Log in as user without authentication if user is preauthenticated: `login -f {{user}}` * Log in as user and preserve environment: `login -p {{user}}` * Log in as a user on a remote host: `login -h {{host}} {{user}}`
What is git-show-index command
# git show-index > Show the packed archive index of a Git repository. More information: > https://git-scm.com/docs/git-show-index. * Read an IDX file for a Git packfile and dump its contents to `stdout`: `git show-index {{path/to/file.idx}}` * Specify the hash algorithm for the index file (experimental): `git show-index --object-format={{sha1|sha256}} {{path/to/file}}`
What is crontab command
# crontab > Schedule cron jobs to run on a time interval for the current user. More > information: https://crontab.guru/. * Edit the crontab file for the current user: `crontab -e` * Edit the crontab file for a specific user: `sudo crontab -e -u {{user}}` * Replace the current crontab with the contents of the given file: `crontab {{path/to/file}}` * View a list of existing cron jobs for current user: `crontab -l` * Remove all cron jobs for the current user: `crontab -r` * Sample job which runs at 10:00 every day (* means any value): `0 10 * * * {{command_to_execute}}` * Sample crontab entry, which runs a command every 10 minutes: `*/10 * * * * {{command_to_execute}}` * Sample crontab entry, which runs a certain script at 02:30 every Friday: `30 2 * * Fri {{/absolute/path/to/script.sh}}`
What is install command
# install > Copy files and set attributes. Copy files (often executable) to a system > location like `/usr/local/bin`, give them the appropriate > permissions/ownership. More information: > https://www.gnu.org/software/coreutils/install. * Copy files to the destination: `install {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}` * Copy files to the destination, setting their ownership: `install --owner {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}` * Copy files to the destination, setting their group ownership: `install --group {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}` * Copy files to the destination, setting their `mode`: `install --mode {{+x}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}` * Copy files and apply access/modification times of source to the destination: `install --preserve-timestamps {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}` * Copy files and create the directories at the destination if they don't exist: `install -D {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
What is colrm command
# colrm > Remove columns from `stdin`. More information: https://manned.org/colrm. * Remove first column of `stdin`: `colrm {{1 1}}` * Remove from 3rd column till the end of each line: `colrm {{3}}` * Remove from the 3rd column till the 5th column of each line: `colrm {{3 5}}`
What is resolvectl command
# resolvectl > Resolve domain names, IPv4 and IPv6 addresses, DNS resource records, and > services. Introspect and reconfigure the DNS resolver. More information: > https://www.freedesktop.org/software/systemd/man/resolvectl.html. * Show DNS settings: `resolvectl status` * Resolve the IPv4 and IPv6 addresses for one or more domains: `resolvectl query {{domain1 domain2 ...}}` * Retrieve the domain of a specified IP address: `resolvectl query {{ip_address}}` * Retrieve an MX record of a domain: `resolvectl --legend={{no}} --type={{MX}} query {{domain}}` * Resolve an SRV record, for example _xmpp-server._tcp gmail.com: `resolvectl service _{{service}}._{{protocol}} {{name}}` * Retrieve the public key from an email address from an OPENPGPKEY DNS record: `resolvectl openpgp {{email}}` * Retrieve a TLS key: `resolvectl tlsa tcp {{domain}}:443`
What is ssh-keygen command
# ssh-keygen > Generate ssh keys used for authentication, password-less logins, and other > things. More information: https://man.openbsd.org/ssh-keygen. * Generate a key interactively: `ssh-keygen` * Generate an ed25519 key with 32 key derivation function rounds and save the key to a specific file: `ssh-keygen -t {{ed25519}} -a {{32}} -f {{~/.ssh/filename}}` * Generate an RSA 4096-bit key with email as a comment: `ssh-keygen -t {{rsa}} -b {{4096}} -C "{{comment|email}}"` * Remove the keys of a host from the known_hosts file (useful when a known host has a new key): `ssh-keygen -R {{remote_host}}` * Retrieve the fingerprint of a key in MD5 Hex: `ssh-keygen -l -E {{md5}} -f {{~/.ssh/filename}}` * Change the password of a key: `ssh-keygen -p -f {{~/.ssh/filename}}` * Change the type of the key format (for example from OPENSSH format to PEM), the file will be rewritten in-place: `ssh-keygen -p -N "" -m {{PEM}} -f {{~/.ssh/OpenSSH_private_key}}` * Retrieve public key from secret key: `ssh-keygen -y -f {{~/.ssh/OpenSSH_private_key}}`
What is pidstat command
# pidstat > Show system resource usage, including CPU, memory, IO etc. More information: > https://manned.org/pidstat. * Show CPU statistics at a 2 second interval for 10 times: `pidstat {{2}} {{10}}` * Show page faults and memory utilization: `pidstat -r` * Show input/output usage per process id: `pidstat -d` * Show information on a specific PID: `pidstat -p {{PID}}` * Show memory statistics for all processes whose command name include "fox" or "bird": `pidstat -C "{{fox|bird}}" -r -p ALL`
What is git-stash command
# git stash > Stash local Git changes in a temporary area. More information: https://git- > scm.com/docs/git-stash. * Stash current changes, except new (untracked) files: `git stash push -m {{optional_stash_message}}` * Stash current changes, including new (untracked) files: `git stash -u` * Interactively select parts of changed files for stashing: `git stash -p` * List all stashes (shows stash name, related branch and message): `git stash list` * Show the changes as a patch between the stash (default is stash@{0}) and the commit back when stash entry was first created: `git stash show -p {{stash@{0}}}` * Apply a stash (default is the latest, named stash@{0}): `git stash apply {{optional_stash_name_or_commit}}` * Drop or apply a stash (default is stash@{0}) and remove it from the stash list if applying doesn't cause conflicts: `git stash pop {{optional_stash_name}}` * Drop all stashes: `git stash clear`
What is git-bisect command
# git bisect > Use binary search to find the commit that introduced a bug. Git > automatically jumps back and forth in the commit graph to progressively > narrow down the faulty commit. More information: https://git- > scm.com/docs/git-bisect. * Start a bisect session on a commit range bounded by a known buggy commit, and a known clean (typically older) one: `git bisect start {{bad_commit}} {{good_commit}}` * For each commit that `git bisect` selects, mark it as "bad" or "good" after testing it for the issue: `git bisect {{good|bad}}` * After `git bisect` pinpoints the faulty commit, end the bisect session and return to the previous branch: `git bisect reset` * Skip a commit during a bisect (e.g. one that fails the tests due to a different issue): `git bisect skip` * Display a log of what has been done so far: `git bisect log`
What is systemd-ac-power command
# systemd-ac-power > Report whether the computer is connected to an external power source. More > information: https://www.freedesktop.org/software/systemd/man/systemd-ac- > power.html. * Silently check and return a 0 status code when running on AC power, and a non-zero code otherwise: `systemd-ac-power` * Additionally print `yes` or `no` to `stdout`: `systemd-ac-power --verbose`
What is getopt command
# getopt > Parse command-line arguments. More information: > https://www.gnu.org/software/libc/manual/html_node/Getopt.html. * Parse optional `verbose`/`version` flags with shorthands: `getopt --options vV --longoptions verbose,version -- --version --verbose` * Add a `--file` option with a required argument with shorthand `-f`: `getopt --options f: --longoptions file: -- --file=somefile` * Add a `--verbose` option with an optional argument with shorthand `-v`, and pass a non-option parameter `arg`: `getopt --options v:: --longoptions verbose:: -- --verbose arg` * Accept a `-r` and `--verbose` flag, a `--accept` option with an optional argument and add a `--target` with a required argument option with shorthands: `getopt --options rv::s::t: --longoptions verbose,source::,target: -- -v --target target`
What is pkill command
# pkill > Signal process by name. Mostly used for stopping processes. More > information: https://www.man7.org/linux/man-pages/man1/pkill.1.html. * Kill all processes which match: `pkill "{{process_name}}"` * Kill all processes which match their full command instead of just the process name: `pkill -f "{{command_name}}"` * Force kill matching processes (can't be blocked): `pkill -9 "{{process_name}}"` * Send SIGUSR1 signal to processes which match: `pkill -USR1 "{{process_name}}"` * Kill the main `firefox` process to close the browser: `pkill --oldest "{{firefox}}"`
What is ssh-keyscan command
# ssh-keyscan > Get the public ssh keys of remote hosts. More information: > https://man.openbsd.org/ssh-keyscan. * Retrieve all public ssh keys of a remote host: `ssh-keyscan {{host}}` * Retrieve all public ssh keys of a remote host listening on a specific port: `ssh-keyscan -p {{port}} {{host}}` * Retrieve certain types of public ssh keys of a remote host: `ssh-keyscan -t {{rsa,dsa,ecdsa,ed25519}} {{host}}` * Manually update the ssh known_hosts file with the fingerprint of a given host: `ssh-keyscan -H {{host}} >> ~/.ssh/known_hosts`
What is test command
# test > Check file types and compare values. Returns 0 if the condition evaluates to > true, 1 if it evaluates to false. More information: > https://www.gnu.org/software/coreutils/test. * Test if a given variable is equal to a given string: `test "{{$MY_VAR}}" == "{{/bin/zsh}}"` * Test if a given variable is empty: `test -z "{{$GIT_BRANCH}}"` * Test if a file exists: `test -f "{{path/to/file_or_directory}}"` * Test if a directory does not exist: `test ! -d "{{path/to/directory}}"` * If A is true, then do B, or C in the case of an error (notice that C may run even if A fails): `test {{condition}} && {{echo "true"}} || {{echo "false"}}`
What is systemd-notify command
# systemd-notify > Notify the service manager about start-up completion and other daemon status > changes. This command is useless outside systemd service scripts. More > information: https://www.freedesktop.org/software/systemd/man/systemd- > notify.html. * Notify systemd that the service has completed its initialization and is fully started. It should be invoked when the service is ready to accept incoming requests: `systemd-notify --booted` * Signal to systemd that the service is ready to handle incoming connections or perform its tasks: `systemd-notify --ready` * Provide a custom status message to systemd (this information is shown by `systemctl status`): `systemd-notify --status="{{Add custom status message here...}}"`
What is pr command
# pr > Paginate or columnate files for printing. More information: > https://www.gnu.org/software/coreutils/pr. * Print multiple files with a default header and footer: `pr {{file1}} {{file2}} {{file3}}` * Print with a custom centered header: `pr -h "{{header}}" {{file1}} {{file2}} {{file3}}` * Print with numbered lines and a custom date format: `pr -n -D "{{format}}" {{file1}} {{file2}} {{file3}}` * Print all files together, one in each column, without a header or footer: `pr -m -T {{file1}} {{file2}} {{file3}}` * Print, beginning at page 2 up to page 5, with a given page length (including header and footer): `pr +{{2}}:{{5}} -l {{page_length}} {{file1}} {{file2}} {{file3}}` * Print with an offset for each line and a truncating custom page width: `pr -o {{offset}} -W {{width}} {{file1}} {{file2}} {{file3}}`
What is git-symbolic-ref command
# git symbolic-ref > Read, change, or delete files that store references. More information: > https://git-scm.com/docs/git-symbolic-ref. * Store a reference by a name: `git symbolic-ref refs/{{name}} {{ref}}` * Store a reference by name, including a message with a reason for the update: `git symbolic-ref -m "{{message}}" refs/{{name}} refs/heads/{{branch_name}}` * Read a reference by name: `git symbolic-ref refs/{{name}}` * Delete a reference by name: `git symbolic-ref --delete refs/{{name}}` * For scripting, hide errors with `--quiet` and use `--short` to simplify ("refs/heads/X" prints as "X"): `git symbolic-ref --quiet --short refs/{{name}}`
What is tty command
# tty > Returns terminal name. More information: > https://www.gnu.org/software/coreutils/tty. * Print the file name of this terminal: `tty`
What is git-instaweb command
# git instaweb > Helper to launch a GitWeb server. More information: https://git- > scm.com/docs/git-instaweb. * Launch a GitWeb server for the current Git repository: `git instaweb --start` * Listen only on localhost: `git instaweb --start --local` * Listen on a specific port: `git instaweb --start --port {{1234}}` * Use a specified HTTP daemon: `git instaweb --start --httpd {{lighttpd|apache2|mongoose|plackup|webrick}}` * Also auto-launch a web browser: `git instaweb --start --browser` * Stop the currently running GitWeb server: `git instaweb --stop` * Restart the currently running GitWeb server: `git instaweb --restart`
What is newgrp command
# newgrp > Switch primary group membership. More information: > https://manned.org/newgrp. * Change user's primary group membership: `newgrp {{group_name}}` * Reset primary group membership to user's default group in `/etc/passwd`: `newgrp`
What is dircolors command
# dircolors > Output commands to set the LS_COLOR environment variable and style `ls`, > `dir`, etc. More information: > https://www.gnu.org/software/coreutils/dircolors. * Output commands to set LS_COLOR using default colors: `dircolors` * Output commands to set LS_COLOR using colors from a file: `dircolors {{path/to/file}}` * Output commands for Bourne shell: `dircolors --bourne-shell` * Output commands for C shell: `dircolors --c-shell` * View the default colors for file types and extensions: `dircolors --print-data`
What is utmpdump command
# utmpdump > Dump and load btmp, utmp and wtmp accounting files. More information: > https://manned.org/utmpdump. * Dump the `/var/log/wtmp` file to `stdout` as plain text: `utmpdump {{/var/log/wtmp}}` * Load a previously dumped file into `/var/log/wtmp`: `utmpdump -r {{dumpfile}} > {{/var/log/wtmp}}`
What is lp command
# lp > Print files. More information: https://manned.org/lp. * Print the output of a command to the default printer (see `lpstat` command): `echo "test" | lp` * Print a file to the default printer: `lp {{path/to/filename}}` * Print a file to a named printer (see `lpstat` command): `lp -d {{printer_name}} {{path/to/filename}}` * Print N copies of file to default printer (replace N with desired number of copies): `lp -n {{N}} {{path/to/filename}}` * Print only certain pages to the default printer (print pages 1, 3-5, and 16): `lp -P 1,3-5,16 {{path/to/filename}}` * Resume printing a job: `lp -i {{job_id}} -H resume`
What is git-verify-tag command
# git verify-tag > Check for GPG verification of tags. If a tag wasn't signed, an error will > occur. More information: https://git-scm.com/docs/git-verify-tag. * Check tags for a GPG signature: `git verify-tag {{tag1 optional_tag2 ...}}` * Check tags for a GPG signature and show details for each tag: `git verify-tag {{tag1 optional_tag2 ...}} --verbose` * Check tags for a GPG signature and print the raw details: `git verify-tag {{tag1 optional_tag2 ...}} --raw`
What is du command
# du > Disk usage: estimate and summarize file and directory space usage. More > information: https://ss64.com/osx/du.html. * List the sizes of a directory and any subdirectories, in the given unit (KiB/MiB/GiB): `du -{{k|m|g}} {{path/to/directory}}` * List the sizes of a directory and any subdirectories, in human-readable form (i.e. auto-selecting the appropriate unit for each size): `du -h {{path/to/directory}}` * Show the size of a single directory, in human-readable units: `du -sh {{path/to/directory}}` * List the human-readable sizes of a directory and of all the files and directories within it: `du -ah {{path/to/directory}}` * List the human-readable sizes of a directory and any subdirectories, up to N levels deep: `du -h -d {{2}} {{path/to/directory}}` * List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end: `du -ch {{*/*.jpg}}`
What is pgrep command
# pgrep > Find or signal processes by name. More information: > https://www.man7.org/linux/man-pages/man1/pkill.1.html. * Return PIDs of any running processes with a matching command string: `pgrep {{process_name}}` * Search for processes including their command-line options: `pgrep --full "{{process_name}} {{parameter}}"` * Search for processes run by a specific user: `pgrep --euid root {{process_name}}`
What is bc command
# bc > An arbitrary precision calculator language. See also: `dc`. More > information: https://manned.org/man/freebsd-13.0/bc.1. * Start an interactive session: `bc` * Start an interactive session with the standard math library enabled: `bc --mathlib` * Calculate an expression: `bc --expression='{{5 / 3}}'` * Execute a script: `bc {{path/to/script.bc}}` * Calculate an expression with the specified scale: `bc --expression='scale = {{10}}; {{5 / 3}}'` * Calculate a sine/cosine/arctangent/natural logarithm/exponential function using `mathlib`: `bc --mathlib --expression='{{s|c|a|l|e}}({{1}})'`
What is git-credential-cache command
# git credential-cache > Git helper to temporarily store passwords in memory. More information: > https://git-scm.com/docs/git-credential-cache. * Store Git credentials for a specific amount of time: `git config credential.helper 'cache --timeout={{time_in_seconds}}'`
What is git-log command
# git log > Show a history of commits. More information: https://git-scm.com/docs/git- > log. * Show the sequence of commits starting from the current one, in reverse chronological order of the Git repository in the current working directory: `git log` * Show the history of a particular file or directory, including differences: `git log -p {{path/to/file_or_directory}}` * Show an overview of which file(s) changed in each commit: `git log --stat` * Show a graph of commits in the current branch using only the first line of each commit message: `git log --oneline --graph` * Show a graph of all commits, tags and branches in the entire repo: `git log --oneline --decorate --all --graph` * Show only commits whose messages include a given string (case-insensitively): `git log -i --grep {{search_string}}` * Show the last N commits from a certain author: `git log -n {{number}} --author={{author}}` * Show commits between two dates (yyyy-mm-dd): `git log --before="{{2017-01-29}}" --after="{{2017-01-17}}"`
What is quota command
# quota > Display users' disk space usage and allocated limits. More information: > https://manned.org/quota. * Show disk quotas in human-readable units for the current user: `quota -s` * Verbose output (also display quotas on filesystems where no storage is allocated): `quota -v` * Quiet output (only display quotas on filesystems where usage is over quota): `quota -q` * Print quotas for the groups of which the current user is a member: `quota -g` * Show disk quotas for another user: `sudo quota -u {{username}}`
What is git-format-patch command
# git format-patch > Prepare .patch files. Useful when emailing commits elsewhere. See also `git > am`, which can apply generated .patch files. More information: https://git- > scm.com/docs/git-format-patch. * Create an auto-named `.patch` file for all the unpushed commits: `git format-patch {{origin}}` * Write a `.patch` file for all the commits between 2 revisions to `stdout`: `git format-patch {{revision_1}}..{{revision_2}}` * Write a `.patch` file for the 3 latest commits: `git format-patch -{{3}}`
What is false command
# false > Returns a non-zero exit code. More information: > https://www.gnu.org/software/coreutils/false. * Return a non-zero exit code: `false`
What is iconv command
# iconv > Converts text from one encoding to another. More information: > https://manned.org/iconv. * Convert file to a specific encoding, and print to `stdout`: `iconv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}` * Convert file to the current locale's encoding, and output to a file: `iconv -f {{from_encoding}} {{input_file}} > {{output_file}}` * List supported encodings: `iconv -l`
What is sync command
# sync > Flushes all pending write operations to the appropriate disks. More > information: https://www.gnu.org/software/coreutils/sync. * Flush all pending write operations on all disks: `sync` * Flush all pending write operations on a single file to disk: `sync {{path/to/file}}`
What is diff command
# diff > Compare files and directories. More information: https://man7.org/linux/man- > pages/man1/diff.1.html. * Compare files (lists changes to turn `old_file` into `new_file`): `diff {{old_file}} {{new_file}}` * Compare files, ignoring white spaces: `diff --ignore-all-space {{old_file}} {{new_file}}` * Compare files, showing the differences side by side: `diff --side-by-side {{old_file}} {{new_file}}` * Compare files, showing the differences in unified format (as used by `git diff`): `diff --unified {{old_file}} {{new_file}}` * Compare directories recursively (shows names for differing files/directories as well as changes made to files): `diff --recursive {{old_directory}} {{new_directory}}` * Compare directories, only showing the names of files that differ: `diff --recursive --brief {{old_directory}} {{new_directory}}` * Create a patch file for Git from the differences of two text files, treating nonexistent files as empty: `diff --text --unified --new-file {{old_file}} {{new_file}} > {{diff.patch}}`
What is rmdir command
# rmdir > Remove directories without files. See also: `rm`. More information: > https://www.gnu.org/software/coreutils/rmdir. * Remove specific directories: `rmdir {{path/to/directory1 path/to/directory2 ...}}` * Remove specific nested directories recursively: `rmdir -p {{path/to/directory1 path/to/directory2 ...}}`
What is shuf command
# shuf > Generate random permutations. More information: https://www.unix.com/man- > page/linux/1/shuf/. * Randomize the order of lines in a file and output the result: `shuf {{filename}}` * Only output the first 5 entries of the result: `shuf --head-count={{5}} {{filename}}` * Write output to another file: `shuf {{filename}} --output={{output_filename}}` * Generate random numbers in range 1-10: `shuf --input-range={{1-10}}`
What is git-bundle command
# git bundle > Package objects and references into an archive. More information: > https://git-scm.com/docs/git-bundle. * Create a bundle file that contains all objects and references of a specific branch: `git bundle create {{path/to/file.bundle}} {{branch_name}}` * Create a bundle file of all branches: `git bundle create {{path/to/file.bundle}} --all` * Create a bundle file of the last 5 commits of the current branch: `git bundle create {{path/to/file.bundle}} -{{5}} {{HEAD}}` * Create a bundle file of the latest 7 days: `git bundle create {{path/to/file.bundle}} --since={{7.days}} {{HEAD}}` * Verify that a bundle file is valid and can be applied to the current repository: `git bundle verify {{path/to/file.bundle}}` * Print to `stdout` the list of references contained in a bundle: `git bundle unbundle {{path/to/file.bundle}}` * Unbundle a specific branch from a bundle file into the current repository: `git pull {{path/to/file.bundle}} {{branch_name}}`
What is link command
# link > Create a hard link to an existing file. For more options, see the `ln` > command. More information: https://www.gnu.org/software/coreutils/link. * Create a hard link from a new file to an existing file: `link {{path/to/existing_file}} {{path/to/new_file}}`
What is systemd-delta command
# systemd-delta > Find overridden systemd-related configuration files. More information: > https://www.freedesktop.org/software/systemd/man/systemd-delta.html. * Show all overridden configuration files: `systemd-delta` * Show only files of specific types (comma-separated list): `systemd-delta --type {{masked|equivalent|redirected|overridden|extended|unchanged}}` * Show only files whose path starts with the specified prefix (Note: a prefix is a directory containing subdirectories with systemd configuration files): `systemd-delta {{/etc|/run|/usr/lib|...}}` * Further restrict the search path by adding a suffix (the prefix is optional): `systemd-delta {{prefix}}/{{tmpfiles.d|sysctl.d|systemd/system|...}}`
What is namei command
# namei > Follows a pathname (which can be a symbolic link) until a terminal point is > found (a file/directory/char device etc). This program is useful for finding > "too many levels of symbolic links" problems. More information: > https://manned.org/namei. * Resolve the pathnames specified as the argument parameters: `namei {{path/to/a}} {{path/to/b}} {{path/to/c}}` * Display the results in a long-listing format: `namei --long {{path/to/a}} {{path/to/b}} {{path/to/c}}` * Show the mode bits of each file type in the style of `ls`: `namei --modes {{path/to/a}} {{path/to/b}} {{path/to/c}}` * Show owner and group name of each file: `namei --owners {{path/to/a}} {{path/to/b}} {{path/to/c}}` * Don't follow symlinks while resolving: `namei --nosymlinks {{path/to/a}} {{path/to/b}} {{path/to/c}}`
What is lastcomm command
# lastcomm > Show last commands executed. More information: > https://manpages.debian.org/latest/acct/lastcomm.1.en.html. * Print information about all the commands in the acct (record file): `lastcomm` * Display commands executed by a given user: `lastcomm --user {{user}}` * Display information about a given command executed on the system: `lastcomm --command {{command}}` * Display information about commands executed on a given terminal: `lastcomm --tty {{terminal_name}}`
What is egrep command
# egrep > Find patterns in files using extended regular expression (supports `?`, `+`, > `{}`, `()` and `|`). More information: https://manned.org/egrep. * Search for a pattern within a file: `egrep "{{search_pattern}}" {{path/to/file}}` * Search for a pattern within multiple files: `egrep "{{search_pattern}}" {{path/to/file1}} {{path/to/file2}} {{path/to/file3}}` * Search `stdin` for a pattern: `cat {{path/to/file}} | egrep {{search_pattern}}` * Print file name and line number for each match: `egrep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}` * Search for a pattern in all files recursively in a directory, ignoring binary files: `egrep --recursive --binary-files={{without-match}} "{{search_pattern}}" {{path/to/directory}}` * Search for lines that do not match a pattern: `egrep --invert-match "{{search_pattern}}" {{path/to/file}}`
What is setfacl command
# setfacl > Set file access control lists (ACL). More information: > https://manned.org/setfacl. * Modify ACL of a file for user with read and write access: `setfacl -m u:{{username}}:rw {{file}}` * Modify default ACL of a file for all users: `setfacl -d -m u::rw {{file}}` * Remove ACL of a file for a user: `setfacl -x u:{{username}} {{file}}` * Remove all ACL entries of a file: `setfacl -b {{file}}`
What is paste command
# paste > Merge lines of files. More information: > https://www.gnu.org/software/coreutils/paste. * Join all the lines into a single line, using TAB as delimiter: `paste -s {{path/to/file}}` * Join all the lines into a single line, using the specified delimiter: `paste -s -d {{delimiter}} {{path/to/file}}` * Merge two files side by side, each in its column, using TAB as delimiter: `paste {{file1}} {{file2}}` * Merge two files side by side, each in its column, using the specified delimiter: `paste -d {{delimiter}} {{file1}} {{file2}}` * Merge two files, with lines added alternatively: `paste -d '\n' {{file1}} {{file2}}`
What is busctl command
# busctl > Introspect and monitor the D-Bus bus. More information: > https://www.freedesktop.org/software/systemd/man/busctl.html. * Show all peers on the bus, by their service names: `busctl list` * Show process information and credentials of a bus service, a process, or the owner of the bus (if no parameter is specified): `busctl status {{service|pid}}` * Dump messages being exchanged. If no service is specified, show all messages on the bus: `busctl monitor {{service1 service2 ...}}` * Show an object tree of one or more services (or all services if no service is specified): `busctl tree {{service1 service2 ...}}` * Show interfaces, methods, properties and signals of the specified object on the specified service: `busctl introspect {{service}} {{path/to/object}}` * Retrieve the current value of one or more object properties: `busctl get-property {{service}} {{path/to/object}} {{interface_name}} {{property_name}}` * Invoke a method and show the response: `busctl call {{service}} {{path/to/object}} {{interface_name}} {{method_name}}`
What is readlink command
# readlink > Follow symlinks and get symlink information. More information: > https://www.gnu.org/software/coreutils/readlink. * Print the absolute path which the symlink points to: `readlink {{path/to/symlink_file}}`
What is sh command
# sh > Bourne shell, the standard command language interpreter. See also > `histexpand` for history expansion. More information: https://manned.org/sh. * Start an interactive shell session: `sh` * Execute a command and then exit: `sh -c "{{command}}"` * Execute a script: `sh {{path/to/script.sh}}` * Read and execute commands from `stdin`: `sh -s`
What is mpstat command
# mpstat > Report CPU statistics. More information: https://manned.org/mpstat. * Display CPU statistics every 2 seconds: `mpstat {{2}}` * Display 5 reports, one by one, at 2 second intervals: `mpstat {{2}} {{5}}` * Display 5 reports, one by one, from a given processor, at 2 second intervals: `mpstat -P {{0}} {{2}} {{5}}`
What is nm command
# nm > List symbol names in object files. More information: https://manned.org/nm. * List global (extern) functions in a file (prefixed with T): `nm -g {{path/to/file.o}}` * List only undefined symbols in a file: `nm -u {{path/to/file.o}}` * List all symbols, even debugging symbols: `nm -a {{path/to/file.o}}` * Demangle C++ symbols (make them readable): `nm --demangle {{path/to/file.o}}`
What is logger command
# logger > Add messages to syslog (/var/log/syslog). More information: > https://manned.org/logger. * Log a message to syslog: `logger {{message}}` * Take input from `stdin` and log to syslog: `echo {{log_entry}} | logger` * Send the output to a remote syslog server running at a given port. Default port is 514: `echo {{log_entry}} | logger --server {{hostname}} --port {{port}}` * Use a specific tag for every line logged. Default is the name of logged in user: `echo {{log_entry}} | logger --tag {{tag}}` * Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options: `echo {{log_entry}} | logger --priority {{user.warning}}`
What is fallocate command
# fallocate > Reserve or deallocate disk space to files. The utility allocates space > without zeroing. More information: https://manned.org/fallocate. * Reserve a file taking up 700 MiB of disk space: `fallocate --length {{700M}} {{path/to/file}}` * Shrink an already allocated file by 200 MiB: `fallocate --collapse-range --length {{200M}} {{path/to/file}}` * Shrink 20 MB of space after 100 MiB in a file: `fallocate --collapse-range --offset {{100M}} --length {{20M}} {{path/to/file}}`
What is mkfifo command
# mkfifo > Makes FIFOs (named pipes). More information: > https://www.gnu.org/software/coreutils/mkfifo. * Create a named pipe at a given path: `mkfifo {{path/to/pipe}}`
What is git-credential-store command
# git credential-store > `git` helper to store passwords on disk. More information: https://git- > scm.com/docs/git-credential-store. * Store Git credentials in a specific file: `git config credential.helper 'store --file={{path/to/file}}'`
What is kill command
# kill > Sends a signal to a process, usually related to stopping the process. All > signals except for SIGKILL and SIGSTOP can be intercepted by the process to > perform a clean exit. More information: https://manned.org/kill. * Terminate a program using the default SIGTERM (terminate) signal: `kill {{process_id}}` * List available signal names (to be used without the `SIG` prefix): `kill -l` * Terminate a background job: `kill %{{job_id}}` * Terminate a program using the SIGHUP (hang up) signal. Many daemons will reload instead of terminating: `kill -{{1|HUP}} {{process_id}}` * Terminate a program using the SIGINT (interrupt) signal. This is typically initiated by the user pressing `Ctrl + C`: `kill -{{2|INT}} {{process_id}}` * Signal the operating system to immediately terminate a program (which gets no chance to capture the signal): `kill -{{9|KILL}} {{process_id}}` * Signal the operating system to pause a program until a SIGCONT ("continue") signal is received: `kill -{{17|STOP}} {{process_id}}` * Send a `SIGUSR1` signal to all processes with the given GID (group id): `kill -{{SIGUSR1}} -{{group_id}}`
What is exec command
# exec > Replace the current process with another process. More information: > https://linuxcommand.org/lc3_man_pages/exech.html. * Replace with the specified command using the current environment variables: `exec {{command -with -flags}}` * Replace with the specified command, clearing environment variables: `exec -c {{command -with -flags}}` * Replace with the specified command and login using the default shell: `exec -l {{command -with -flags}}` * Replace with the specified command and change the process name: `exec -a {{process_name}} {{command -with -flags}}`
What is ln command
# ln > Creates links to files and directories. More information: > https://www.gnu.org/software/coreutils/ln. * Create a symbolic link to a file or directory: `ln -s {{/path/to/file_or_directory}} {{path/to/symlink}}` * Overwrite an existing symbolic link to point to a different file: `ln -sf {{/path/to/new_file}} {{path/to/symlink}}` * Create a hard link to a file: `ln {{/path/to/file}} {{path/to/hardlink}}`
What is sha224sum command
# sha224sum > Calculate SHA224 cryptographic checksums. More information: > https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html. * Calculate the SHA224 checksum for one or more files: `sha224sum {{path/to/file1 path/to/file2 ...}}` * Calculate and save the list of SHA224 checksums to a file: `sha224sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.sha224}}` * Calculate a SHA224 checksum from `stdin`: `{{command}} | sha224sum` * Read a file of SHA224 sums and filenames and verify all files have matching checksums: `sha224sum --check {{path/to/file.sha224}}` * Only show a message for missing files or when verification fails: `sha224sum --check --quiet {{path/to/file.sha224}}` * Only show a message when verification fails, ignoring missing files: `sha224sum --ignore-missing --check --quiet {{path/to/file.sha224}}`
What is tr command
# tr > Translate characters: run replacements based on single characters and > character sets. More information: https://www.gnu.org/software/coreutils/tr. * Replace all occurrences of a character in a file, and print the result: `tr {{find_character}} {{replace_character}} < {{path/to/file}}` * Replace all occurrences of a character from another command's output: `echo {{text}} | tr {{find_character}} {{replace_character}}` * Map each character of the first set to the corresponding character of the second set: `tr '{{abcd}}' '{{jkmn}}' < {{path/to/file}}` * Delete all occurrences of the specified set of characters from the input: `tr -d '{{input_characters}}' < {{path/to/file}}` * Compress a series of identical characters to a single character: `tr -s '{{input_characters}}' < {{path/to/file}}` * Translate the contents of a file to upper-case: `tr "[:lower:]" "[:upper:]" < {{path/to/file}}` * Strip out non-printable characters from a file: `tr -cd "[:print:]" < {{path/to/file}}`
What is chattr command
# chattr > Change attributes of files or directories. More information: > https://manned.org/chattr. * Make a file or directory immutable to changes and deletion, even by superuser: `chattr +i {{path/to/file_or_directory}}` * Make a file or directory mutable: `chattr -i {{path/to/file_or_directory}}` * Recursively make an entire directory and contents immutable: `chattr -R +i {{path/to/directory}}`
What is git-reset command
# git reset > Undo commits or unstage changes, by resetting the current Git HEAD to the > specified state. If a path is passed, it works as "unstage"; if a commit > hash or branch is passed, it works as "uncommit". More information: > https://git-scm.com/docs/git-reset. * Unstage everything: `git reset` * Unstage specific file(s): `git reset {{path/to/file1 path/to/file2 ...}}` * Interactively unstage portions of a file: `git reset --patch {{path/to/file}}` * Undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem: `git reset HEAD~` * Undo the last two commits, adding their changes to the index, i.e. staged for commit: `git reset --soft HEAD~2` * Discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`): `git reset --hard` * Reset the repository to a given commit, discarding committed, staged and uncommitted changes since then: `git reset --hard {{commit}}`
What is uuidgen command
# uuidgen > Generate new UUID (Universally Unique IDentifier) strings. More information: > https://www.ss64.com/osx/uuidgen.html. * Generate a UUID string: `uuidgen`
What is git-clone command
# git clone > Clone an existing repository. More information: https://git- > scm.com/docs/git-clone. * Clone an existing repository into a new directory (the default directory is the repository name): `git clone {{remote_repository_location}} {{path/to/directory}}` * Clone an existing repository and its submodules: `git clone --recursive {{remote_repository_location}}` * Clone only the `.git` directory of an existing repository: `git clone --no-checkout {{remote_repository_location}}` * Clone a local repository: `git clone --local {{path/to/local/repository}}` * Clone quietly: `git clone --quiet {{remote_repository_location}}` * Clone an existing repository only fetching the 10 most recent commits on the default branch (useful to save time): `git clone --depth {{10}} {{remote_repository_location}}` * Clone an existing repository only fetching a specific branch: `git clone --branch {{name}} --single-branch {{remote_repository_location}}` * Clone an existing repository using a specific SSH command: `git clone --config core.sshCommand="{{ssh -i path/to/private_ssh_key}}" {{remote_repository_location}}`
What is cups-config command
# cups-config > Show technical information about your CUPS print server installation. More > information: https://www.cups.org/doc/man-cups-config.html. * Show the currently installed version of CUPS: `cups-config --version` * Show where CUPS is currently installed: `cups-config --serverbin` * Show the location of CUPS' configuration directory: `cups-config --serverroot` * Show the location of CUPS' data directory: `cups-config --datadir` * Display all available options: `cups-config --help`
What is mkfifo command
# mkfifo > Makes FIFOs (named pipes). More information: > https://www.gnu.org/software/coreutils/mkfifo. * Create a named pipe at a given path: `mkfifo {{path/to/pipe}}`
What is logger command
# logger > Add messages to syslog (/var/log/syslog). More information: > https://manned.org/logger. * Log a message to syslog: `logger {{message}}` * Take input from `stdin` and log to syslog: `echo {{log_entry}} | logger` * Send the output to a remote syslog server running at a given port. Default port is 514: `echo {{log_entry}} | logger --server {{hostname}} --port {{port}}` * Use a specific tag for every line logged. Default is the name of logged in user: `echo {{log_entry}} | logger --tag {{tag}}` * Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options: `echo {{log_entry}} | logger --priority {{user.warning}}`
What is git-apply command
# git apply > Apply a patch to files and/or to the index without creating a commit. See > also `git am`, which applies a patch and also creates a commit. More > information: https://git-scm.com/docs/git-apply. * Print messages about the patched files: `git apply --verbose {{path/to/file}}` * Apply and add the patched files to the index: `git apply --index {{path/to/file}}` * Apply a remote patch file: `curl -L {{https://example.com/file.patch}} | git apply` * Output diffstat for the input and apply the patch: `git apply --stat --apply {{path/to/file}}` * Apply the patch in reverse: `git apply --reverse {{path/to/file}}` * Store the patch result in the index without modifying the working tree: `git apply --cache {{path/to/file}}`
What is strings command
# strings > Find printable strings in an object file or binary. More information: > https://manned.org/strings. * Print all strings in a binary: `strings {{path/to/file}}` * Limit results to strings at least length characters long: `strings -n {{length}} {{path/to/file}}` * Prefix each result with its offset within the file: `strings -t d {{path/to/file}}` * Prefix each result with its offset within the file in hexadecimal: `strings -t x {{path/to/file}}`
What is hexdump command
# hexdump > An ASCII, decimal, hexadecimal, octal dump. More information: > https://manned.org/hexdump. * Print the hexadecimal representation of a file, replacing duplicate lines by '*': `hexdump {{path/to/file}}` * Display the input offset in hexadecimal and its ASCII representation in two columns: `hexdump -C {{path/to/file}}` * Display the hexadecimal representation of a file, but interpret only n bytes of the input: `hexdump -C -n{{number_of_bytes}} {{path/to/file}}` * Don't replace duplicate lines with '*': `hexdump --no-squeezing {{path/to/file}}`
What is git-update-index command
# git update-index > Git command for manipulating the index. More information: https://git- > scm.com/docs/git-update-index. * Pretend that a modified file is unchanged (`git status` will not show this as changed): `git update-index --skip-worktree {{path/to/modified_file}}`
What is valgrind command
# valgrind > Wrapper for a set of expert tools for profiling, optimizing and debugging > programs. Commonly used tools include `memcheck`, `cachegrind`, `callgrind`, > `massif`, `helgrind`, and `drd`. More information: http://www.valgrind.org. * Use the (default) Memcheck tool to show a diagnostic of memory usage by `program`: `valgrind {{program}}` * Use Memcheck to report all possible memory leaks of `program` in full detail: `valgrind --leak-check=full --show-leak-kinds=all {{program}}` * Use the Cachegrind tool to profile and log CPU cache operations of `program`: `valgrind --tool=cachegrind {{program}}` * Use the Massif tool to profile and log heap memory and stack usage of `program`: `valgrind --tool=massif --stacks=yes {{program}}`
What is od command
# od > Display file contents in octal, decimal or hexadecimal format. Optionally > display the byte offsets and/or printable representation for each line. More > information: https://www.gnu.org/software/coreutils/od. * Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`: `od {{path/to/file}}` * Display file in verbose mode, i.e. without replacing duplicate lines with `*`: `od -v {{path/to/file}}` * Display file in hexadecimal format (2-byte units), with byte offsets in decimal format: `od --format={{x}} --address-radix={{d}} -v {{path/to/file}}` * Display file in hexadecimal format (1-byte units), and 4 bytes per line: `od --format={{x1}} --width={{4}} -v {{path/to/file}}` * Display file in hexadecimal format along with its character representation, and do not print byte offsets: `od --format={{xz}} --address-radix={{n}} -v {{path/to/file}}` * Read only 100 bytes of a file starting from the 500th byte: `od --read-bytes {{100}} --skip-bytes={{500}} -v {{path/to/file}}`
What is uuencode command
# uuencode > Encode binary files into ASCII for transport via mediums that only support > simple ASCII encoding. More information: https://manned.org/uuencode. * Encode a file and print the result to `stdout`: `uuencode {{path/to/input_file}} {{output_file_name_after_decoding}}` * Encode a file and write the result to a file: `uuencode -o {{path/to/output_file}} {{path/to/input_file}} {{output_file_name_after_decoding}}` * Encode a file using Base64 instead of the default uuencode encoding and write the result to a file: `uuencode -m -o {{path/to/output_file}} {{path/to/input_file}} {{output_file_name_after_decoding}}`
What is cmp command
# cmp > Compare two files byte by byte. More information: > https://www.gnu.org/software/diffutils/manual/html_node/Invoking-cmp.html. * Output char and line number of the first difference between two files: `cmp {{path/to/file1}} {{path/to/file2}}` * Output info of the first difference: char, line number, bytes, and values: `cmp --print-bytes {{path/to/file1}} {{path/to/file2}}` * Output the byte numbers and values of every difference: `cmp --verbose {{path/to/file1}} {{path/to/file2}}` * Compare files but output nothing, yield only the exit status: `cmp --quiet {{path/to/file1}} {{path/to/file2}}`
What is hostname command
# hostname > Show or set the system's host name. More information: > https://manned.org/hostname. * Show current host name: `hostname` * Show the network address of the host name: `hostname -i` * Show all network addresses of the host: `hostname -I` * Show the FQDN (Fully Qualified Domain Name): `hostname --fqdn` * Set current host name: `hostname {{new_hostname}}`
What is od command
# od > Display file contents in octal, decimal or hexadecimal format. Optionally > display the byte offsets and/or printable representation for each line. More > information: https://www.gnu.org/software/coreutils/od. * Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with `*`: `od {{path/to/file}}` * Display file in verbose mode, i.e. without replacing duplicate lines with `*`: `od -v {{path/to/file}}` * Display file in hexadecimal format (2-byte units), with byte offsets in decimal format: `od --format={{x}} --address-radix={{d}} -v {{path/to/file}}` * Display file in hexadecimal format (1-byte units), and 4 bytes per line: `od --format={{x1}} --width={{4}} -v {{path/to/file}}` * Display file in hexadecimal format along with its character representation, and do not print byte offsets: `od --format={{xz}} --address-radix={{n}} -v {{path/to/file}}` * Read only 100 bytes of a file starting from the 500th byte: `od --read-bytes {{100}} --skip-bytes={{500}} -v {{path/to/file}}`
What is b2sum command
# b2sum > Calculate BLAKE2 cryptographic checksums. More information: > https://www.gnu.org/software/coreutils/b2sum. * Calculate the BLAKE2 checksum for one or more files: `b2sum {{path/to/file1 path/to/file2 ...}}` * Calculate and save the list of BLAKE2 checksums to a file: `b2sum {{path/to/file1 path/to/file2 ...}} > {{path/to/file.b2}}` * Calculate a BLAKE2 checksum from `stdin`: `{{command}} | b2sum` * Read a file of BLAKE2 sums and filenames and verify all files have matching checksums: `b2sum --check {{path/to/file.b2}}` * Only show a message for missing files or when verification fails: `b2sum --check --quiet {{path/to/file.b2}}` * Only show a message when verification fails, ignoring missing files: `b2sum --ignore-missing --check --quiet {{path/to/file.b2}}`
What is git-status command
# git status > Show the changes to files in a Git repository. Lists changed, added and > deleted files compared to the currently checked-out commit. More > information: https://git-scm.com/docs/git-status. * Show changed files which are not yet added for commit: `git status` * Give output in [s]hort format: `git status -s` * Don't show untracked files in the output: `git status --untracked-files=no` * Show output in [s]hort format along with [b]ranch info: `git status -sb`
What is time command
# time > Measure how long a command took to run. Note: `time` can either exist as a > shell builtin, a standalone program or both. More information: > https://manned.org/time. * Run the `command` and print the time measurements to `stdout`: `time {{command}}`
What is split command
# split > Split a file into pieces. More information: https://ss64.com/osx/split.html. * Split a file, each split having 10 lines (except the last split): `split -l {{10}} {{filename}}` * Split a file by a regular expression. The matching line will be the first line of the next output file: `split -p {{cat|^[dh]og}} {{filename}}` * Split a file with 512 bytes in each split (except the last split; use 512k for kilobytes and 512m for megabytes): `split -b {{512}} {{filename}}` * Split a file into 5 files. File is split such that each split has same size (except the last split): `split -n {{5}} {{filename}}`
What is su command
# su > Switch shell to another user. More information: https://manned.org/su. * Switch to superuser (requires the root password): `su` * Switch to a given user (requires the user's password): `su {{username}}` * Switch to a given user and simulate a full login shell: `su - {{username}}` * Execute a command as another user: `su - {{username}} -c "{{command}}"`
What is w command
# w > Show who is logged on and what they are doing. Print user login, TTY, remote > host, login time, idle time, current process. More information: > https://ss64.com/osx/w.html. * Show logged-in users information: `w` * Show logged-in users information without a header: `w -h` * Show information about logged-in users, sorted by their idle time: `w -i`