instruction stringlengths 17 36 | input stringclasses 1
value | output stringlengths 101 1.77k |
|---|---|---|
What is git-reflog command | # git reflog
> Show a log of changes to local references like HEAD, branches or tags. More
> information: https://git-scm.com/docs/git-reflog.
* Show the reflog for HEAD:
`git reflog`
* Show the reflog for a given branch:
`git reflog {{branch_name}}`
* Show only the 5 latest entries in the reflog:
`git reflog -n ... | |
What is git-cat-file command | # git cat-file
> Provide content or type and size information for Git repository objects.
> More information: https://git-scm.com/docs/git-cat-file.
* Get the [s]ize of the HEAD commit in bytes:
`git cat-file -s HEAD`
* Get the [t]ype (blob, tree, commit, tag) of a given Git object:
`git cat-file -t {{8c442dc3}}`
... | |
What is clear command | # clear
> Clears the screen of the terminal. More information:
> https://manned.org/clear.
* Clear the screen (equivalent to pressing Control-L in Bash shell):
`clear`
* Clear the screen but keep the terminal's scrollback buffer:
`clear -x`
* Indicate the type of terminal to clean (defaults to the value of the en... | |
What is tput command | # tput
> View and modify terminal settings and capabilities. More information:
> https://manned.org/tput.
* Move the cursor to a screen location:
`tput cup {{row}} {{column}}`
* Set foreground (af) or background (ab) color:
`tput {{setaf|setab}} {{ansi_color_code}}`
* Show number of columns, lines, or colors:
`tp... | |
What is nice command | # nice
> Execute a program with a custom scheduling priority (niceness). Niceness
> values range from -20 (the highest priority) to 19 (the lowest). More
> information: https://www.gnu.org/software/coreutils/nice.
* Launch a program with altered priority:
`nice -n {{niceness_value}} {{command}}` | |
What is echo command | # echo
> Print given arguments. More information:
> https://www.gnu.org/software/coreutils/echo.
* Print a text message. Note: quotes are optional:
`echo "{{Hello World}}"`
* Print a message with environment variables:
`echo "{{My path is $PATH}}"`
* Print a message without the trailing newline:
`echo -n "{{Hello... | |
What is expand command | # expand
> Convert tabs to spaces. More information:
> https://www.gnu.org/software/coreutils/expand.
* Convert tabs in each file to spaces, writing to `stdout`:
`expand {{path/to/file}}`
* Convert tabs to spaces, reading from `stdin`:
`expand`
* Do not convert tabs after non blanks:
`expand -i {{path/to/file}}`
... | |
What is systemd-firstboot command | # systemd-firstboot
> Initialize basic system settings on or before the first boot-up of a system.
> More information: https://www.freedesktop.org/software/systemd/man/systemd-
> firstboot.html.
* Operate on the specified directory instead of the root directory of the host system:
`sudo systemd-firstboot --root={{pat... | |
What is last command | # last
> View the last logged in users. More information: https://manned.org/last.
* View last logins, their duration and other information as read from `/var/log/wtmp`:
`last`
* Specify how many of the last logins to show:
`last -n {{login_count}}`
* Print the full date and time for entries and then display the ... | |
What is flatpak command | # flatpak
> Build, install and run flatpak applications and runtimes. More information:
> https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak.
* Run an installed application:
`flatpak run {{name}}`
* Install an application from a remote source:
`flatpak install {{remote}} {{name}}`
* List al... | |
What is cksum command | # cksum
> Calculates CRC checksums and byte counts of a file. Note, on old UNIX
> systems the CRC implementation may differ. More information:
> https://www.gnu.org/software/coreutils/cksum.
* Display a 32-bit checksum, size in bytes and filename:
`cksum {{path/to/file}}` | |
What is git-for-each-repo command | # git for-each-repo
> Run a Git command on a list of repositories. Note: this command is
> experimental and may change. More information: https://git-scm.com/docs/git-
> for-each-repo.
* Run maintenance on each of a list of repositories stored in the `maintenance.repo` user configuration variable:
`git for-each-repo ... | |
What is more command | # more
> Open a file for interactive reading, allowing scrolling and search. More
> information: https://manned.org/more.
* Open a file:
`more {{path/to/file}}`
* Open a file displaying from a specific line:
`more +{{line_number}} {{path/to/file}}`
* Display help:
`more --help`
* Go to the next page:
`<Space>`
... | |
What is apropos command | # apropos
> Search the manual pages for names and descriptions. More information:
> https://manned.org/apropos.
* Search for a keyword using a regular expression:
`apropos {{regular_expression}}`
* Search without restricting the output to the terminal width:
`apropos -l {{regular_expression}}`
* Search for pages ... | |
What is cat command | # cat
> Print and concatenate files. More information:
> https://keith.github.io/xcode-man-pages/cat.1.html.
* Print the contents of a file to `stdout`:
`cat {{path/to/file}}`
* Concatenate several files into an output file:
`cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}`
* Append several file... | |
What is arch command | # arch
> Display the name of the system architecture, or run a command under a
> different architecture. See also `uname`. More information:
> https://www.unix.com/man-page/osx/1/arch/.
* Display the system's architecture:
`arch`
* Run a command using x86_64:
`arch -x86_64 "{{command}}"`
* Run a command using arm... | |
What is update-alternatives command | # update-alternatives
> A convenient tool for maintaining symbolic links to determine default
> commands. More information: https://manned.org/update-alternatives.
* Add a symbolic link:
`sudo update-alternatives --install {{path/to/symlink}} {{command_name}}
{{path/to/command_binary}} {{priority}}`
* Configure a s... | |
What is mailx command | # mailx
> Send and receive mail. More information: https://manned.org/mailx.
* Send mail (the content should be typed after the command, and ended with `Ctrl+D`):
`mailx -s "{{subject}}" {{to_addr}}`
* Send mail with content passed from another command:
`echo "{{content}}" | mailx -s "{{subject}}" {{to_addr}}`
* ... | |
What is dot command | # dot
> Render an image of a `linear directed` network graph from a `graphviz` file.
> Layouts: `dot`, `neato`, `twopi`, `circo`, `fdp`, `sfdp`, `osage` &
> `patchwork`. More information: https://graphviz.org/doc/info/command.html.
* Render a `png` image with a filename based on the input filename and output format (... | |
What is gcc command | # gcc
> Preprocess and compile C and C++ source files, then assemble and link them
> together. More information: https://gcc.gnu.org.
* Compile multiple source files into an executable:
`gcc {{path/to/source1.c path/to/source2.c ...}} -o
{{path/to/output_executable}}`
* Show common warnings, debug symbols in output... | |
What is whoami command | # whoami
> Print the username associated with the current effective user ID. More
> information: https://www.gnu.org/software/coreutils/whoami.
* Display currently logged username:
`whoami`
* Display the username after a change in the user ID:
`sudo whoami` | |
What is gitk command | # gitk
> A graphical Git repository browser. More information: https://git-
> scm.com/docs/gitk.
* Show the repository browser for the current Git repository:
`gitk`
* Show repository browser for a specific file or directory:
`gitk {{path/to/file_or_directory}}`
* Show commits made since 1 week ago:
`gitk --since... | |
What is realpath command | # realpath
> Display the resolved absolute path for a file or directory. More
> information: https://www.gnu.org/software/coreutils/realpath.
* Display the absolute path for a file or directory:
`realpath {{path/to/file_or_directory}}`
* Require all path components to exist:
`realpath --canonicalize-existing {{path... | |
What is csplit command | # csplit
> Split a file into pieces. This generates files named "xx00", "xx01", and so
> on. More information: https://www.gnu.org/software/coreutils/csplit.
* Split a file at lines 5 and 23:
`csplit {{path/to/file}} {{5}} {{23}}`
* Split a file every 5 lines (this will fail if the total number of lines is not divi... | |
What is ps command | # ps
> Information about running processes. More information:
> https://www.unix.com/man-page/osx/1/ps/.
* List all running processes:
`ps aux`
* List all running processes including the full command string:
`ps auxww`
* Search for a process that matches a string:
`ps aux | grep {{string}}`
* Get the parent PID... | |
What is journalctl command | # journalctl
> Query the systemd journal. More information: https://manned.org/journalctl.
* Show all messages with priority level 3 (errors) from this [b]oot:
`journalctl -b --priority={{3}}`
* Show all messages from last [b]oot:
`journalctl -b -1`
* Delete journal logs which are older than 2 days:
`journalctl -... | |
What is head command | # head
> Output the first part of files. More information:
> https://keith.github.io/xcode-man-pages/head.1.html.
* Output the first few lines of a file:
`head --lines {{8}} {{path/to/file}}`
* Output the first few bytes of a file:
`head --bytes {{8}} {{path/to/file}}`
* Output everything but the last few lines o... | |
What is basename command | # basename
> Remove leading directory portions from a path. More information:
> https://www.gnu.org/software/coreutils/basename.
* Show only the file name from a path:
`basename {{path/to/file}}`
* Show only the rightmost directory name from a path:
`basename {{path/to/directory/}}`
* Show only the file name from... | |
What is git-maintenance command | # git-maintenance
> Run tasks to optimize Git repository data. More information: https://git-
> scm.com/docs/git-maintenance.
* Register the current repository in the user's list of repositories to daily have maintenance run:
`git maintenance register`
* Start running maintenance on the current repository:
`git mai... | |
What is git-diff-files command | # git diff-files
> Compare files using their sha1 hashes and modes. More information:
> https://git-scm.com/docs/git-diff-files.
* Compare all changed files:
`git diff-files`
* Compare only specified files:
`git diff-files {{path/to/file}}`
* Show only the names of changed files:
`git diff-files --name-only`
* ... | |
What is expr command | # expr
> Evaluate expressions and manipulate strings. More information:
> https://www.gnu.org/software/coreutils/expr.
* Get the length of a specific string:
`expr length "{{string}}"`
* Get the substring of a string with a specific length:
`expr substr "{{string}}" {{from}} {{length}}`
* Match a specific substri... | |
What is mv command | # mv
> Move or rename files and directories. More information:
> https://www.gnu.org/software/coreutils/mv.
* Rename a file or directory when the target is not an existing directory:
`mv {{path/to/source}} {{path/to/target}}`
* Move a file or directory into an existing directory:
`mv {{path/to/source}} {{path/to/ex... | |
What is loginctl command | # loginctl
> Manage the systemd login manager. More information:
> https://www.freedesktop.org/software/systemd/man/loginctl.html.
* Print all current sessions:
`loginctl list-sessions`
* Print all properties of a specific session:
`loginctl show-session {{session_id}} --all`
* Print all properties of a specific ... | |
What is cut command | # cut
> Cut out fields from `stdin` or files. More information:
> https://manned.org/man/freebsd-13.0/cut.1.
* Print a specific character/field range of each line:
`{{command}} | cut -{{c|f}} {{1|1,10|1-10|1-|-10}}`
* Print a range of each line with a specific delimiter:
`{{command}} | cut -d "{{,}}" -{{c}} {{1}}`
... | |
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}}`
... | |
What is sleep command | # sleep
> Delay for a specified amount of time. More information:
> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sleep.html.
* Delay in seconds:
`sleep {{seconds}}`
* Execute a specific command after 20 seconds delay:
`sleep 20 && {{command}}` | |
What is printf command | # printf
> Format and print text. More information:
> https://www.gnu.org/software/coreutils/printf.
* Print a text message:
`printf "{{%s\n}}" "{{Hello world}}"`
* Print an integer in bold blue:
`printf "{{\e[1;34m%.3d\e[0m\n}}" {{42}}`
* Print a float number with the Unicode Euro sign:
`printf "{{\u20AC %.2f\n}... | |
What is c99 command | # c99
> Compiles C programs according to the ISO C standard. More information:
> https://manned.org/c99.
* Compile source file(s) and create an executable:
`c99 {{file.c}}`
* Compile source file(s) and create an executable with a custom name:
`c99 -o {{executable_name}} {{file.c}}`
* Compile source file(s) and cr... | |
What is runuser command | # runuser
> Run commands as a specific user and group without asking for password (needs
> root privileges). More information: https://manned.org/runuser.
* Run command as a different user:
`runuser {{user}} -c '{{command}}'`
* Run command as a different user and group:
`runuser {{user}} -g {{group}} -c '{{command}... | |
What is man command | # man
> Format and display manual pages. More information:
> https://www.man7.org/linux/man-pages/man1/man.1.html.
* Display the man page for a command:
`man {{command}}`
* Display the man page for a command from section 7:
`man {{7}} {{command}}`
* List all available sections for a command:
`man -f {{command}}`
... | |
What is git-cherry command | # git cherry
> Find commits that have yet to be applied upstream. More information:
> https://git-scm.com/docs/git-cherry.
* Show commits (and their messages) with equivalent commits upstream:
`git cherry -v`
* Specify a different upstream and topic branch:
`git cherry {{origin}} {{topic}}`
* Limit commits to tho... | |
What is fold command | # fold
> Wrap each line in an input file to fit a specified width and print it to
> `stdout`. More information: https://manned.org/fold.1p.
* Wrap each line to default width (80 characters):
`fold {{path/to/file}}`
* Wrap each line to width "30":
`fold -w30 {{path/to/file}}`
* Wrap each line to width "5" and brea... | |
What is dirname command | # dirname
> Calculates the parent directory of a given file or directory path. More
> information: https://www.gnu.org/software/coreutils/dirname.
* Calculate the parent directory of a given path:
`dirname {{path/to/file_or_directory}}`
* Calculate the parent directory of multiple paths:
`dirname {{path/to/file_a}}... | |
What is tsort command | # tsort
> Perform a topological sort. A common use is to show the dependency order of
> nodes in a directed acyclic graph. More information:
> https://www.gnu.org/software/coreutils/tsort.
* Perform a topological sort consistent with a partial sort per line of input separated by blanks:
`tsort {{path/to/file}}`
* P... | |
What is base32 command | # base32
> Encode or decode file or `stdin` to/from Base32, to `stdout`. More
> information: https://www.gnu.org/software/coreutils/base32.
* Encode a file:
`base32 {{path/to/file}}`
* Decode a file:
`base32 --decode {{path/to/file}}`
* Encode from `stdin`:
`{{somecommand}} | base32`
* Decode from `stdin`:
`{{s... | |
What is git-commit-tree command | # git commit-tree
> Low level utility to create commit objects. See also: `git commit`. More
> information: https://git-scm.com/docs/git-commit-tree.
* Create a commit object with the specified message:
`git commit-tree {{tree}} -m "{{message}}"`
* Create a commit object reading the message from a file (use `-` for... | |
What is reset command | # reset
> Reinitializes the current terminal. Clears the entire terminal screen. More
> information: https://manned.org/reset.
* Reinitialize the current terminal:
`reset`
* Display the terminal type instead:
`reset -q` | |
What is git-init command | # git init
> Initializes a new local Git repository. More information: https://git-
> scm.com/docs/git-init.
* Initialize a new local repository:
`git init`
* Initialize a repository with the specified name for the initial branch:
`git init --initial-branch={{branch_name}}`
* Initialize a repository using SHA256 ... | |
What is csplit command | # csplit
> Split a file into pieces. This generates files named "xx00", "xx01", and so
> on. More information: https://www.gnu.org/software/coreutils/csplit.
* Split a file at lines 5 and 23:
`csplit {{path/to/file}} {{5}} {{23}}`
* Split a file every 5 lines (this will fail if the total number of lines is not divi... | |
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 ... | |
What is sed command | # sed
> Edit text in a scriptable manner. See also: `awk`, `ed`. More information:
> https://keith.github.io/xcode-man-pages/sed.1.html.
* Replace all `apple` (basic regex) occurrences with `mango` (basic regex) in all input lines and print the result to `stdout`:
`{{command}} | sed 's/apple/mango/g'`
* Execute a s... | |
What is dash command | # dash
> Debian Almquist Shell, a modern, POSIX-compliant implementation of `sh` (not
> Bash-compatible). More information: https://manned.org/dash.
* Start an interactive shell session:
`dash`
* Execute specific [c]ommands:
`dash -c "{{echo 'dash is executed'}}"`
* Execute a specific script:
`dash {{path/to/scri... | |
What is ex command | # ex
> Command-line text editor. See also: `vim`. More information:
> https://www.vim.org.
* Open a file:
`ex {{path/to/file}}`
* Save and Quit:
`wq<Enter>`
* Undo the last operation:
`undo<Enter>`
* Search for a pattern in the file:
`/{{search_pattern}}<Enter>`
* Perform a regular expression substitution in ... | |
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 printf command | # printf
> Format and print text. More information:
> https://www.gnu.org/software/coreutils/printf.
* Print a text message:
`printf "{{%s\n}}" "{{Hello world}}"`
* Print an integer in bold blue:
`printf "{{\e[1;34m%.3d\e[0m\n}}" {{42}}`
* Print a float number with the Unicode Euro sign:
`printf "{{\u20AC %.2f\n}... | |
What is pwd command | # pwd
> Print name of current/working directory. More information:
> https://www.gnu.org/software/coreutils/pwd.
* Print the current directory:
`pwd`
* Print the current directory, and resolve all symlinks (i.e. show the "physical" path):
`pwd -P` | |
What is loadkeys command | # loadkeys
> Load the kernel keymap for the console. More information:
> https://manned.org/loadkeys.
* Load a default keymap:
`loadkeys --default`
* Load default keymap when an unusual keymap is loaded and `-` sign cannot be found:
`loadkeys defmap`
* Create a kernel source table:
`loadkeys --mktable`
* Create... | |
What is env command | # env
> Show the environment or run a program in a modified environment. More
> information: https://www.gnu.org/software/coreutils/env.
* Show the environment:
`env`
* Run a program. Often used in scripts after the shebang (#!) for looking up the path to the program:
`env {{program}}`
* Clear the environment and... | |
What is look command | # look
> Look for lines in sorted file. More information: https://manned.org/look.
* Look for lines which begins with the given prefix:
`look {{prefix}} {{path/to/file}}`
* Look for lines ignoring case:
`look --ignore-case {{prefix}} {{path/to/file}}` | |
What is fgrep command | # fgrep
> Matches fixed strings in files. Equivalent to `grep -F`. More information:
> https://www.gnu.org/software/grep/manual/grep.html.
* Search for an exact string in a file:
`fgrep {{search_string}} {{path/to/file}}`
* Search only lines that match entirely in files:
`fgrep -x {{path/to/file1}} {{path/to/file2}... | |
What is df command | # df
> Gives an overview of the filesystem disk space usage. More information:
> https://www.gnu.org/software/coreutils/df.
* Display all filesystems and their disk usage:
`df`
* Display all filesystems and their disk usage in human-readable form:
`df -h`
* Display the filesystem and its disk usage containing the... | |
What is sha512sum command | # sha512sum
> Calculate SHA512 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA512 checksum for one or more files:
`sha512sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA512 checksums to a file:... | |
What is dpkg-deb command | # dpkg-deb
> Pack, unpack and provide information about Debian archives. More
> information: https://manpages.debian.org/latest/dpkg/dpkg-deb.html.
* Display information about a package:
`dpkg-deb --info {{path/to/file.deb}}`
* Display the package's name and version on one line:
`dpkg-deb --show {{path/to/file.deb}... | |
What is updatedb command | # updatedb
> Create or update the database used by `locate`. It is usually run daily by
> cron. More information: https://manned.org/updatedb.
* Refresh database content:
`sudo updatedb`
* Display file names as soon as they are found:
`sudo updatedb --verbose` | |
What is sort command | # sort
> Sort lines of text files. More information:
> https://www.gnu.org/software/coreutils/sort.
* Sort a file in ascending order:
`sort {{path/to/file}}`
* Sort a file in descending order:
`sort --reverse {{path/to/file}}`
* Sort a file in case-insensitive way:
`sort --ignore-case {{path/to/file}}`
* Sort a... | |
What is lex command | # lex
> Lexical analyzer generator. Given the specification for a lexical analyzer,
> generates C code implementing it. More information:
> https://keith.github.io/xcode-man-pages/lex.1.html.
* Generate an analyzer from a Lex file:
`lex {{analyzer.l}}`
* Specify the output file:
`lex {{analyzer.l}} --outfile {{anal... | |
What is ulimit command | # ulimit
> Get and set user limits. More information: https://manned.org/ulimit.
* Get the properties of all the user limits:
`ulimit -a`
* Get hard limit for the number of simultaneously opened files:
`ulimit -H -n`
* Get soft limit for the number of simultaneously opened files:
`ulimit -S -n`
* Set max per-us... | |
What is chfn command | # chfn
> Update `finger` info for a user. More information: https://manned.org/chfn.
* Update a user's "Name" field in the output of `finger`:
`chfn -f {{new_display_name}} {{username}}`
* Update a user's "Office Room Number" field for the output of `finger`:
`chfn -o {{new_office_room_number}} {{username}}`
* Up... | |
What is nice command | # nice
> Execute a program with a custom scheduling priority (niceness). Niceness
> values range from -20 (the highest priority) to 19 (the lowest). More
> information: https://www.gnu.org/software/coreutils/nice.
* Launch a program with altered priority:
`nice -n {{niceness_value}} {{command}}` | |
What is tail command | # tail
> Display the last part of a file. See also: `head`. More information:
> https://manned.org/man/freebsd-13.0/tail.1.
* Show last 'count' lines in file:
`tail -n {{8}} {{path/to/file}}`
* Print a file from a specific line number:
`tail -n +{{8}} {{path/to/file}}`
* Print a specific count of bytes from the e... | |
What is ctags command | # ctags
> Generates an index (or tag) file of language objects found in source files
> for many popular programming languages. More information: https://ctags.io/.
* Generate tags for a single file, and output them to a file named "tags" in the current directory, overwriting the file if it exists:
`ctags {{path/to/fi... | |
What is mkdir command | # mkdir
> Create directories and set their permissions. More information:
> https://www.gnu.org/software/coreutils/mkdir.
* Create specific directories:
`mkdir {{path/to/directory1 path/to/directory2 ...}}`
* Create specific directories and their [p]arents if needed:
`mkdir -p {{path/to/directory1 path/to/directory... | |
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... | |
What is uptime command | # uptime
> Tell how long the system has been running and other information. More
> information: https://ss64.com/osx/uptime.html.
* Print current time, uptime, number of logged-in users and other information:
`uptime` | |
What is sha384sum command | # sha384sum
> Calculate SHA384 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA384 checksum for one or more files:
`sha384sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA384 checksums to a file:... | |
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 s... | |
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]nteracti... | |
What is git-update-ref command | # git update-ref
> Git command for creating, updating, and deleting Git refs. More information:
> https://git-scm.com/docs/git-update-ref.
* Delete a ref, useful for soft resetting the first commit:
`git update-ref -d {{HEAD}}`
* Update ref with a message:
`git update-ref -m {{message}} {{HEAD}} {{4e95e05}}` | |
What is localectl command | # localectl
> Control the system locale and keyboard layout settings. More information:
> https://www.freedesktop.org/software/systemd/man/localectl.html.
* Show the current settings of the system locale and keyboard mapping:
`localectl`
* List available locales:
`localectl list-locales`
* Set a system locale var... | |
What is cat command | # cat
> Print and concatenate files. More information:
> https://keith.github.io/xcode-man-pages/cat.1.html.
* Print the contents of a file to `stdout`:
`cat {{path/to/file}}`
* Concatenate several files into an output file:
`cat {{path/to/file1 path/to/file2 ...}} > {{path/to/output_file}}`
* Append several file... | |
What is fc command | # fc
> Open the most recent command and edit it. More information:
> https://manned.org/fc.
* Open in the default system editor:
`fc`
* Specify an editor to open with:
`fc -e {{'emacs'}}`
* List recent commands from history:
`fc -l`
* List recent commands in reverse order:
`fc -l -r`
* List commands in a give... | |
What is sum command | # sum
> Compute checksums and the number of blocks for a file. A predecessor to the
> more modern `cksum`. More information:
> https://www.gnu.org/software/coreutils/sum.
* Compute a checksum with BSD-compatible algorithm and 1024-byte blocks:
`sum {{path/to/file}}`
* Compute a checksum with System V-compatible alg... | |
What is sha256sum command | # sha256sum
> Calculate SHA256 cryptographic checksums. More information:
> https://www.gnu.org/software/coreutils/manual/html_node/sha2-utilities.html.
* Calculate the SHA256 checksum for one or more files:
`sha256sum {{path/to/file1 path/to/file2 ...}}`
* Calculate and save the list of SHA256 checksums to a file:... | |
What is runcon command | # runcon
> Run a program in a different SELinux security context. With neither context
> nor command, print the current security context. More information:
> https://www.gnu.org/software/coreutils/runcon.
* Determine the current domain:
`runcon`
* Specify the domain to run a command in:
`runcon -t {{domain}}_t {{co... | |
What is curl command | # curl
> Transfers data from or to a server. Supports most protocols, including HTTP,
> FTP, and POP3. More information: https://curl.se/docs/manpage.html.
* Download the contents of a URL to a file:
`curl {{http://example.com}} --output {{path/to/file}}`
* Download a file, saving the output under the filename indi... | |
What is git-verify-commit command | # git verify-commit
> Check for GPG verification of commits. If no commits are verified, nothing
> will be printed, regardless of options specified. More information:
> https://git-scm.com/docs/git-verify-commit.
* Check commits for a GPG signature:
`git verify-commit {{commit_hash1 optional_commit_hash2 ...}}`
* C... | |
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 getfacl command | # getfacl
> Get file access control lists. More information: https://manned.org/getfacl.
* Display the file access control list:
`getfacl {{path/to/file_or_directory}}`
* Display the file access control list with numeric user and group IDs:
`getfacl -n {{path/to/file_or_directory}}`
* Display the file access cont... | |
What is nsenter command | # nsenter
> Run a new command in a running process' namespace. Particularly useful for
> docker images or chroot jails. More information: https://manned.org/nsenter.
* Run a specific command using the same namespaces as an existing process:
`nsenter --target {{pid}} --all {{command}} {{command_arguments}}`
* Run a ... | |
What is rsync command | # rsync
> Transfer files either to or from a remote host (but not between two remote
> hosts), by default using SSH. To specify a remote path, use
> `host:path/to/file_or_directory`. More information:
> https://download.samba.org/pub/rsync/rsync.1.
* Transfer a file:
`rsync {{path/to/source}} {{path/to/destination}}`... | |
What is unexpand command | # unexpand
> Convert spaces to tabs. More information:
> https://www.gnu.org/software/coreutils/unexpand.
* Convert blanks in each file to tabs, writing to `stdout`:
`unexpand {{path/to/file}}`
* Convert blanks to tabs, reading from `stdout`:
`unexpand`
* Convert all blanks, instead of just initial blanks:
`unexp... | |
What is scp command | # scp
> Secure copy. Copy files between hosts using Secure Copy Protocol over SSH.
> More information: https://man.openbsd.org/scp.
* Copy a local file to a remote host:
`scp {{path/to/local_file}} {{remote_host}}:{{path/to/remote_file}}`
* Use a specific port when connecting to the remote host:
`scp -P {{port}} {{... | |
What is timedatectl command | # timedatectl
> Control the system time and date. More information:
> https://manned.org/timedatectl.
* Check the current system clock time:
`timedatectl`
* Set the local time of the system clock directly:
`timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"`
* List available timezones:
`timedatectl list-timezones`
... | |
What is screen command | # screen
> Hold a session open on a remote server. Manage multiple windows with a
> single SSH connection. See also `tmux` and `zellij`. More information:
> https://manned.org/screen.
* Start a new screen session:
`screen`
* Start a new named screen session:
`screen -S {{session_name}}`
* Start a new daemon and l... | |
What is write command | # write
> Write a message on the terminal of a specified logged in user (ctrl-C to
> stop writing messages). Use the `who` command to find out all terminal_ids
> of all active users active on the system. See also `mesg`. More information:
> https://manned.org/write.
* Send a message to a given user on a given termina... | |
What is as command | # as
> Portable GNU assembler. Primarily intended to assemble output from `gcc` to
> be used by `ld`. More information: https://www.unix.com/man-page/osx/1/as/.
* Assemble a file, writing the output to `a.out`:
`as {{path/to/file.s}}`
* Assemble the output to a given file:
`as {{path/to/file.s}} -o {{path/to/output... | |
What is systemd-cat command | # systemd-cat
> Connect a pipeline or program's output streams with the systemd journal.
> More information: https://www.freedesktop.org/software/systemd/man/systemd-
> cat.html.
* Write the output of the specified command to the journal (both output streams are captured):
`systemd-cat {{command}}`
* Write the outp... | |
What is git-rev-parse command | # git rev-parse
> Display metadata related to specific revisions. More information:
> https://git-scm.com/docs/git-rev-parse.
* Get the commit hash of a branch:
`git rev-parse {{branch_name}}`
* Get the current branch name:
`git rev-parse --abbrev-ref {{HEAD}}`
* Get the absolute path to the root directory:
`git ... | |
What is patch command | # patch
> Patch a file (or files) with a diff file. Note that diff files should be
> generated by the `diff` command. More information: https://manned.org/patch.
* Apply a patch using a diff file (filenames must be included in the diff file):
`patch < {{patch.diff}}`
* Apply a patch to a specific file:
`patch {{pat... | |
What is size command | # size
> Displays the sizes of sections inside binary files. More information:
> https://sourceware.org/binutils/docs/binutils/size.html.
* Display the size of sections in a given object or executable file:
`size {{path/to/file}}`
* Display the size of sections in a given object or executable file in [o]ctal:
`size... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.