neulab/tldr huggingface dataset:
# create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references)
git checkout -b {{branch_name}} {{reference}}
# switch to an existing local branch
git checkout {{branch_name}}
# switch to the previously checked out branch
git checkout -
# switch to an existing remote branch
git checkout --track {{remote_name}}/{{branch_name}}
# discard all unstaged changes in the current directory (see `git reset` for more undolike commands)
git checkout .
# discard unstaged changes to a given file
git checkout {{filename}}
# replace a file in the current directory with the version of it committed in a given branch
git checkout {{branch_name}} -- {{filename}}
# update to the tip of the current branch
hg update
# update to the specified revision
hg update --rev {{revision}}
# update and discard uncommitted changes
hg update --clean
# update to the last commit matching a specified date
hg update --date {{dd-mm-yyyy}}
# view documentation for the original command
tldr nm
# play the given audio file
play {{audiofile}}
# play the given audio files
play {{audiofile1}} {{audiofile2}}
# play the given audio at twice the speed
play {{audiofile}} speed 2.0
# play the given audio in reverse
play {{audiofile}} reverse
# display the partition table stored in an image file
mmls {{path/to/image_file}}
# display the partition table with an additional column for the partition size
mmls -B -i {{path/to/image_file}}
# display the partition table in a split ewf image
mmls -i ewf {{image.e01}} {{image.e02}}
# display nested partition tables
mmls -t {{nested_table_type}} -o {{offset}} {{path/to/image_file}}
# list releases in a github repository, limited to 30 items
gh release list
# display information about a specific release
gh release view {{tag}}
# create a new release
gh release create {{tag}}
# delete a specific release
gh release delete {{tag}}
# download assets from a specific release
gh release download {{tag}}
# upload assets to a specific release
gh release upload {{tag}} {{path/to/file1}} {{path/to/file2}}
# specific information about the message queue which has the id 32768
ipcs -qi 32768
# general information about all the ipc
ipcs -a
# start `mc`
mc
# start `mc` in black and white
mc -b
# start `gpgtui`
gpg-tui
# start `gpgtui` with color and ascii armored output
gpg-tui --style {{colored}} --armor
# show help in `gpgtui`
?
# quit `gpgtui`
q
# interactively generate a new key
g
# export the selected key
x
# set the detail level for the selected key
1|2|3
# refresh `gpgtui`
r
# create a blockmap from image file
bmaptool create -o {{blockmap.bmap}} {{source.img}}
# copy an image file into sdb
bmaptool copy --bmap {{blockmap.bmap}} {{source.img}} {{/dev/sdb}}
# copy a compressed image file into sdb
bmaptool copy --bmap {{blockmap.bmap}} {{source.img.gz}} {{/dev/sdb}}
# copy an image file into sdb without using a blockmap
bmaptool copy --nobmap {{source.img}} {{/dev/sdb}}
# read ocaml commands from the user and execute them
ocaml
# read ocaml commands from a file and execute them
ocaml {{path/to/file.ml}}
# display the information of route table
route -n
# add route rule
sudo route add -net {{ip_address}} netmask {{netmask_address}} gw {{gw_address}}
# delete route rule
sudo route del -net {{ip_address}} netmask {{netmask_address}} dev {{gw_address}}
# convert a scss or sass file to css and print out the result
sass {{inputfile.scss|inputfile.sass}}
# convert a scss or sass file to css and save the result to a file
sass {{inputfile.scss|inputfile.sass}} {{outputfile.css}}
# watch a scss or sass file for changes and output or update the css file with same filename
sass --watch {{inputfile.scss|inputfile.sass}}
# watch a scss or sass file for changes and output or update the css file with the given filename
sass --watch {{inputfile.scss|inputfile.sass}}:{{outputfile.css}}
# display information about currently logged in users
finger
# display information about a specific user
finger {{username}}
# display the user's login name, real name, terminal name, and other information
finger -s
# produce multiline output format displaying same information as `s` as well as user's home directory, home phone number, login shell, mail status, etc.
finger -l
# prevent matching against user's names and only use login names
finger -m
# use unix (or dos) pipes to pipe the stdout of any command through gnomon
{{npm test}} | gnomon
# show number of seconds since the start of the process
{{npm test}} | gnomon --type=elapsed-total
# show an absolute timestamp in utc
{{npm test}} | gnomon --type=absolute
# set a high threshold of 0.5 seconds for the elapsed time; exceeding which the timestamp will be colored bright red
{{npm test}} | gnomon --high {{0.5}}
# set a medium threshold of 0.2 seconds (timestamp will be colored bright yellow)
{{npm test}} | gnomon --medium {{0.2}}
# show the sequence of commits starting from the current one in reverse chronological order
tig
# show the history of a specific branch
tig {{branch}}
# show the history of specific files or directories
tig {{path1 path2 …}}
# show the difference between two references (such as branches or tags)
tig {{base_ref}}..{{compared_ref}}
# display commits from all branches and stashes
tig --all
# start in stash view, displaying all saved stashes
tig stash
# change the owner user of a file/directory
chown {{user}} {{path/to/file_or_directory}}
# change the owner user and group of a file/directory
chown {{user}}:{{group}} {{path/to/file_or_directory}}
# recursively change the owner of a directory and its contents
chown -R {{user}} {{path/to/directory}}
# change the owner of a symbolic link
chown -h {{user}} {{path/to/symlink}}
# change the owner of a file/directory to match a reference file
chown --reference={{path/to/reference_file}} {{path/to/file_or_directory}}
# start runit's 3stage init scheme
runit
# shut down runit
kill --CONT {{runit_pid}}
# start mitmproxy with default settings
mitmproxy
# start mitmproxy bound to custom address and port
mitmproxy -b {{ip_address}} -p {{port}}
# print logs from a container
docker logs {{container_name}}
# print logs and follow them
docker logs -f {{container_name}}
# print last 5 lines
docker logs {{container_name}} --tail {{5}}
# print logs and append them with timestamps
docker logs -t {{container_name}}
# print logs from a certain point in time of container execution (i.e. 23m, 10s, 20130102t132337)
docker logs {{container_name}} --until {{time}}
# display the root location of the current repository
hg root
# display the root location of the specified repository
hg root --cwd {{path/to/directory}}
# convert command output to json via pipe
{{ifconfig}} | jc {{--ifconfig}}
# convert command output to json via magic syntax
jc {{ifconfig}}
# output pretty json via pipe
{{ifconfig}} | jc {{--ifconfig}} -p
# output pretty json via magic syntax
jc -p {{ifconfig}}
# preview an svg
inkview {{path/to/file.svg}}
# preview multiple svgs (use arrow keys to navigate)
inkview {{path/to/file_a.svg}} {{path/to/file_b.svg}} {{path/to/file_c.svg}}
# issue a certificate using webroot mode
acme.sh --issue --domain {{example.com}} --webroot {{/path/to/webroot}}
# issue a certificate for multiple domains using standalone mode using port 80
acme.sh --issue --standalone --domain {{example.com}} --domain {{www.example.com}}
# issue a certificate using standalone tls mode using port 443
acme.sh --issue --alpn --domain {{example.com}}
# issue a certificate using a working nginx configuration
acme.sh --issue --nginx --domain {{example.com}}
# issue a certificate using a working apache configuration
acme.sh --issue --apache --domain {{example.com}}
# issue a wildcard (\*) certificate using an automatic dns api mode
acme.sh --issue --dns {{dns_cf}} --domain {{*.example.com}}
# install certificate files into the specified locations (useful for automatic certificate renewal)
acme.sh --install-cert -d {{example.com}} --key-file {{/path/to/example.com.key}} --fullchain-file {{/path/to/example.com.cer}} --reloadcmd {{"systemctl force-reload nginx"}}
# pack unpacked objects in the current directory
git repack
# also remove redundant objects after packing
git repack -d
# create a black window with display id "2"
Xephyr -br -ac -noreset -screen {{800x600}} {{:2}}
# start an x application on the new screen
DISPLAY=:2 {{command_name}}
# launch josm
josm
# launch josm in maximized mode
josm --maximize
# launch josm and set a specific language
josm --language {{de}}
# launch josm and reset all preferences to their default values
josm --reset-preferences
# launch josm and download a specific bounding box
josm --download {{minlat,minlon,maxlat,maxlon}}
# launch josm and download a specific bounding box as raw gps
josm --downloadgps {{minlat,minlon,maxlat,maxlon}}
# launch josm without plugins
josm --skip-plugins
# 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 hostname column last to prevent truncation
last -F -a
# view all logins by a specific user and show the ip address instead of the hostname
last {{username}} -i
# view all recorded reboots (i.e., the last logins of the pseudo user "reboot")
last reboot
# view all recorded shutdowns (i.e., the last logins of the pseudo user "shutdown")
last shutdown
# commit staged files to the repository
hg commit
# commit a specific file or directory
hg commit {{path/to/file_or_directory}}
# commit with a specific message
hg commit --message {{message}}
# commit all files matching a specified pattern
hg commit --include {{pattern}}
# commit all files, excluding those that match a specified pattern
hg commit --exclude {{pattern}}
# commit using the interactive mode
hg commit --interactive
# format the output of a command for a 30 characters wide display
printf "header1 header2\nbar foo\n" | column --output-width {{30}}
# split columns automatically and autoalign them in a tabular format
printf "header1 header2\nbar foo\n" | column --table
# specify the column delimiter character for the `table` option (e.g. "," for csv) (defaults to whitespace)
printf "header1,header2\nbar,foo\n" | column --table --separator {{,}}
# fill rows before filling columns
printf "header1\nbar\nfoobar\n" | column --output-width {{30}} --fillrows
# list connected minions
salt '*' test.ping
# execute a highstate on all connected minions
salt '*' state.highstate
# upgrade packages using the os package manager (apt, yum, brew) on a subset of minions
salt '*.example.com' pkg.upgrade
# execute an arbitrary command on a particular minion
salt '{{minion_id}}' cmd.run "ls "
# terminate a process using the default sigterm (terminate) signal
killall {{process_name}}
# list available signal names (to be used without the 'sig' prefix)
killall --list
# interactively ask for confirmation before termination
killall -i {{process_name}}
# terminate a process using the sigint (interrupt) signal, which is the same signal sent by pressing `ctrl + c`
killall -INT {{process_name}}
# force kill a process
killall -KILL {{process_name}}
# 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}}
# connect to an influxdb running on localhost with no credentials
influx
# connect with a specific username (will prompt for a password)
influx -username {{username}} -password ""
# connect to a specific host
influx -host {{hostname}}
# use a specific database
influx -database {{database_name}}
# execute a given command
influx -execute "{{influxql_command}}"
# return output in a specific format
influx -execute "{{influxql_command}}" -format {{json|csv|column}}
# build the package or packages defined by the `cargo.toml` manifest file in the local path
cargo build
# build artifacts in release mode, with optimizations
cargo build --release
# require that `cargo.lock` is up to date
cargo build --locked
# build all packages in the workspace
cargo build --workspace
# build a specific package
cargo build --package {{package}}
# build only the specified binary
cargo build --bin {{name}}
# build only the specified test target
cargo build --test {{testname}}
# start a repl (interactive shell)
sbcl
# execute a lisp script
sbcl --script {{path/to/script.lisp}}
# compress a file
bzip2 {{path/to/file_to_compress}}
# decompress a file
bzip2 -d {{path/to/compressed_file.bz2}}
# decompress a file to standard output
bzip2 -dc {{path/to/compressed_file.bz2}}
# run a project if the current directory contains a `project.godot` file, otherwise open the project manager
godot
# edit a project (the current directory must contain a `project.godot` file)
godot -e
# open the project manager even if the current directory contains a `project.godot` file
godot -p
# export a project for a given export preset (the preset must be defined in the project)
godot --export {{preset}} {{output_path}}
# execute a standalone gdscript file (the script must inherit from `scenetree` or `mainloop`)
godot -s {{script.gd}}
# import a json file into a specific collection
mongoimport --file={{path/to/file.json}} --uri={{mongodb_uri}} --collection={{collection_name}}
# import a csv file, using the first line of the file to determine field names
mongoimport --type={{csv}} --file={{path/to/file.csv}} --db={{database_name}} --collection={{collection_name}}
# import a json array, using each element as a separate document
mongoimport --jsonArray --file={{path/to/file.json}}
# import a json file using a specific mode and a query to match existing documents
mongoimport --file={{path/to/file.json}} --mode={{delete|merge|upsert}} --upsertFields="{{field1,field2,...}}"
# import a csv file, reading field names from a separate csv file and ignoring fields with empty values
mongoimport --type={{csv}} --file={{path/to/file.csv}} --fieldFile={{path/to/field_file.csv}} --ignoreBlanks
# display help
mongoimport --help
# adjust one or more directed graphs to improve the layout aspect ratio
unflatten {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}
# use `unflatten` as a preprocessor for `dot` layout to improve aspect ratio
unflatten {{path/to/input.gv}} | dot -T {{png}} {{path/to/output.png}}
# display help for `unflatten`
unflatten -?
# list all available generators to destroy
rails destroy
# destroy a model named post
rails destroy model {{Post}}
# destroy a controller named posts
rails destroy controller {{Posts}}
# destroy a migration that creates posts
rails destroy migration {{CreatePosts}}
# destroy a scaffold for a model named post
rails destroy scaffold {{Post}}
# initialize a new platformio project
pio project init
# initialize a new platformio project in a specific directory
pio project init --project-dir {{path/to/project_directory}}
# initialize a new platformio project, specifying a board id
pio project init --board {{ATmega328P|uno|...}}
# initialize a new platformio based project, specifying one or more project options
pio project init --project-option="{{option}}={{value}}" --project-option="{{option}}={{value}}"
# print the configuration of a project
pio project config
# lint files in the "src" directory
xo
# lint a given set of files
xo {{file1}}.js {{file2}}.js
# automatically fix any lint issues found
xo --fix
# lint using spaces as indentation instead of tabs
xo --space
# lint using the "prettier" code style
xo --prettier
# print pdf file information
pdfinfo {{path/to/file.pdf}}
# specify user password for pdf file to bypass security restrictions
pdfinfo -upw {{password}} {{path/to/file.pdf}}
# specify owner password for pdf file to bypass security restrictions
pdfinfo -opw {{password}} {{path/to/file.pdf}}
# unmount a filesystem, by passing the path to the source it is mounted from
umount {{path/to/device_file}}
# unmount a filesystem, by passing the path to the target where it is mounted
umount {{path/to/mounted_directory}}
# unmount all mounted filesystems (except the `proc` filesystem)
umount -a
# list information about a resource with more details
kubectl get {{pod|service|deployment|ingress|...}} -o wide
# update specified pod with the label 'unhealthy' and the value 'true'
kubectl label pods {{name}} unhealthy=true
# list all resources with different types
kubectl get all
# display resource (cpu/memory/storage) usage of nodes or pods
kubectl top {{pod|node}}
# print the address of the master and cluster services
kubectl cluster-info
# display an explanation of a specific field
kubectl explain {{pods.spec.containers}}
# print the logs for a container in a pod or specified resource
kubectl logs {{pod_name}}
# run command in an existing pod
kubectl exec {{pod_name}} -- {{ls /}}
# 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 rev-parse --show-toplevel
# colorize one or more ranked digraph (that were already processed by `dot`)
gvcolor {{path/to/layout1.gv}} {{path/to/layout2.gv ...}} > {{path/to/output.gv}}
# lay out a graph and colorize it, then convert to a png image
dot {{path/to/input.gv}} | gvcolor | dot -T {{png}} > {{path/to/output.png}}
# display help for `gvcolor`
gvcolor -?
# display each line once
sort {{file}} | uniq
# display only unique lines
sort {{file}} | uniq -u
# display only duplicate lines
sort {{file}} | uniq -d
# display number of occurrences of each line along with that line
sort {{file}} | uniq -c
# display number of occurrences of each line, sorted by the most frequent
sort {{file}} | uniq -c | sort -nr
# run command in a new container from a tagged image
docker run {{image:tag}} {{command}}
# run command in a new container in background and display its id
docker run -d {{image}} {{command}}
# run command in a oneoff container in interactive mode and pseudotty
docker run --rm -it {{image}} {{command}}
# run command in a new container with passed environment variables
docker run -e '{{variable}}={{value}}' -e {{variable}} {{image}} {{command}}
# run command in a new container with bind mounted volumes
docker run -v {{path/to/host_path}}:{{path/to/container_path}} {{image}} {{command}}
# run command in a new container with published ports
docker run -p {{host_port}}:{{container_port}} {{image}} {{command}}
# show the content of all global and local `.gitignore` files
git ignore
# ignore file(s) privately, updating `.git/info/exclude` file
git ignore {{file_pattern}} --private
# ignore file(s) locally, updating local `.gitignore` file
git ignore {{file_pattern}}
# ignore file(s) globally, updating global `.gitignore` file
git ignore {{file_pattern}} --global
# show help and list subcommands
pio --help
# print the version number and exit
pio --version
# show help for a specific subcommand
pio {{subcommand}} --help
# roll 3 6sided dice and sums the results
roll {{3d}}
# roll 1 8sided die, add 3 and sum the results
roll {{d8 + 3}}
# roll 4 6sided dice, keep the 3 highest results and sum the results
roll {{4d6h3}}
# roll 2 12sided dice 2 times and show every roll
roll --verbose {{2{2d12}}}
# roll 2 20sided dice until the result is bigger than 10
roll "{{2d20>10}}"
# roll 2 5sided dice 3 times and show the total sum
roll --sum-series {{3{2d5}}}
# create a database at `/usr/local/var/postgres`
initdb -D /usr/local/var/postgres
# run the previous command as root (`!!` is replaced by the previous command)
sudo !!
# run a command with the last argument of the previous command
{{command}} !$
# run a command with the first argument of the previous command
{{command}} !^
# run the nth command of the history
!{{n}}
# run the command `n` lines back in the history
!-{{n}}
# run the most recent command containing `string`
!?{{string}}?
# run the previous command, replacing `string1` with `string2`
^{{string1}}^{{string2}}^
# perform a history expansion, but print the command that would be run instead of actually running it
{{!-n}}:p
# 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
# return all nodes (tags) named "foo"
xmllint --xpath "//{{foo}}" {{source_file.xml}}
# return the contents of the first node named "foo" as a string
xmllint --xpath "string(//{{foo}})" {{source_file.xml}}
# return the href attribute of the second anchor element in an html file
xmllint --html --xpath "string(//a[2]/@href)" webpage.xhtml
# return humanreadable (indented) xml from file
xmllint --format {{source_file.xml}}
# check that an xml file meets the requirements of its doctype declaration
xmllint --valid {{source_file.xml}}
# validate xml against dtd schema hosted online
xmllint --dtdvalid {{URL}} {{source_file.xml}}
# find and compile all modules in the current directory
ghc Main
# compile a single file
ghc {{file.hs}}
# compile using extra optimization
ghc -O {{file.hs}}
# stop compilation after generating object files (.o)
ghc -c {{file.hs}}
# evaluate a single expression
ghc -e {{expression}}
# analyse a directory and print the result
phploc {{path/to/directory}}
# include only specific files from a commaseparated list (globs are allowed)
phploc {{path/to/directory}} --names {{files}}
# exclude specific files from a commaseparated list (globs are allowed)
phploc {{path/to/directory}} --names-exclude {{files}}
# exclude a specific directory from analysis
phploc {{path/to/directory}} --exclude {{path/to/exclude_directory}}
# log the results to a specific csv file
phploc {{path/to/directory}} --log-csv {{path/to/file}}
# log the results to a specific xml file
phploc {{path/to/directory}} --log-xml {{path/to/file}}
# count phpunit test case classes and test methods
phploc {{path/to/directory}} --count-tests
# interactively create a `package.json` file
npm init
# download all the packages listed as dependencies in package.json
npm install
# download a specific version of a package and add it to the list of dependencies in `package.json`
npm install {{module_name}}@{{version}}
# download a package and add it to the list of dev dependencies in `package.json`
npm install {{module_name}} --save-dev
# download a package and install it globally
npm install --global {{module_name}}
# uninstall a package and remove it from the list of dependencies in `package.json`
npm uninstall {{module_name}}
# print a tree of locally installed dependencies
npm list
# list toplevel globally installed modules
npm list --global --depth={{0}}
# open a file
nvim {{file}}
# enter text editing mode (insert mode)
<Esc>i
# copy ("yank") or cut ("delete") the current line (paste it with `p`)
<Esc>{{yy|dd}}
# undo the last operation
<Esc>u
# search for a pattern in the file (press `n`/`n` to go to next/previous match)
<Esc>/{{search_pattern}}<Enter>
# perform a regular expression substitution in the whole file
<Esc>:%s/{{regular_expression}}/{{replacement}}/g<Enter>
# save (write) the file, and quit
<Esc>:wq<Enter>
# quit without saving
<Esc>:q!<Enter>
# compress a file with default options
pigz {{filename}}
# compress a file using the best compression method
pigz -9 {{filename}}
# compress a file using no compression and 4 processors
pigz -0 -p{{4}} {{filename}}
# compress a directory using tar
tar cf - {{path/to/directory}} | pigz > {{filename}}.tar.gz
# decompress a file
pigz -d {{archive.gz}}
# list the contents of an archive
pigz -l {{archive.tar.gz}}
# list secret keys for the current repository
gh secret list
# list secret keys for a specific organization
gh secret list --org {{organization}}
# list secret keys for a specific repository
gh secret list --repo {{owner}}/{{repository}}
# set an organization secret for specific repositories
gh secret set {{name}} --org {{organization}} --repos {{repository1,repository2}}
# remove a secret for the current repository
gh secret remove {{name}}
# remove a secret for a specific organization
gh secret remove {{name}} --org {{organization}}
# [c]reate an archive and write it to a [f]ile
tar cf {{target.tar}} {{file1}} {{file2}} {{file3}}
# [c]reate a g[z]ipped archive and write it to a [f]ile
tar czf {{target.tar.gz}} {{file1}} {{file2}} {{file3}}
# [c]reate a g[z]ipped archive from a directory using relative paths
tar czf {{target.tar.gz}} --directory={{path/to/directory}} .
# e[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely
tar xvf {{source.tar[.gz|.bz2|.xz]}}
# e[x]tract a (compressed) archive [f]ile into the target directory
tar xf {{source.tar[.gz|.bz2|.xz]}} --directory={{directory}}
# [c]reate a compressed archive and write it to a [f]ile, using [a]rchive suffix to determine the compression program
tar caf {{target.tar.xz}} {{file1}} {{file2}} {{file3}}
# lis[t] the contents of a tar [f]ile [v]erbosely
tar tvf {{source.tar}}
# e[x]tract files matching a pattern from an archive [f]ile
tar xf {{source.tar}} --wildcards "{{*.html}}"
# perform a full update of all packages, development platforms and global libraries
pio update
# update core packages only (skips platforms and libraries)
pio update --core-packages
# check for new versions of packages, platforms and libraries but do not actually update them
pio update --dry-run
# start a repl (interactive shell)
R
# check r version
R --version
# start r in vanilla mode (i.e. a blank session that doesn't save the workspace at the end)
R --vanilla
# execute a file
R -f {{path/to/file.R}}
# execute an r expression and then exit
R -e {{expr}}
# run r with a debugger
R -d {{debugger}}
# check r packages from package sources
R CMD check {{path/to/package_source}}
# edit sudoers file
sudo visudo
# check sudoers file for errors
sudo visudo -c
# display help
gh ssh-key
# list ssh keys for the currently authenticated user
gh ssh-key list
# add an ssh key to the currently authenticated user's account
gh ssh-key add {{path/to/key.pub}}
# add an ssh key to the currently authenticated user's account with a specific title
gh ssh-key add --title {{title}} {{path/to/key.pub}}
# generate a man page for an executable
help2man {{executable}}
# specify the "name" paragraph in the man page
help2man {{executable}} --name {{name}}
# specify the section for the man page (defaults to 1)
help2man {{executable}} --section {{section}}
# output to a file instead of stdout
help2man {{executable}} --output {{path/to/file}}
# display detailed help
help2man --help
# start sdcv interactively
sdcv
# list installed dictionaries
sdcv --list-dicts
# display a definition from a specific dictionary
sdcv --use-dict {{dictionary_name}} {{search_term}}
# look up a definition with a fuzzy search
sdcv {{search_term}}
# look up a definition with an exact search
sdcv --exact-search {{search_term}}
# look up a definition and format the output as json
sdcv --json {{search_term}}
# search for dictionaries in a specific directory
sdvc --data-dir {{path/to/directory}} {{search_term}}
# show all stats for all columns
csvstat {{data.csv}}
# show all stats for columns 2 and 4
csvstat -c {{2,4}} {{data.csv}}
# show sums for all columns
csvstat --sum {{data.csv}}
# show the max value length for column 3
csvstat -c {{3}} --len {{data.csv}}
# show the number of unique values in the "name" column
csvstat -c {{name}} --unique {{data.csv}}
# generate a certificate signing request to be sent to a certificate authority
openssl req -new -sha256 -key {{filename.key}} -out {{filename.csr}}
# generate a selfsigned certificate and a corresponding keypair, storing both in a file
openssl req -new -x509 -newkey {{rsa}}:{{4096}} -keyout {{filename.key}} -out {{filename.cert}} -subj "{{/C=XX/CN=foobar}}" -days {{365}}
# fill a fake flash drive with a single partition that matches its real capacity
sudo f3fix {{/dev/device_name}}
# mark the partition as bootable
sudo f3fix --boot {{/dev/device_name}}
# specify the filesystem
sudo f3fix --fs-type={{filesystem_type}} {{/dev/device_name}}
# execute two different commands based on a condition
if {{command}}; then {{echo "true"}}; else {{echo "false"}}; fi
# check if a variable is defined
if [[ -n "{{$VARIABLE}}" ]]; then {{echo "defined"}}; else {{echo "not defined"}}; fi
# check if a file exists
if [[ -f "{{path/to/file}}" ]]; then {{echo "true"}}; else {{echo "false"}}; fi
# check if a directory exists
if [[ -d "{{path/to/directory}}" ]]; then {{echo "true"}}; else {{echo "false"}}; fi
# check if a file or directory exists
if [[ -e "{{path/to/file_or_directory}}" ]]; then {{echo "true"}}; else {{echo "false"}}; fi
# list all possible conditions (`test` is an alias to `[`; both are commonly used with `if`)
man [
# compile one or more c# files to a cil executable
csc {{path/to/input_file_a.cs}} {{path/to/input_file_b.cs}}
# specify the output filename
csc /out:{{path/to/filename}} {{path/to/input_file.cs}}
# compile into a `.dll` library instead of an executable
csc /target:library {{path/to/input_file.cs}}
# reference another assembly
csc /reference:{{path/to/library.dll}} {{path/to/input_file.cs}}
# embed a resource
csc /resource:{{path/to/resource_file}} {{path/to/input_file.cs}}
# automatically generate xml documentation
csc /doc:{{path/to/output.xml}} {{path/to/input_file.cs}}
# specify an icon
csc /win32icon:{{path/to/icon.ico}} {{path/to/input_file.cs}}
# stronglyname the resulting assembly with a keyfile
csc /keyfile:{{path/to/keyfile}} {{path/to/input_file.cs}}
# start couchdb
couchdb
# start couchdb interactive shell
couchdb -i
# start couchdb as a background process
couchdb -b
# kill the background process (note it will respawn if needed)
couchdb -k
# shutdown the background process
couchdb -d
# list connected solos
solo ls
# update the currently connected solo's firmware to the latest version
solo key update
# blink the led of a specific solo
solo key wink --serial {{serial_number}}
# generate random bytes using the currently connected solo's secure random number generator
solo key rng raw
# monitor the serial output of a solo
solo monitor {{path/to/serial_port}}
# connect to a remote server using a password supplied on a file descriptor (in this case, stdin)
sshpass -d {{0}} ssh {{user}}@{{hostname}}
# connect to a remote server with the password supplied as an option, and automatically accept unknown ssh keys
sshpass -p {{password}} ssh -o StrictHostKeyChecking=no {{user}}@{{hostname}}
# connect to a remote server using the first line of a file as the password, automatically accept unknown ssh keys, and launch a command
sshpass -f {{file}} ssh -o StrictHostKeyChecking=no {{user}}@{{hostname}} "{{command}}"
# apply a patch
xdelta -d -s {{path/to/input_file}} {{path/to/delta_file.xdelta}} {{path/to/output_file}}
# create a patch
xdelta -e -s {{path/to/old_file}} {{path/to/new_file}} {{path/to/output_file.xdelta}}
# list of all settable options and whether they are set
shopt
# set an option
shopt -s {{option_name}}
# unset an option
shopt -u {{option_name}}
# print a list of all options and their status formatted as runnable `shopt` commands
shopt -p
# show help for the command
help shopt
# show events for today and tomorrow (or the weekend on friday) from the default calendar
calendar
# look [a]head, showing events for the next 30 days
calendar -A {{30}}
# look [b]ack, showing events for the previous 7 days
calendar -B {{7}}
# show events from a custom calendar [f]ile
calendar -f {{path/to/file}}
# list all running containers
docker-compose ps
# create and start all containers in the background using a `dockercompose.yml` file from the current directory
docker-compose up -d
# start all containers, rebuild if necessary
docker-compose up --build
# start all containers using an alternate compose file
docker-compose --file {{path/to/file}} up
# stop all running containers
docker-compose stop
# stop and remove all containers, networks, images, and volumes
docker-compose down --rmi all --volumes
# follow logs for all containers
docker-compose logs --follow
# follow logs for a specific container
docker-compose logs --follow {{container_name}}
# show commits that haven't been pushed
git local-commits
# 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}}"
# ifelse statement
test {{condition}} && {{echo "true"}} || {{echo "false"}}
# delete a local and remote git branch
git delete-branch {{branch_name}}
# delete multiple local and remote git branches
git delete-branch {{branch_name1 branch_name2 ...}}
# start elinks
elinks
# quit elinks
Ctrl + C
# dump output of webpage to console, colorizing the text with ansi control codes
elinks -dump -dump-color-mode {{1}} {{url}}
# start the current application in development mode
next dev
# start the current application and listen on a specific port
next dev --port {{port}}
# build the current application optimized for production
next build
# start the compiled application in production mode
next start
# start the compiled application and listen on a specific port
next start --port {{port}}
# export the current application to static html pages
next export
# display the next.js telemetry status
next telemetry
# display help for a subcommand
next {{build|dev|export|start|telemetry}} --help
# add new task
task add {{thing_to_do}}
# list tasks
task list
# mark task as completed
task {{task_id}} done
# modify task
task {{task_id}} modify {{new_thing_to_do}}
# delete task
task {{task_id}} delete
# print a license to stdout, using the defaults (autodetected author name, and current year)
license {{license_name}}
# generate a license and save it to a file
license -o {{filename}} {{license_name}}
# list all available licenses
license ls
# generate a license with custom author name and year
license --name {{author}} --year {{release_year}} {{license_name}}
# extract all images from a pdf file and save them as pngs
pdfimages -png {{path/to/file.pdf}} {{filename_prefix}}
# extract images from pages 3 to 5
pdfimages -f {{3}} -l {{5}} {{path/to/file.pdf}} {{filename_prefix}}
# extract images from a pdf file and include the page number in the output filenames
pdfimages -p {{path/to/file.pdf}} {{filename_prefix}}
# list information about all the images in a pdf file
pdfimages -list {{path/to/file.pdf}}
# display amount of program memory available
st-info --flash
# display amount of sram memory available
st-info --sram
# display summarized information of the device
st-info --probe
# install one or more spaceseparated versions of ruby
rvm install {{version(s)}}
# display a list of installed versions
rvm list
# use a specific version of ruby
rvm use {{version}}
# set the default ruby version
rvm --default use {{version}}
# upgrade a version of ruby to a new version
rvm upgrade {{current_version}} {{new_version}}
# uninstall a version of ruby and keep its sources
rvm uninstall {{version}}
# remove a version of ruby and its sources
rvm remove {{version}}
# show specific dependencies for your os
rvm requirements
# kill all processes which match
pkill -9 "{{process_name}}"
# kill all processes which match their full command instead of just the process name
pkill -9 --full "{{command_name}}"
# send sigusr1 signal to processes which match
pkill -USR1 "{{process_name}}"
# kill the main `firefox` process to close the browser
pkill --oldest "{{firefox}}"
# list all installed development platforms
pio platform list
# search for existing development platforms
pio platform search {{platform}}
# show details about a development platform
pio platform show {{platform}}
# install a development platform
pio platform install {{platform}}
# update installed development platforms
pio platform update
# uninstall a development platform
pio platform uninstall {{platform}}
# list all supported frameworks
pio platform frameworks
# extract an archive to the current directory
unar {{archive}}
# extract an archive to the specified directory
unar -o {{path/to/directory}} {{archive}}
# force overwrite if files to be unpacked already exist
unar -f {{archive}}
# force rename if files to be unpacked already exist
unar -r {{archive}}
# force skip if files to be unpacked already exist
unar -s {{archive}}
# output a json file, in prettyprint format
jq . {{file.json}}
# output all elements from arrays (or all the values from objects) in a json file
jq '.[]' {{file.json}}
# read json objects from a file into an array, and output it (inverse of `jq .[]`)
jq --slurp . {{file.json}}
# output the first element in a json file
jq '.[0]' {{file.json}}
# output the value of a given key of each element in a json text from stdin
cat {{file.json}} | jq 'map(.{{key_name}})'
# output the value of multiple keys as a new json object (assuming the input json has the keys `key_name` and `other_key_name`)
cat {{file.json}} | jq '{{{my_new_key}}: .{{key_name}}, {{my_other_key}}: .{{other_key_name}}}'
# combine multiple filters
cat {{file.json}} | jq 'unique | sort | reverse'
# output the value of a given key to a string (and disable json output)
cat {{file.json}} | jq --raw-output '"some text: \(.{{key_name}})"'
# display a forecast using metric units for the next five days for rzeszow, poland
ansiweather -u {{metric}} -f {{5}} -l {{Rzeszow,PL}}
# display a forecast showing symbols and daylight data for your current location
ansiweather -s {{true}} -d {{true}}
# display a forecast showing wind and humidity data for your current location
ansiweather -w {{true}} -h {{true}}
# calculate the sha1 checksum for a file
shasum {{path/to/file}}
# calculate the sha256 checksum for a file
shasum --algorithm 256 {{path/to/file}}
# calculate the sha512 checksum for multiple files
shasum --algorithm 512 {{path/to/file1}} {{path/to/file2}}
# calculate and save the list of sha256 checksums to a file
shasum --algorithm 256 {{path/to/file1}} {{path/to/file2}} > {{path/to/file.sha256}}
# check a file with a list of sums against the directory's files
shasum --check {{path/to/file}}
# check a list of sums and only show a message for files for which verification fails
shasum --check --quiet {{path/to/file}}
# calculate the sha1 checksum from stdin
{{some_command}} | shasum
# create a new environment
virtualenv {{path/to/venv}}
# customize the prompt prefix
virtualenv --prompt={{prompt_prefix}} {{path/to/venv}}
# use a different version of python with virtualenv
virtualenv --python={{path/to/pythonbin}} {{path/to/venv}}
# start (select) the environment
source {{path/to/venv}}/bin/activate
# stop the environment
deactivate
# display all filesystems and their disk usage
df
# display all filesystems and their disk usage in humanreadable form
df -h
# display the filesystem and its disk usage containing the given file or directory
df {{path/to/file_or_directory}}
# display statistics on the number of free inodes
df -i
# display filesystems but exclude the specified types
df -x {{squashfs}} -x {{tmpfs}}
# check out a working copy from a repository
svn co {{url/to/repository}}
# bring changes from the repository into the working copy
svn up
# put files and directories under version control, scheduling them for addition to repository. they will be added in next commit
svn add {{PATH}}
# send changes from your working copy to the repository
svn ci -m {{commit_log_message}} [{{PATH}}]
# display changes from the last 10 revisions, showing modified files for each revision
svn log -vl {{10}}
# show detailed help
svn help
# push an app using the default settings
cf push {{app_name}}
# view the services available from your organization
cf marketplace
# create a service instance
cf create-service {{service}} {{plan}} {{service_name}}
# connect an application to a service
cf bind-service {{app_name}} {{service_name}}
# run a script whose code is included in the app, but runs independently
cf run-task {{app_name}} "{{script_command}}" --name {{task_name}}
# start an interactive ssh session with a vm hosting an app
cf ssh {{app_name}}
# view a dump of recent app logs
cf logs {{app_name}} --recent
# get an ip address for the `eth0` interface
sudo dhclient {{eth0}}
# release an ip address for the `eth0` interface
sudo dhclient -r {{eth0}}
# add a file to the index
git add {{path/to/file}}
# add all files (tracked and untracked)
git add -A
# only add already tracked files
git add -u
# also add ignored files
git add -f
# interactively stage parts of files
git add -p
# interactively stage parts of a given file
git add -p {{path/to/file}}
# interactively stage a file
git add -i
# display each file in the repository, showing commits and active days
git effort
# display files modified by a specific number of commits or more, showing commits and active days
git effort --above {{5}}
# display files modified by a specific author, showing commits and active days
git effort -- --author="{{username}}"
# display files modified since a specific time/date, showing commits and active days
git effort -- --since="{{last month}}"
# display only the specified files or directories, showing commits and active days
git effort {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}
# display all files in a specific directory, showing commits and active days
git effort {{path/to/directory/*}}
# convert a `webp` file into a `png` file
dwebp {{path/to/input.webp}} -o {{path/to/output.png}}
# convert a `webp` file into a specific filetype
dwebp {{path/to/input.webp}} -bmp|-tiff|-pam|-ppm|-pgm|-yuv -o {{path/to/output}}
# convert a `webp` file, using multithreading if possible
dwebp {{path/to/input.webp}} -o {{path/to/output.png}} -mt
# convert a `webp` file, but also crop and scale at the same time
dwebp {{input.webp}} -o {{output.png}} -crop {{x_pos}} {{y_pos}} {{width}} {{height}} -scale {{width}} {{height}}
# convert a `webp` file and flip the output
dwebp {{path/to/input.webp}} -o {{path/to/output.png}} -flip
# convert a `webp` file and don't use inloop filtering to speed up the decoding process
dwebp {{path/to/input.webp}} -o {{path/to/output.png}} -nofilter
# download a remote image from sylabs cloud
singularity pull --name {{image.sif}} {{library://godlovedc/funny/lolcow:latest}}
# rebuild a remote image using the latest singularity image format
singularity build {{image.sif}} {{docker://godlovedc/lolcow}}
# start a container from an image and get a shell inside it
singularity shell {{image.sif}}
# start a container from an image and run a command
singularity exec {{image.sif}} {{command}}
# start a container from an image and execute the internal runscript
singularity run {{image.sif}}
# build a singularity image from a recipe file
sudo singularity build {{image.sif}} {{recipe}}
# speak a phrase aloud
espeak "I like to ride my bike."
# speak a file aloud
espeak -f {{filename}}
# save output to a wav audio file, rather than speaking it directly
espeak -w {{filename.wav}} "It's GNU plus Linux"
# use a different voice
espeak -v {{voice}}
# flush all pending write operations on all disks
sync
# flush all pending write operations on a single file to disk
sync {{path/to/file}}
# connect to a hypervisor session
virsh connect {{qemu:///system}}
# list all domains
virsh list --all
# dump guest configuration file
virsh dumpxml {{guest_id}} > {{path/to/guest.xml}}
# create a guest from a configuration file
virsh create {{path/to/config_file.xml}}
# edit a guest's configuration file (editor can be changed with $editor)
virsh edit {{guest_id}}
# start/reboot/shutdown/suspend/resume a guest
virsh {{command}} {{guest_id}}
# save the current state of a guest to a file
virsh save {{guest_id}} {{filename}}
# delete a running guest
virsh destroy {{guest_id}} && virsh undefine {{guest_id}}
# launch the default merge tool to resolve conflicts
git mergetool
# list valid merge tools
git mergetool --tool-help
# launch the merge tool identified by a name
git mergetool --tool {{tool_name}}
# don't prompt before each invocation of the merge tool
git mergetool --no-prompt
# explicitly use the gui merge tool (see the `merge.guitool` config variable)
git mergetool --gui
# explicitly use the regular merge tool (see the `merge.tool` config variable)
git mergetool --no-gui
# remove files or directories from the staging area
hg remove {{path/to/file}}
# remove all staged files matching a specified pattern
hg remove --include {{pattern}}
# remove all staged files, excluding those that match a specified pattern
hg remove --exclude {{pattern}}
# recursively remove subrepositories
hg remove --subrepos
# remove files from the repository that have been physically removed
hg remove --after
# extract a file from an archive, replacing the original file if it exists
gunzip {{archive.tar.gz}}
# extract a file to a target destination
gunzip --stdout {{archive.tar.gz}} > {{archive.tar}}
# extract a file and keep the archive file
gunzip --keep {{archive.tar.gz}}
# list the contents of a compressed file
gunzip --list {{file.txt.gz}}
# remove file from repository index and filesystem
git rm {{file}}
# remove directory
git rm -r {{directory}}
# remove file from repository index but keep it untouched locally
git rm --cached {{file}}
# extract files with original directory structure
unrar x {{compressed.rar}}
# extract files to a specified path with the original directory structure
unrar x {{compressed.rar}} {{path/to/extract}}
# extract files into current directory, losing directory structure in the archive
unrar e {{compressed.rar}}
# test integrity of each file inside the archive file
unrar t {{compressed.rar}}
# list files inside the archive file without decompressing it
unrar l {{compressed.rar}}
# yank using the default delimiters (\f, \n, \r, \s, \t)
{{sudo dmesg}} | yank
# yank an entire line
{{sudo dmesg}} | yank -l
# yank using a specific delimiter
{{echo hello=world}} | yank -d {{=}}
# only yank fields matching a specific pattern
{{ps ux}} | yank -g "{{[0-9]+}}"
# display the changes that would be performed without performing them (dryrun)
2to3 {{path/to/file.py}}
# convert a python 2 file to python 3
2to3 --write {{path/to/file.py}}
# convert specific python 2 language features to python 3
2to3 --write {{path/to/file.py}} --fix={{raw_input}} --fix={{print}}
# convert all python 2 language features except the specified ones to python 3
2to3 --write {{path/to/file.py}} --nofix={{has_key}} --nofix={{isinstance}}
# display a list of all available language features that can be converted from python 2 to python 3
2to3 --list-fixes
# convert all python 2 files in a directory to python 3
2to3 --output-dir={{path/to/python3_directory}} --write-unchanged-files --nobackups {{path/to/python2_directory}}
# run 2to3 with multiple threads
2to3 --processes={{4}} --output-dir={{path/to/python3_directory}} --write --nobackups --no-diff {{path/to/python2_directory}}
# render a `png` image with a filename based on the input filename and output format (uppercase o)
twopi -T {{png}} -O {{path/to/input.gv}}
# render a `svg` image with the specified output filename (lowercase o)
twopi -T {{svg}} -o {{path/to/image.svg}} {{path/to/input.gv}}
# render the output in `ps`, `pdf`, `svg`, `fig`, `png`, `gif`, `jpg`, `json`, or `dot` format
twopi -T {{format}} -O {{path/to/input.gv}}
# render a `gif` image using stdin and stdout
echo "{{digraph {this -> that} }}" | twopi -T {{gif}} > {{path/to/image.gif}}
# display help
twopi -?
# print a balance report showing totals
ledger balance --file {{path/to/ledger.journal}}
# list all postings in expenses ordered by amount
ledger register {{expenses}} --sorted {{amount}}
# print total expenses other than drinks and food
ledger balance {{Expenses}} and not ({{Drinks}} or {{Food}})
# print a budget report
ledger budget
# print summary information about all the postings
ledger stats
# calculate the sha224 checksum for a file
sha224sum {{path/to/file}}
# calculate sha224 checksums for multiple 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}}
# read a file of sha224 sums and verify all files have matching checksums
sha224sum --check {{path/to/file.sha224}}
# only show a message for files for which verification fails
sha224sum --check --quiet {{path/to/file.sha224}}
# print go version
go version
# print the go version used to build the named executable file
go version {{path/to/executable}}
# browse for ssh servers
bssh
# browse for vnc servers
bssh --vnc
# browse for both ssh and vnc servers
bssh --shell
# browse for ssh servers in a specified domain
bssh --domain={{domain}}
# print the remove commands instead of actually removing anything
go clean -n
# delete the build cache
go clean -cache
# delete all cached test results
go clean -testcache
# delete the module cache
go clean -modcache