system stringclasses 1
value | command stringlengths 1 20 | response stringlengths 101 1.77k |
|---|---|---|
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | w | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ps | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ex | # 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 ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | mv | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ps | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ar | # ar
> Create, modify, and extract from Unix archives. Typically used for static
> libraries (`.a`) and Debian packages (`.deb`). See also: `tar`. More
> information: https://manned.org/ar.
* E[x]tract all members from an archive:
`ar x {{path/to/file.a}}`
* Lis[t] contents in a specific archive:
`ar t {{path/to/fi... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | nm | # 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}}`
*... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | su | # 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 a... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | vi | # vi
> This command is an alias of `vim`.
* View documentation for the original command:
`tldr vim` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ln | # 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}} ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | lp | # 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/t... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | bc | # 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}}'`
* E... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cp | # cp
> Copy files and directories. More information:
> https://www.gnu.org/software/coreutils/cp.
* Copy a file to another location:
`cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}`
* Copy a file into another directory, keeping the filename:
`cp {{path/to/source_file.ext}} {{path/to/target_parent_direct... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | id | # id
> Display current user and group identity. More information:
> https://www.gnu.org/software/coreutils/id.
* Display current user's ID (UID), group ID (GID) and groups to which they belong:
`id`
* Display the current user identity as a number:
`id -u`
* Display the current group identity as a number:
`id -g`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | du | # 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-... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dd | # dd
> Convert and copy a file. More information: https://keith.github.io/xcode-
> man-pages/dd.1.html.
* Make a bootable USB drive from an isohybrid file (such like `archlinux-xxx.iso`) and show the progress:
`dd if={{path/to/file.iso}} of={{/dev/usb_device}} status=progress`
* Clone a drive to another drive with ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tr | # 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 occurre... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ar | # ar
> Create, modify, and extract from Unix archives. Typically used for static
> libraries (`.a`) and Debian packages (`.deb`). See also: `tar`. More
> information: https://manned.org/ar.
* E[x]tract all members from an archive:
`ar x {{path/to/file.a}}`
* Lis[t] contents in a specific archive:
`ar t {{path/to/fi... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ed | # ed
> The original Unix text editor. See also: `awk`, `sed`. More information:
> https://www.gnu.org/software/ed/manual/ed_manual.html.
* Start an interactive editor session with an empty document:
`ed`
* Start an interactive editor session with an empty document and a specific [p]rompt:
`ed -p '> '`
* Start an ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | df | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ls | # ls
> List directory contents. More information:
> https://www.gnu.org/software/coreutils/ls.
* List files one per line:
`ls -1`
* List all files, including hidden files:
`ls -a`
* List all files, with trailing `/` added to directory names:
`ls -F`
* Long format list (permissions, ownership, size, and modifica... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | lp | # 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/t... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | nm | # 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}}`
*... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | nl | # nl
> A utility for numbering lines, either from a file, or from `stdin`. More
> information: https://www.gnu.org/software/coreutils/nl.
* Number non-blank lines in a file:
`nl {{path/to/file}}`
* Read from `stdout`:
`cat {{path/to/file}} | nl {{options}} -`
* Number only the lines with printable text:
`nl -t {{... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | od | # 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 du... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cd | # cd
> Change the current working directory. More information:
> https://manned.org/cd.
* Go to the specified directory:
`cd {{path/to/directory}}`
* Go up to the parent of the current directory:
`cd ..`
* Go to the home directory of the current user:
`cd`
* Go to the home directory of the specified user:
`cd ~... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | as | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | su | # 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 a... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | df | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | du | # 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-... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ln | # 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}} ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | m4 | # m4
> Macro processor. More information: https://www.gnu.org/software/m4.
* Process macros in a file:
`m4 {{path/to/file}}`
* Define a macro before processing files:
`m4 -D{{macro_name}}={{macro_value}} {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | nl | # nl
> A utility for numbering lines, either from a file, or from `stdin`. More
> information: https://www.gnu.org/software/coreutils/nl.
* Number non-blank lines in a file:
`nl {{path/to/file}}`
* Read from `stdout`:
`cat {{path/to/file}} | nl {{options}} -`
* Number only the lines with printable text:
`nl -t {{... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | fg | # fg
> Run jobs in foreground. More information: https://manned.org/fg.
* Bring most recently suspended or running background job to foreground:
`fg`
* Bring a specific job to foreground:
`fg %{{job_id}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | bg | # bg
> Resumes jobs that have been suspended (e.g. using `Ctrl + Z`), and keeps
> them running in the background. More information: https://manned.org/bg.
* Resume the most recently suspended job and run it in the background:
`bg`
* Resume a specific job (use `jobs -l` to get its ID) and run it in the background:
`... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ac | # ac
> Print statistics on how long users have been connected. More information:
> https://man.openbsd.org/ac.
* Print how long the current user has been connected in hours:
`ac`
* Print how long users have been connected in hours:
`ac -p`
* Print how long a particular user has been connected in hours:
`ac -p {{u... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ul | # ul
> Performs the underlining of a text. Each character in a given string must be
> underlined separately. More information: https://manned.org/ul.
* Display the contents of the file with underlines where applicable:
`ul {{file.txt}}`
* Display the contents of the file with underlines made of dashes `-`:
`ul -i {... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | wc | # wc
> Count lines, words, or bytes. More information:
> https://ss64.com/osx/wc.html.
* Count lines in file:
`wc -l {{path/to/file}}`
* Count words in file:
`wc -w {{path/to/file}}`
* Count characters (bytes) in file:
`wc -c {{path/to/file}}`
* Count characters in file (taking multi-byte character sets into ac... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | fc | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ld | # ld
> Link object files together. More information:
> https://sourceware.org/binutils/docs-2.38/ld.html.
* Link a specific object file with no dependencies into an executable:
`ld {{path/to/file.o}} --output {{path/to/output_executable}}`
* Link two object files together:
`ld {{path/to/file1.o}} {{path/to/file2.o}... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pr | # 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 numbere... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | mv | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | rm | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | rm | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cp | # cp
> Copy files and directories. More information:
> https://www.gnu.org/software/coreutils/cp.
* Copy a file to another location:
`cp {{path/to/source_file.ext}} {{path/to/target_file.ext}}`
* Copy a file into another directory, keeping the filename:
`cp {{path/to/source_file.ext}} {{path/to/target_parent_direct... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tr | # 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 occurre... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | id | # id
> Display current user and group identity. More information:
> https://www.gnu.org/software/coreutils/id.
* Display current user's ID (UID), group ID (GID) and groups to which they belong:
`id`
* Display the current user identity as a number:
`id -u`
* Display the current group identity as a number:
`id -g`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sh | # 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 ex... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ls | # ls
> List directory contents. More information:
> https://www.gnu.org/software/coreutils/ls.
* List files one per line:
`ls -1`
* List all files, including hidden files:
`ls -a`
* List all files, with trailing `/` added to directory names:
`ls -F`
* Long format list (permissions, ownership, size, and modifica... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dd | # dd
> Convert and copy a file. More information: https://keith.github.io/xcode-
> man-pages/dd.1.html.
* Make a bootable USB drive from an isohybrid file (such like `archlinux-xxx.iso`) and show the progress:
`dd if={{path/to/file.iso}} of={{/dev/usb_device}} status=progress`
* Clone a drive to another drive with ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | od | # 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 du... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pr | # 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 numbere... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pv | # pv
> Monitor the progress of data through a pipe. More information:
> https://manned.org/pv.
* Print the contents of the file and display a progress bar:
`pv {{path/to/file}}`
* Measure the speed and amount of data flow between pipes (`--size` is optional):
`command1 | pv --size {{expected_amount_of_data_for_eta}... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cmp | # 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, a... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dot | # 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 (... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | rev | # rev
> Reverse a line of text. More information: https://manned.org/rev.
* Reverse the text string "hello":
`echo "hello" | rev`
* Reverse an entire file and print to `stdout`:
`rev {{path/to/file}}` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | lex | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | fmt | # fmt
> Reformat a text file by joining its paragraphs and limiting the line width
> to given number of characters (75 by default). More information:
> https://www.gnu.org/software/coreutils/fmt.
* Reformat a file:
`fmt {{path/to/file}}`
* Reformat a file producing output lines of (at most) `n` characters:
`fmt -w ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ldd | # ldd
> Display shared library dependencies of a binary. Do not use on an untrusted
> binary, use objdump for that instead. More information:
> https://manned.org/ldd.
* Display shared library dependencies of a binary:
`ldd {{path/to/binary}}`
* Display all information about dependencies:
`ldd --verbose {{path/to/b... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | yes | # yes
> Output something repeatedly. This command is commonly used to answer yes to
> every prompt by install commands (such as apt-get). More information:
> https://www.gnu.org/software/coreutils/yes.
* Repeatedly output "message":
`yes {{message}}`
* Repeatedly output "y":
`yes`
* Accept everything prompted by ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | man | # 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}}`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | seq | # seq
> Output a sequence of numbers to `stdout`. More information:
> https://www.gnu.org/software/coreutils/seq.
* Sequence from 1 to 10:
`seq 10`
* Every 3rd number from 5 to 20:
`seq 5 3 20`
* Separate the output with a space instead of a newline:
`seq -s " " 5 3 20`
* Format output width to a minimum of 4 d... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | git | # git
> Distributed version control system. Some subcommands such as `commit`,
> `add`, `branch`, `checkout`, `push`, etc. have their own usage
> documentation, accessible via `tldr git subcommand`. More information:
> https://git-scm.com/.
* Check the Git version:
`git --version`
* Show general help:
`git --help`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | awk | # awk
> A versatile programming language for working on files. More information:
> https://github.com/onetrueawk/awk.
* Print the fifth column (a.k.a. field) in a space-separated file:
`awk '{print $5}' {{path/to/file}}`
* Print the second column of the lines containing "foo" in a space-separated file:
`awk '/{{foo... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tbl | # tbl
> Table preprocessor for the groff (GNU Troff) document formatting system. See
> also `groff` and `troff`. More information: https://manned.org/tbl.
* Process input with tables, saving the output for future typesetting with groff to PostScript:
`tbl {{path/to/input_file}} > {{path/to/output.roff}}`
* Typeset ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | env | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | g++ | # g++
> Compiles C++ source files. Part of GCC (GNU Compiler Collection). More
> information: https://gcc.gnu.org.
* Compile a source code file into an executable binary:
`g++ {{path/to/source.cpp}} -o {{path/to/output_executable}}`
* Display common warnings:
`g++ {{path/to/source.cpp}} -Wall -o {{path/to/output_ex... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | who | # who
> Display who is logged in and related data (processes, boot time). More
> information: https://www.gnu.org/software/coreutils/who.
* Display the username, line, and time of all currently logged-in sessions:
`who`
* Display information only for the current terminal session:
`who am i`
* Display all availabl... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cmp | # 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, a... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cat | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | dir | # dir
> List directory contents using one line per file, special characters are
> represented by backslash escape sequences. Works as `ls -C --escape`. More
> information: https://manned.org/dir.
* List all files, including hidden files:
`dir -all`
* List files including their author (`-l` is required):
`dir -l --a... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tee | # tee
> Read from `stdin` and write to `stdout` and files (or commands). More
> information: https://www.gnu.org/software/coreutils/tee.
* Copy `stdin` to each file, and also to `stdout`:
`echo "example" | tee {{path/to/file}}`
* Append to the given files, do not overwrite:
`echo "example" | tee -a {{path/to/file}}... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | c99 | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sum | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cat | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pwd | # 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` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pwd | # 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` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sar | # sar
> Monitor performance of various Linux subsystems. More information:
> https://manned.org/sar.
* Report I/O and transfer rate issued to physical devices, one per second (press CTRL+C to quit):
`sar -b {{1}}`
* Report a total of 10 network device statistics, one per 2 seconds:
`sar -n DEV {{2}} {{10}}`
* Rep... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tac | # tac
> Display and concatenate files with lines in reversed order. See also: `cat`.
> More information: https://www.gnu.org/software/coreutils/tac.
* Concatenate specific files in reversed order:
`tac {{path/to/file1 path/to/file2 ...}}`
* Display `stdin` in reversed order:
`{{cat path/to/file}} | tac`
* Use a s... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | gcc | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sed | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cut | # 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}}`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pax | # pax
> Archiving and copying utility. More information: https://manned.org/pax.1p.
* List the contents of an archive:
`pax -f {{archive.tar}}`
* List the contents of a gzipped archive:
`pax -zf {{archive.tar.gz}}`
* Create an archive from files:
`pax -wf {{target.tar}} {{path/to/file1}} {{path/to/file2}} {{path/... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | scp | # 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}} {{... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | ssh | # ssh
> Secure Shell is a protocol used to securely log onto remote systems. It can
> be used for logging or executing commands on a remote server. More
> information: https://man.openbsd.org/ssh.
* Connect to a remote server:
`ssh {{username}}@{{remote_host}}`
* Connect to a remote server with a specific identity ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | set | # set
> Display, set or unset values of shell attributes and positional parameters.
> More information: https://manned.org/set.
* Display the names and values of shell variables:
`set`
* Mark variables that are modified or created for export:
`set -a`
* Notify of job termination immediately:
`set -b`
* Set vari... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tar | # tar
> Archiving utility. Often combined with a compression method, such as gzip or
> bzip2. More information: https://www.gnu.org/software/tar.
* [c]reate an archive and write it to a [f]ile:
`tar cf {{path/to/target.tar}} {{path/to/file1 path/to/file2 ...}}`
* [c]reate a g[z]ipped archive and write it to a [f]il... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cut | # 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}}`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | top | # top
> Display dynamic real-time information about running processes. More
> information: https://ss64.com/osx/top.html.
* Start `top`, all options are available in the interface:
`top`
* Start `top` sorting processes by internal memory size (default order - process ID):
`top -o mem`
* Start `top` sorting proces... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | cal | # 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:
`... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | gdb | # gdb
> The GNU Debugger. More information: https://www.gnu.org/software/gdb.
* Debug an executable:
`gdb {{executable}}`
* Attach a process to gdb:
`gdb -p {{procID}}`
* Debug with a core file:
`gdb -c {{core}} {{executable}}`
* Execute given GDB commands upon start:
`gdb -ex "{{commands}}" {{executable}}`
*... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tee | # tee
> Read from `stdin` and write to `stdout` and files (or commands). More
> information: https://www.gnu.org/software/coreutils/tee.
* Copy `stdin` to each file, and also to `stdout`:
`echo "example" | tee {{path/to/file}}`
* Append to the given files, do not overwrite:
`echo "example" | tee -a {{path/to/file}}... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | who | # who
> Display who is logged in and related data (processes, boot time). More
> information: https://www.gnu.org/software/coreutils/who.
* Display the username, line, and time of all currently logged-in sessions:
`who`
* Display information only for the current terminal session:
`who am i`
* Display all availabl... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | tty | # tty
> Returns terminal name. More information:
> https://www.gnu.org/software/coreutils/tty.
* Print the file name of this terminal:
`tty` |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | man | # 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}}`
... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | lpr | # lpr
> CUPS tool for printing files. See also: `lpstat` and `lpadmin`. More
> information: https://www.cups.org/doc/man-lpr.html.
* Print a file to the default printer:
`lpr {{path/to/file}}`
* Print 2 copies:
`lpr -# {{2}} {{path/to/file}}`
* Print to a named printer:
`lpr -P {{printer}} {{path/to/file}}`
* P... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | sed | # 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... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | exec | # 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 ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | last | # 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 ... |
You are a linux expert. You understand what every Linux terminal command does and you reply with the explanation when asked. | pwdx | # pwdx
> Print working directory of a process. More information:
> https://manned.org/pwdx.
* Print current working directory of a process:
`pwdx {{process_id}}` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.