neulab/tldr huggingface dataset:
# initialize or mount an encrypted filesystem
encfs {{/path/to/cipher_dir}} {{/path/to/mount_point}}
# initialize an encrypted filesystem with standard settings
encfs --standard {{/path/to/cipher_dir}} {{/path/to/mount_point}}
# run encfs in the foreground instead of spawning a daemon
encfs -f {{/path/to/cipher_dir}} {{/path/to/mount_point}}
# mount an encrypted snapshot of a plain directory
encfs --reverse {{path/to/plain_dir}} {{path/to/cipher_dir}}
# download a video or playlist
youtube-dl '{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}'
# list all formats that a video or playlist is available in
youtube-dl --list-formats '{{https://www.youtube.com/watch?v=Mwa0_nE9H7A}}'
# download a video or playlist at a specific quality
youtube-dl --format "{{best[height<=480]}}" '{{https://www.youtube.com/watch?v=oHg5SJYRHA0}}'
# download the audio from a video and convert it to an mp3
youtube-dl -x --audio-format {{mp3}} '{{url}}'
# download the best quality audio and video and merge them
youtube-dl -f bestvideo+bestaudio '{{url}}'
# download video(s) as mp4 files with custom filenames
youtube-dl --format {{mp4}} -o "{{%(playlist_index)s-%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s}}" '{{url}}'
# download a particular language's subtitles along with the video
youtube-dl --sub-lang {{en}} --write-sub '{{https://www.youtube.com/watch?v=Mwa0_nE9H7A}}'
# download a playlist and extract mp3s from it
youtube-dl -f "bestaudio" --continue --no-overwrites --ignore-errors --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" {{url_to_playlist}}
# compare diff files
interdiff {{old_file}} {{new_file}}
# compare diff files, ignoring whitespace
interdiff -w {{old_file}} {{new_file}}
# display the number of available processing units
nproc
# display the number of installed processing units, including any inactive ones
nproc --all
# if possible, subtract a given number of units from the returned value
nproc --ignore {{count}}
# generate a sha512 timestamp request of a specific file and output to `file.tsq`
openssl ts -query -data {{path/to/file}} -sha512 -out {{path/to/file.tsq}}
# check the date and metadata of a specific timestamp response file
openssl ts -reply -in {{path/to/file.tsr}} -text
# verify a timestamp request file and a timestamp response file from the server with an ssl certificate file
openssl ts -verify -in {{path/to/file.tsr}} -queryfile {{path/to/file.tsq}} -partial_chain -CAfile {{path/to/cert.pem}}
# create a timestamp response for request using key and signing certificate and output it to `file.tsr`
openssl ts -reply -queryfile {{path/to/file.tsq}} -inkey {{path/to/tsakey.pem}} -signer tsacert.pem -out {{path/to/file.tsr}}
# render a `png` image with a filename based on the input filename and output format (uppercase o)
dot -T {{png}} -O {{path/to/input.gv}}
# render a `svg` image with the specified output filename (lowercase o)
dot -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
dot -T {{format}} -O {{path/to/input.gv}}
# render a `gif` image using stdin and stdout
echo "{{digraph {this -> that} }}" | dot -T {{gif}} > {{path/to/image.gif}}
# display help
dot -?
# bind to a specific port on localhost
guacd -b {{127.0.0.1}} -l {{4823}}
# start in debug mode, keeping the process in the foreground
guacd -f -L {{debug}}
# start with tls support
guacd -C {{my-cert.crt}} -K {{my-key.pem}}
# write the pid to a file
guacd -p {{path/to/file.pid}}
# display the type of a command
type {{command}}
# display all locations containing the specified executable
type -a {{command}}
# display the name of the disk file that would be executed
type -p {{command}}
# delete all store paths unused by current generations of each profile
sudo nix-collect-garbage --delete-old
# simulate the deletion of old store paths
sudo nix-collect-garbage --delete-old --dry-run
# delete all store paths older than 30 days
sudo nix-collect-garbage --delete-older-than {{30d}}
# create a skeleton `shard.yml` file
shards init
# install dependencies from a `shard.yml` file
shards install
# update all dependencies
shards update
# list all installed dependencies
shards list
# list version of dependency
shards version {{path/to/dependency_directory}}
# create a new team with the specified description
pio team create --description {{description}} {{organization_name}}:{{team_name}}
# delete a team
pio team destroy {{organization_name}}:{{team_name}}
# add a new user to a team
pio team add {{organization_name}}:{{team_name}} {{username}}
# remove a user from a team
pio team remove {{organization_name}}:{{team_name}} {{username}}
# list all teams that the user is part of and their members
pio team list
# list all teams in an organization
pio team list {{organization_name}}
# rename a team
pio team update --name {{new_team_name}} {{organization_name}}:{{team_name}}
# change the description of a team
pio team update --description {{new_description}} {{organization_name}}:{{team_name}}
# launch gimp
gimp
# launch gimp without showing the splash screen
gimp --no-splash
# start a new gimp instance, even if there is already a running one
gimp --new-instance
# open the given file as a new image
gimp --as-new {{path/to/image}}
# print errors and warnings to the console instead of showing them in a dialog box
gimp --console-messages
# enable debugging signal handlers
gimp --debug-handlers
# convert a graph from `gml` to `gv` format
graphml2gv -o {{output.gv}} {{input.gml}}
# convert a graph using stdin and stdout
cat {{input.gml}} | graphml2gv > {{output.gv}}
# display help
graphml2gv -?
# start picard
picard
# open a set of files
picard {{path/to/file1.mp3}} {{path/to/file2.mp3}}
# display the version of picard installed
picard --long-version
# start meld
meld
# compare 2 files
meld {{path/to/file_1}} {{path/to/file_2}}
# compare 2 directories
meld {{path/to/directory_1}} {{path/to/directory_2}}
# compare 3 files
meld {{path/to/file_1}} {{path/to/file_2}} {{path/to/file_3}}
# open a comparison as a new tab in a preexisting meld instance
meld --newtab {{path/to/file_1}} {{path/to/file_2}}
# compare multiple sets of files
meld --diff {{path/to/file_1}} {{path/to/file_2}} --diff {{path/to/file_3}} {{path/to/file_4}}
# clone a repository to a specified directory
hg clone {{remote_repository_source}} {{destination_path}}
# clone a repository to the head of a specific branch, ignoring later commits
hg clone --branch {{branch}} {{remote_repository_source}}
# clone a repository with only the `.hg` directory, without checking out files
hg clone --noupdate {{remote_repository_source}}
# clone a repository to a specific revision, tag or branch, keeping the entire history
hg clone --updaterev {{revision}} {{remote_repository_source}}
# clone a repository up to a specific revision without any newer history
hg clone --rev {{revision}} {{remote_repository_source}}
# backup a directory via ftps to a remote machine, encrypting it with a password
FTP_PASSWORD={{ftp_login_password}} PASSPHRASE={{encryption_password}} duplicity {{path/to/source/directory}} {{ftps://user@hostname/target/directory/path/}}
# backup a directory to amazon s3, doing a full backup every month
duplicity --full-if-older-than {{1M}} --use-new-style s3://{{bucket_name[/prefix]}}
# delete versions older than 1 year from a backup stored on a webdav share
FTP_PASSWORD={{webdav_login_password}} duplicity remove-older-than {{1Y}} --force {{webdav[s]://user@hostname[:port]/some_dir}}
# list the available backups
duplicity collection-status "file://{{absolute/path/to/backup/directory}}"
# list the files in a backup stored on a remote machine, via ssh
duplicity list-current-files --time {{YYYY-MM-DD}} scp://{{user@hostname}}/path/to/backup/dir
# restore a subdirectory from a gnupgencrypted local backup to a given location
PASSPHRASE={{gpg_key_password}} duplicity restore --encrypt-key {{gpg_key_id}} --file-to-restore {{relative/path/restoredirectory}} file://{{absolute/path/to/backup/directory}} {{path/to/directory/to/restore/to}}
# output a list of words of length 1 to 3 with only lowercase characters
crunch {{1}} {{3}}
# output a list of hexadecimal words of length 8
crunch {{8}} {{8}} {{0123456789abcdef}}
# output a list of all permutations of abc (lengths are not processed)
crunch {{1}} {{1}} -p {{abc}}
# output a list of all permutations of the given strings (lengths are not processed)
crunch {{1}} {{1}} -p {{abc}} {{def}} {{ghi}}
# output a list of words generated according to the given pattern and a maximum number of duplicate letters
crunch {{5}} {{5}} {{abcde123}} -t {{@@@12}} -d 2@
# write a list of words in chunk files of a given size, starting with the given string
crunch {{3}} {{5}} -o {{START}} -b {{10kb}} -s {{abc}}
# write a list of words stopping with the given string and inverting the wordlist
crunch {{1}} {{5}} -o {{START}} -e {{abcde}} -i
# write a list of words in compressed chunk files with a specified number of words
crunch {{1}} {{5}} -o {{START}} -c {{1000}} -z {{gzip|bzip2|lzma|7z}}
# convert blanks in each file to tabs, writing to standard output
unexpand {{file}}
# convert blanks to tabs, reading from standard output
unexpand
# convert all blanks, instead of just initial blanks
unexpand -a {{file}}
# convert only leading sequences of blanks (overrides a)
unexpand --first-only {{file}}
# have tabs a certain number of characters apart, not 8 (enables a)
unexpand -t {{number}} {{file}}
# push changes to the "default" remote path
hg push
# push changes to a specified remote repository
hg push {{path/to/destination_repository}}
# push a new branch if it does not exist (disabled by default)
hg push --new-branch
# specify a specific revision changeset to push
hg push --rev {{revision}}
# specify a specific branch to push
hg push --branch {{branch}}
# specify a specific bookmark to push
hg push --bookmark {{bookmark}}
# test if a given variable is equal to a given string
[ "{{$VARIABLE}}" == "{{/bin/zsh}}" ]
# test if a given variable is empty
[ -z "{{$GIT_BRANCH}}" ]
# test if a file exists
[ -f "{{path/to/file}}" ]
# test if a directory does not exist
[ ! -d "{{path/to/directory}}" ]
# ifelse statement
[ {{condition}} ] && {{echo "true"}} || {{echo "false"}}
# compile a package
gradle build
# exclude test task
gradle build -x {{test}}
# run in offline mode to prevent gradle from accessing the network during builds
gradle build --offline
# clear the build directory
gradle clean
# build an android package (apk) in release mode
gradle assembleRelease
# list the main tasks
gradle tasks
# list all the tasks
gradle tasks --all
# add a todo to a specific project with a given context
topydo add "{{todo_message}} +{{project_name}} @{{context_name}}"
# add a todo with a due date of tomorrow with a priority of `a`
topydo add "(A) {{todo _message}} due:{{1d}}"
# add a todo with a due date of friday
topydo add "{{todo_message}} due:{{fri}}"
# add a nonstrict repeating todo (next due = now + rec)
topydo add "water flowers due:{{mon}} rec:{{1w}}"
# add a strict repeating todo (next due = current due + rec)
topydo add "{{todo_message}} due:{{2020-01-01}} rec:{{+1m}}"
# revert the last `topydo` command executed
topydo revert
# change the commiter and author of a commit
git blame-someone-else "{{author <someone@example.com>}}" {{commit}}
# open the first search result in the default pdf viewer
texdoc {{search}}
# list the best search results
texdoc --list {{search}}
# open full documentation of texdoc
texdoc {{texdoc}}
# download and install a package, specified by its import path
go get {{package_path}}
# compile and run a source file (it has to contain a `main` package)
go run {{file}}.go
# compile a source file into a named executable
go build -o {{executable}} {{file}}.go
# compile the package present in the current directory
go build
# execute all test cases of the current package (files have to end with `_test.go`)
go test
# compile and install the current package
go install
# initialize a new module in the current directory
go mod init {{module_name}}
# get the properties of all the user limits
ulimit -a
# get hard limit for the number of simultaneously opened files
ulimit -H -n
# get soft limit for the number of simultaneously opened files
ulimit -S -n
# set max peruser process limit
ulimit -u 30
# launch obs
obs
# launch obs in portable mode
obs --portable
# automatically start recording a video on launch
obs --startrecording
# automatically start the replay buffer on launch
obs --startreplaybuffer
# automatically start streaming on launch
obs --startstreaming
# minimise to the system tray on launch
obs --minimize-to-tray
# make the log more verbose (for debugging)
obs --verbose
# join a protected wireless network
wpa_supplicant -i {{interface}} -c {{path/to/wpa_supplicant_conf.conf}}
# join a protected wireless network and run it in a daemon
wpa_supplicant -B -i {{interface}} -c {{path/to/wpa_supplicant_conf.conf}}
# reformat a file
fmt {{path/to/file}}
# reformat a file producing output lines of (at most) `n` characters
fmt -w {{n}} {{path/to/file}}
# reformat a file without joining lines shorter than the given width together
fmt -s {{path/to/file}}
# reformat a file with uniform spacing (1 space between words and 2 spaces between paragraphs)
fmt -u {{path/to/file}}
# create/overwrite htpasswd file
htpasswd -c {{path/to/file}} {{username}}
# add user to htpasswd file or update existing user
htpasswd {{path/to/file}} {{username}}
# add user to htpasswd file in batch mode without an interactive password prompt (for script usage)
htpasswd -b {{path/to/file}} {{username}} {{password}}
# delete user from htpasswd file
htpasswd -D {{path/to/file}} {{username}}
# verify user password
htpasswd -v {{path/to/file}} {{username}}
# display a string with username (plain text) and password (md5)
htpasswd -nbm {{username}} {{password}}
# list all aliases
alias
# create a generic alias
alias {{word}}="{{command}}"
# view the command associated to a given alias
alias {{word}}
# remove an aliased command
unalias {{word}}
# turn `rm` into an interactive command
alias {{rm}}="{{rm -i}}"
# create `la` as a shortcut for `ls a`
alias {{la}}="{{ls -a}}"
# scan a file or directory for vulnerabilities
clamdscan {{path/to/file_or_directory}}
# scan data from stdin
{{command}} | clamdscan -
# scan the current directory and output only infected files
clamdscan --infected
# output the scan report to a log file
clamdscan --log {{path/to/log_file}}
# move infected files to a specific directory
clamdscan --move {{path/to/quarantine_directory}}
# remove infected files
clamdscan --remove
# use multiple threads to scan a directory
clamdscan --multiscan
# pass the file descriptor instead of streaming the file to the daemon
clamdscan --fdpass
# generate an analyser from a flex file
flex {{analyser.l}}
# specify the output file
flex --outfile {{analyser.c}} {{analyser.l}}
# compile a c file generated by flex
cc {{path/to/lex.yy.c}} --output {{executable}}
# register a new platformio account
pio account register --username {{username}} --email {{email}} --password {{password}} --firstname {{firstname}} --lastname {{lastname}}
# permanently delete your platformio account and related data
pio account destroy
# log in to your platformio account
pio account login --username {{username}} --password {{password}}
# log out of your platformio account
pio account logout
# update your platformio profile
pio account update --username {{username}} --email {{email}} --firstname {{firstname}} --lastname {{lastname}} --current-password {{password}}
# show detailed information about your platformio account
pio account show
# reset your password using your username or email
pio account forgot --username {{username_or_email}}
# print multiple files with a default header and footer
pr {{file1}} {{file2}} {{file3}}
# print with a custom centered header
pr -h "{{header}}" {{file1}} {{file2}} {{file3}}
# print with numbered lines and a custom date format
pr -n -D "{{format}}" {{file1}} {{file2}} {{file3}}
# print all files together, one in each column, without a header or footer
pr -m -T {{file1}} {{file2}} {{file3}}
# print, beginning at page 2 up to page 5, with a given page length (including header and footer)
pr +{{2}}:{{5}} -l {{page_length}} {{file1}} {{file2}} {{file3}}
# print with an offset for each line and a truncating custom page width
pr -o {{offset}} -W {{width}} {{file1}} {{file2}} {{file3}}
# print the current directory
pwd
# print the current directory, and resolve all symlinks (i.e. show the "physical" path)
pwd -P
# list the available actions
act -l
# run the default event
act
# run a specific event
act {{event_type}}
# run a specific action
act -a {{action_id}}
# do not actually run the actions (i.e. a dry run)
act -n
# show verbose logs
act -v
# print the contents of the file and display a progress bar
pv {{file}}
# measure the speed and amount of data flow between pipes (`s` is optional)
command1 | pv -s {{expected_amount_of_data_for_eta}} | command2
# filter a file, see both progress and amount of output data
pv -cN in {{big_text_file}} | grep {{pattern}} | pv -cN out > {{filtered_file}}
# attach to an already running process and see its file reading progress
pv -d {{PID}}
# read an erroneous file, skip errors as `dd conv=sync,noerror` would
pv -EE {{path/to/faulty_media}} > image.img
# stop reading after reading specified amount of data, rate limit to 1k/s
pv -L 1K -S {{maximum_file_size_to_be_read}}
# list the sizes of a directory and any subdirectories, in the given unit (b/kb/mb)
du -{{b|k|m}} {{path/to/directory}}
# list the sizes of a directory and any subdirectories, in humanreadable form (i.e. autoselecting the appropriate unit for each size)
du -h {{path/to/directory}}
# show the size of a single directory, in humanreadable units
du -sh {{path/to/directory}}
# list the humanreadable sizes of a directory and of all the files and directories within it
du -ah {{path/to/directory}}
# list the humanreadable sizes of a directory and any subdirectories, up to n levels deep
du -h --max-depth=N {{path/to/directory}}
# list the humanreadable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end
du -ch {{*/*.jpg}}
# view documentation for the original command
tldr strings
# convert a graph from `gv` to `gxl` format
gv2gxl -o {{output.gxl}} {{input.gv}}
# convert a graph using stdin and stdout
cat {{input.gv}} | gv2gxl > {{output.gxl}}
# display help
gv2gxl -?
# initialize an encrypted filesystem
gocryptfs -init {{path/to/cipher_dir}}
# mount an encrypted filesystem
gocryptfs {{path/to/cipher_dir}} {{path/to/mount_point}}
# mount with the explicit master key instead of password
gocryptfs --masterkey {{path/to/cipher_dir}} {{path/to/mount_point}}
# change the password
gocryptfs --passwd {{path/to/cipher_dir}}
# make an encrypted snapshot of a plain directory
gocryptfs --reverse {{path/to/plain_dir}} {{path/to/cipher_dir}}
# send the changes to differential for review
arc diff
# show pending revision information
arc list
# update git commit messages after review
arc amend
# push git changes
arc land
# print all strings in a binary
strings {{file}}
# limit results to strings at least *length* characters long
strings -n {{length}} {{file}}
# prefix each result with its offset within the file
strings -t d {{file}}
# prefix each result with its offset within the file in hexadecimal
strings -t x {{file}}
# compile a pdf document
pdftex {{source.tex}}
# compile a pdf document, specifying an output directory
pdftex -output-directory={{path/to/directory}} {{source.tex}}
# compile a pdf document, exiting on each error
pdftex -halt-on-error {{source.tex}}
# get quotes for currencies and stocks specified in a file and print them
gnucash-cli --quotes get {{path/to/file.gnucash}}
# generate a financial report of a specific type, specified by `name`
gnucash-cli --report run --name "{{Balance Sheet}}" {{path/to/file.gnucash}}
# view documentation for the original command
tldr ar
# display the subcommand help
gh alias
# list all the aliases `gh` is configured to use
gh alias list
# create a `gh` subcommand alias
gh alias set {{pv}} '{{pr view}}'
# set a shell command as a `gh` subcommand
gh alias set --shell {{alias_name}} {{command}}
# delete a command shortcut
gh alias delete {{alias_name}}
# print messages about the patched files
git apply --verbose {{path/to/file}}
# apply and add the patched files to the index
git apply --index {{path/to/file}}
# apply a remote patch file
curl {{https://example.com/file.patch}} | git apply
# output diffstat for the input and apply the patch
git apply --stat --apply {{path/to/file}}
# apply the patch in reverse
git apply --reverse {{path/to/file}}
# store the patch result in the index without modifying the working tree
git apply --cache {{path/to/file}}
# replace the first occurrence of a regular expression in each line of a file, and print the result
sed 's/{{regular_expression}}/{{replace}}/' {{filename}}
# replace all occurrences of an extended regular expression in a file, and print the result
sed -r 's/{{regular_expression}}/{{replace}}/g' {{filename}}
# replace all occurrences of a string in a file, overwriting the file (i.e. inplace)
sed -i 's/{{find}}/{{replace}}/g' {{filename}}
# replace only on lines matching the line pattern
sed '/{{line_pattern}}/s/{{find}}/{{replace}}/' {{filename}}
# delete lines matching the line pattern
sed '/{{line_pattern}}/d' {{filename}}
# print the first 11 lines of a file
sed 11q {{filename}}
# apply multiple findreplace expressions to a file
sed -e 's/{{find}}/{{replace}}/' -e 's/{{find}}/{{replace}}/' {{filename}}
# replace separator `/` by any other character not used in the find or replace patterns, e.g. `#`
sed 's#{{find}}#{{replace}}#' {{filename}}
# create disk image with a specific size (in gigabytes)
qemu-img create {{image_name.img}} {{gigabytes}}G
# show information about a disk image
qemu-img info {{image_name.img}}
# increase or decrease image size
qemu-img resize {{image_name.img}} {{gigabytes}}G
# dump the allocation state of every sector of the specified disk image
qemu-img map {{image_name.img}}
# convert a vmware .vmdk disk image to a kvm .qcow2 disk image
qemu-img convert -O qcow2 {{path/to/file/foo.vmdk}} {{path/to/file/foo.qcow2}}
# tail all files matching a pattern in a single stream
multitail -Q 1 '{{pattern}}'
# tail all files in a directory in a single stream
multitail -Q 1 '{{directory}}/*'
# automatically add new files to a window
multitail -Q {{pattern}}
# show 5 logfiles while merging 2 and put them in 2 columns with only one in the left column
multitail -s 2 -sn 1,3 {{mergefile}} -I {{file1}} {{file2}} {{file3}} {{file4}}
# show commits which aren't shared between the currently checkedout branch and another branch
git missing {{branch}}
# show commits which aren't shared between two branches
git missing {{branch_1}} {{branch_2}}
# show the structure of a type builtin of the .net framework
monop {{System.String}}
# list the types in an assembly
monop -r:{{path/to/assembly.exe}}
# show the structure of a type in a specific assembly
monop -r:{{path/to/assembly.dll}} {{Namespace.Path.To.Type}}
# only show members defined in the specified type
monop -r:{{path/to/assembly.dll}} --only-declared {{Namespace.Path.To.Type}}
# show private members
monop -r:{{path/to/assembly.dll}} --private {{Namespace.Path.To.Type}}
# hide obsolete members
monop -r:{{path/to/assembly.dll}} --filter-obsolete {{Namespace.Path.To.Type}}
# list the other assemblies that a specified assembly references
monop -r:{{path/to/assembly.dll}} --refs
# connect to the database. it connects to localhost using default port 5432 with default user as currently logged in user
psql {{database}}
# connect to the database on given server host running on given port with given username, without a password prompt
psql -h {{host}} -p {{port}} -U {{username}} {{database}}
# connect to the database; user will be prompted for password
psql -h {{host}} -p {{port}} -U {{username}} -W {{database}}
# execute a single sql query or postgresql command on the given database (useful in shell scripts)
psql -c '{{query}}' {{database}}
# execute commands from a file on the given database
psql {{database}} -f {{file.sql}}
# view documentation for the original command
tldr radare2
# generate a binding between c++ and python
swig -c++ -python -o {{path/to/output_wrapper.cpp}} {{path/to/swig_file.i}}
# generate a binding between c++ and go
swig -go -cgo -intgosize 64 -c++ {{path/to/swig_file.i}}
# generate a binding between c and java
swig -java {{path/to/swig_file.i}}
# generate a binding between c and ruby and prefix the ruby module with {{foobar}}
swig -ruby -prefix "{{foo::bar::}}" {{path/to/swig_file.i}}
# view documentation for the original command
tldr pio
# compress a file, replacing it with a gzipped compressed version
gzip {{file.ext}}
# decompress a file, replacing it with the original uncompressed version
gzip -d {{file.ext}}.gz
# compress a file, keeping the original file
gzip --keep {{file.ext}}
# compress a file specifying the output filename
gzip -c {{file.ext}} > {{compressed_file.ext.gz}}
# decompress a gzipped file specifying the output filename
gzip -c -d {{file.ext}}.gz > {{uncompressed_file.ext}}
# specify the compression level. 1=fastest (worst), 9=slowest (best), default level is 6
gzip -9 -c {{file.ext}} > {{compressed_file.ext.gz}}
# list files from the current checked out branch that differ from the `main` branch
git delta {{main}}
# list files from a specific branch that differ from another specific branch
git delta {{branch_1}} {{branch_2}}
# open a file
chromium {{path/to/file.html}}
# open a url
chromium {{example.com}}
# open in incognito mode
chromium --incognito {{example.com}}
# open in a new window
chromium --new-window {{example.com}}
# open in app mode (without toolbars, url bar, buttons, etc.)
chromium --app='{{https://example.com}}'
# use a proxy server
chromium --proxy-server="{{socks5://hostname:66}}" {{example.com}}
# display the list of supported website search scripts (elvi)
surfraw -elvi
# open the elvi's results page for a specific search in the browser
surfraw {{elvi}} "{{search_terms}}"
# display an elvi description and its specific options
surfraw {{elvi}} -local-help
# search using an elvi with specific options and open the results page in the browser
surfraw {{elvi}} {{elvi_options}} "{{search_terms}}"
# display the url to the elvi's results page for a specific search
surfraw -print {{elvi}} "{{search_terms}}"
# search using the alias
sr {{elvi}} "{{search_terms}}"
# open a file in an existing emacs server (using gui if available)
emacsclient {{path/to/file}}
# open a file in console mode (without an x window)
emacsclient --no-window-system {{path/to/file}}
# open a file in a new emacs window
emacsclient --create-frame {{path/to/file}}
# evaluate a command, printing the output to stdout, and then quit
emacsclient --eval '({{command}})'
# specify an alternative editor in case no emacs server is running
emacsclient --alternate-editor {{editor}} {{path/to/file}}
# build an image
packer build {{path/to/config.json}}
# check the syntax of a packer image config
packer validate {{path/to/config.json}}
# unstage everything
git reset
# unstage specific file(s)
git reset {{path/to/file(s)}}
# interactively unstage portions of a file
git reset --patch {{path/to/file}}
# undo the last commit, keeping its changes (and any further uncommitted changes) in the filesystem
git reset HEAD~
# undo the last two commits, adding their changes to the index, i.e. staged for commit
git reset --soft HEAD~2
# discard any uncommitted changes, staged or not (for only unstaged changes, use `git checkout`)
git reset --hard
# reset the repository to a given commit, discarding committed, staged and uncommitted changes since then
git reset --hard {{commit}}
# start a daemon with the default settings
distccd --daemon
# start a daemon, accepting connections from ipv4 private network ranges
distccd --daemon --allow-private
# start a daemon, accepting connections from a specific network address or address range
distccd --daemon --allow {{ip_address|network_prefix}}
# start a daemon with a lowered priority that can run a maximum of 4 tasks at a time
distccd --daemon --jobs {{4}} --nice {{5}}
# start a daemon and register it via mdns/dnssd (zeroconf)
distccd --daemon --zeroconf
# view a presentation
tpp {{filename}}
# output a presentation
tpp -t {{type}} -o {{outputname}} {{filename}}
# go to the given directory
cd {{path/to/directory}}
# go to the home directory of the current user
cd
# go up to the parent of the current directory
cd ..
# go to the previously chosen directory
cd -
# install shell completion for the current shell (supports bash, fish, zsh and powershell)
pio system completion install
# uninstall shell completion for the current shell
pio system completion uninstall
# display systemwide platformio information
pio system info
# remove unused platformio data
pio system prune
# remove only cached data
pio system prune --cache
# list unused platformio data that would be removed but do not actually remove it
pio system prune --dry-run
# convert an stl file to an obj file
meshlabserver -i {{input.stl}} -o {{output.obj}}
# convert a wrl file to a off file, including the vertex and face normals in the output mesh
meshlabserver -i {{input.wrl}} -o {{output.off}} -om vn fn
# dump a list of all the available processing filters into a file
meshlabserver -d {{filename}}
# process a 3d file using a filter script created in the meshlab gui (filters > show current filter script > save script)
meshlabserver -i {{input.ply}} -o {{output.ply}} -s {{filter_script.mlx}}
# process a 3d file using a filter script, writing the output of the filters into a log file
meshlabserver -i {{input.x3d}} -o {{output.x3d}} -s {{filter_script.mlx}} -l {{logfile}}
# revert the most recent commit
git revert {{HEAD}}
# revert the 5th last commit
git revert HEAD~{{4}}
# revert multiple commits
git revert {{branch_name~5..branch_name~2}}
# don't create new commits, just change the working tree
git revert -n {{0c01a9..9a1743}}
# move a file to an arbitrary location
mv {{source}} {{target}}
# move files into another directory, keeping the filenames
mv {{source1}} {{source2}} {{source3}} {{target_directory}}
# do not prompt for confirmation before overwriting existing files
mv -f {{source}} {{target}}
# prompt for confirmation before overwriting existing files, regardless of file permissions
mv -i {{source}} {{target}}
# do not overwrite existing files at the target
mv -n {{source}} {{target}}
# move files in verbose mode, showing files after they are moved
mv -v {{source}} {{target}}
# list all notes and the objects they are attached to
git notes list
# list all notes attached to a given object (defaults to head)
git notes list [{{object}}]
# show the notes attached to a given object (defaults to head)
git notes show [{{object}}]
# append a note to a specified object (opens the default text editor)
git notes append {{object}}
# append a note to a specified object, specifying the message
git notes append --message="{{message_text}}"
# edit an existing note (defaults to head)
git notes edit [{{object}}]
# copy a note from one object to another
git notes copy {{source_object}} {{target_object}}
# remove all the notes added to a specified object
git notes remove {{object}}
# start an interactive shell session
fish
# execute a command and then exit
fish -c "{{command}}"
# execute a script
fish {{path/to/script.fish}}
# check a script for syntax errors
fish --no-execute {{path/to/script.fish}}
# start an interactive shell session in private mode, where the shell does not access old history or save new history
fish --private
# display version information and exit
fish --version
# set and export environmental variables that persist across shell restarts (from within the shell only)
set -Ux {{variable_name}} {{variable_value}}
# compile a dvi document
tex {{source.tex}}
# compile a dvi document, specifying an output directory
tex -output-directory={{path/to/directory}} {{source.tex}}
# compile a dvi document, exiting on each error
tex -halt-on-error {{source.tex}}
# compile a single file
rustc {{file.rs}}
# compile with high optimization
rustc -O {{file.rs}}
# compile with debugging information
rustc -g {{file.rs}}
# compile with architecturespecific optimizations for the current cpu
rustc -C target-cpu=native {{path/to/file.rs}}
# display architecturespecific optimizations for the current cpu
rustc -C target-cpu=native --print cfg
# display target list
rustc --print target-list
# compile for a specific target
rustc --target {{target_triple}} {{path/to/file.rs}}
# display the primefactorization of a number
factor {{number}}
# take the input from stdin if no argument is specified
echo {{number}} | factor
# show last 'num' lines in file
tail -n {{num}} {{file}}
# show all file since line 'num'
tail -n +{{num}} {{file}}
# show last 'num' bytes in file
tail -c {{num}} {{file}}
# keep reading file until `ctrl + c`
tail -f {{file}}
# keep reading file until `ctrl + c`, even if the file is rotated
tail -F {{file}}
# show last 'num' lines in 'file' and refresh every 'n' seconds
tail -n {{num}} -s {{n}} -f {{file}}
# create a unique name for the current commit (the name contains the most recent annotated tag, the number of additional commits, and the abbreviated commit hash)
git describe
# create a name with 4 digits for the abbreviated commit hash
git describe --abbrev={{4}}
# generate a name with the tag reference path
git describe --all
# describe a git tag
git describe {{v1.0.0}}
# create a name for the last commit of a given branch
git describe {{branch_name}}
# list the name, state, and whether autostart is enabled or disabled for active storage pools
virsh pool-list
# list information for active and inactive or just inactive storage pools
virsh pool-list --{{all|inactive}}
# list extended information about persistence, capacity, allocation, and available space for active storage pools
virsh pool-list --details
# list information for active storage pools with either autostart enabled or disabled
virsh pool-list --{{autostart|no-autostart}}
# list information for active storage pools that are either persistent or transient
virsh pool-list --{{persistent|transient}}
# list the name and uuid of active storage pools
virsh pool-list --name --uuid
# format an xml document, indenting with tabs
xml format --indent-tab {{path/to/input.xml|URI}} > {{path/to/output.xml}}
# format an html document, indenting with 4 spaces
xml format --html --indent-spaces {{4}} {{path/to/input.html|URI}} > {{path/to/output.html}}
# recover parsable parts of a malformed xml document, without indenting
xml format --recover --noindent {{path/to/malformed.xml|URI}} > {{path/to/recovered.xml}}
# format an xml document from stdin, removing the `doctype` declaration
cat {{path\to\input.xml}} | xml format --dropdtd > {{path/to/output.xml}}
# format an xml document, omitting the xml declaration
xml format --omit-decl {{path\to\input.xml|URI}} > {{path/to/output.xml}}
# display help for the `format` subcommand
xml format --help
# remove all exif metadata from the given files
exiftool -All= {{file1 file2 ...}}
# move the date at which all photos in a directory were taken 1 hour forward
exiftool "-AllDates+=0:0:0 1:0:0" {{path/to/directory}}
# move the date at which all jpeg photos in the current directory were taken 1 day and 2 hours backward
exiftool "-AllDates-=0:0:1 2:0:0" -ext jpg
# only change the `datetimeoriginal` field subtracting 1.5 hours, without keeping backups
exiftool -DateTimeOriginal-=1.5 -overwrite_original
# recursively rename all jpeg photos in a directory based on the `datetimeoriginal` field
exiftool '-filename<DateTimeOriginal' -d %Y-%m-%d_%H-%M-%S%%lc.%%e {{path/to/directory}} -r -ext jpg
# compare files
colordiff {{file1}} {{file2}}
# output in two columns
colordiff -y {{file1}} {{file2}}
# ignore case differences in file contents
colordiff -i {{file1}} {{file2}}
# report when two files are the same
colordiff -s {{file1}} {{file2}}
# ignore white spaces
colordiff -w {{file1}} {{file2}}
# compile a source code file into an executable binary
g++ {{source.cpp}} -o {{output_executable}}
# display (almost) all errors and warnings
g++ {{source.cpp}} -Wall -o {{output_executable}}
# choose a language standard to compile for(c++98/c++11/c++14/c++17)
g++ {{source.cpp}} -std={{language_standard}} -o {{output_executable}}
# include libraries located at a different path than the source file
g++ {{source.cpp}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}
# display commits since yesterday
git commits-since {{yesterday}}
# display commits since last week
git commits-since {{last week}}
# display commits since last month
git commits-since {{last month}}
# display commits since yesterday 2pm
git commits-since {{yesterday 2pm}}
# probe a block device
sudo f3probe {{path/to/block_device}}
# use the minimum about of ram possible
sudo f3probe --min-memory {{path/to/block_device}}
# time disk operations
sudo f3probe --time-ops {{path/to/block_device}}
# check pathnames for validity in the current system
pathchk {{path1 path2 …}}
# check pathnames for validity on a wider range of posix compliant systems
pathchk -p {{path1 path2 …}}
# check pathnames for validity on all posix compliant systems
pathchk --portability {{path1 path2 …}}
# only check for empty pathnames or leading dashes ()
pathchk -P {{path1 path2 …}}
# analyze live traffic from a network interface
sudo zeek --iface {{interface}}
# analyze live traffic from a network interface and load custom scripts
sudo zeek --iface {{interface}} {{script1}} {{script2}}
# analyze live traffic from a network interface, without loading any scripts
sudo zeek --bare-mode --iface {{interface}}
# analyze live traffic from a network interface, applying a `tcpdump` filter
sudo zeek --filter {{path/to/filter}} --iface {{interface}}
# analyze live traffic from a network interface using a watchdog timer
sudo zeek --watchdog --iface {{interface}}
# analyze traffic from a `pcap` file
zeek --readfile {{path/to/file.trace}}
# run iperf3 as a server
iperf3 -s
# run an iperf3 server on a specific port
iperf3 -s -p {{port}}
# start bandwidth test
iperf3 -c {{server}}
# run iperf3 in multiple parallel streams
iperf3 -c {{server}} -P {{streams}}
# reverse direction of the test. server sends data to the client
iperf3 -c {{server}} -R
# start an interactive git shell
git repl
# run a git command while in the interactive git shell
{{git_subcommand}} {{command_arguments}}
# run an external (nongit) command while in the interactive git shell
!{{command}} {{command_arguments}}
# exit the interactive git shell (or press ctrl + d)
exit
# open the first upstream in the default browser
git browse
# open a specific upstream in the default browser
git browse {{upstream}}
# print lines of code in the current directory
scc
# print lines of code in the target directory
scc {{path/to/directory}}
# display output for every file
scc --by-file
# display output using a specific output format (defaults to `tabular`)
scc --format {{tabular|wide|json|csv|cloc-yaml|html|html-table}}
# only count files with specific file extensions
scc --include-ext {{go, java, js}}
# exclude directories from being counted
scc --exclude-dir {{.git,.hg}}
# display output and sort by column (defaults to by files)
scc --sort {{files|name|lines|blanks|code|comments|complexity}}
# print help for scc
scc -h
# start a bisect session on a commit range bounded by a known buggy commit, and a known clean (typically older) one
git bisect start {{bad_commit}} {{good_commit}}
# for each commit that `git bisect` selects, mark it as "bad" or "good" after testing it for the issue
git bisect {{good|bad}}
# after `git bisect` pinpoints the faulty commit, end the bisect session and return to the previous branch
git bisect reset
# skip a commit during a bisect (e.g. one that fails the tests due to a different issue)
git bisect skip
# test filename encoding conversion (don't actually change the filename)
convmv -f {{from_encoding}} -t {{to_encoding}} {{input_file}}
# convert filename encoding and rename the file to the new encoding
convmv -f {{from_encoding}} -t {{to_encoding}} --notest {{input_file}}
# convert a graph from `gv` to `gml` format
gv2gml -o {{output.gml}} {{input.gv}}
# convert a graph using stdin and stdout
cat {{input.gv}} | gv2gml > {{output.gml}}
# display help
gv2gml -?
# generate an rsa private key of 2048 bits to stdout
openssl genrsa
# save an rsa private key of an arbitrary number of bits to the output file
openssl genrsa -out {{output_file.key}} {{1234}}
# generate an rsa private key and encrypt it with aes256 (you will be prompted for a passphrase)
openssl genrsa {{-aes256}}
# initialize a backup repository in the specified local directory
bup -d {{path/to/repository}} init
# prepare a given directory before taking a backup
bup -d {{path/to/repository}} index {{path/to/directory}}
# backup a directory to the repository
bup -d {{path/to/repository}} save -n {{backup_name}} {{path/to/directory}}
# show the backup snapshots currently stored in the repository
bup -d {{path/to/repository}} ls
# restore a specific backup snapshot to a target directory
bup -d {{path/to/repository}} restore -C {{path/to/target_directory}} {{backup_name}}
# run a speed test
speedtest-cli
# run a speed test and display values in bytes, instead of bits
speedtest-cli --bytes
# run a speed test using `https`, instead of `http`
speedtest-cli --secure
# run a speed test without performing download tests
speedtest-cli --no-download
# run a speed test and generate an image of the results
speedtest-cli --share
# list all `speedtest.net` servers, sorted by distance
speedtest-cli --list
# run a speed test to a specific speedtest.net server
speedtest-cli --server {{server_id}}
# run a speed test and display the results as json (suppresses progress information)
speedtest-cli --json
# print java stack traces for all threads in a java process
jstack {{java_pid}}
# print mixed mode (java/c++) stack traces for all threads in a java process
jstack -m {{java_pid}}
# print stack traces from java core dump
jstack {{/usr/bin/java}} {{file.core}}
# connect to the local server
redis-cli
# connect to a remote server on the default port (6379)
redis-cli -h {{host}}
# connect to a remote server specifying a port number
redis-cli -h {{host}} -p {{port}}
# connect to a remote server specifying a uri
redis-cli -u {{uri}}
# specify a password
redis-cli -a {{password}}
# execute redis command
redis-cli {{redis_command}}
# connect to the local cluster
redis-cli -c
# execute a command forever once every second
while :; do {{command}}; sleep 1; done
# prompt for an otpauth uri token and create a new pass file
pass otp insert {{path/to/pass}}
# prompt for an otpauth uri token and append to an existing pass file
pass otp append {{path/to/pass}}
# print a 2fa code using the otp token in a pass file
pass otp {{path/to/pass}}
# copy and don't print a 2fa code using the otp token in a pass file
pass otp --clip {{path/to/pass}}
# display a qr code using the otp token stored in a pass file
pass otp uri --qrcode {{path/to/pass}}
# prompt for an otp secret value specifying issuer and account (at least one must be specified) and append to existing pass file
pass otp append --secret --issuer {{issuer_name}} --account {{account_name}} {{path/to/pass}}
# view all network traffic (use the arrow keys to switch interfaces)
nload
# view network traffic on specific interfaces (use the arrow keys to switch interfaces)
nload device {{interface_one}} {{interface_two}}
# toggle play/pause
mpc toggle
# stop playing
mpc stop
# show information about the currently playing song
mpc status
# play next song
mpc next
# play previous song
mpc prev
# forward or rewind the currently playing song
mpc [+-]{{seconds}}
# generate python code from a `.proto` file
protoc --python_out={{path/to/output_directory}} {{input_file.proto}}
# generate java code from a `.proto` file that imports other `.proto` files
protoc --java_out={{path/to/output_directory}} --proto_path={{path/to/import_search_path}} {{input_file.proto}}
# generate code for multiple languages
protoc --csharp_out={{path/to/c#_output_directory}} --js_out={{path/to/js_output_directory}} {{input_file.proto}}
# 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
# display an arbitrary user's id (uid), group id (gid) and groups to which they belong
id {{username}}
# create eslint config
eslint --init
# lint on a given set of files
eslint {{filename}}.js {{filename1}}.js
# fix lint issues
eslint --fix
# lint with config
eslint -c {{path/to/config_file}} {{app/src}}
# build all targets
dune build
# clean up the workspace
dune clean
# run all tests
dune runtest
# start the utop repl with compiled modules automatically loaded into it, to remove the need to load them by hand
dune utop
# run all tests in all environments of the current platformio project
pio test
# test only specific environments
pio test --environment {{environment1}} --environment {{environment2}}
# run only tests whose name matches a specific glob pattern
pio test --filter "{{pattern}}"
# ignore tests whose name matches a specific glob pattern
pio test --ignore "{{pattern}}"
# specify a port for firmware uploading
pio test --upload-port {{upload_port}}
# specify a custom configuration file for running the tests
pio test --project-conf {{path/to/platformio.ini}}
# search for a pattern within a file
grep "{{search_pattern}}" {{path/to/file}}
# search for an exact string (disables regular expressions)
grep --fixed-strings "{{exact_string}}" {{path/to/file}}
# search for a pattern in all files recursively in a directory, showing line numbers of matches, ignoring binary files
grep --recursive --line-number --binary-files={{without-match}} "{{search_pattern}}" {{path/to/directory}}
# use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in caseinsensitive mode
grep --extended-regexp --ignore-case "{{search_pattern}}" {{path/to/file}}
# print 3 lines of context around, before, or after each match
grep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}
# print file name and line number for each match
grep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}
# search for lines matching a pattern, printing only the matched text
grep --only-matching "{{search_pattern}}" {{path/to/file}}
# search stdin for lines that do not match a pattern
cat {{path/to/file}} | grep --invert-match "{{search_pattern}}"
# capture the entire x server screen in the postscript image format
import -window root {{output.postscript}}
# capture contents of a remote x server screen in the png format
import -window root -display {{remote_host}}:{{screen}}.{{display}} {{output.png}}
# capture a specific window, given its id as displayed by `xwininfo`, into the jpeg format
import -window {{window_id}} {{output.jpg}}
# search for a string in tracked files
git grep {{search_string}}
# search for a string in files matching a pattern in tracked files
git grep {{search_string}} -- {{file_glob_pattern}}
# search for a string in tracked files, including submodules
git grep --recurse-submodules {{search_string}}
# search for a string at a specific point in history
git grep {{search_string}} {{HEAD~2}}
# search for a string across all branches
git grep {{search_string}} $(git rev-list --all)
# check if an ip address is allowed to send an email from the specified email address
spfquery -ip {{8.8.8.8}} -sender {{sender@example.com}}
# turn on debugging output
spfquery -ip {{8.8.8.8}} -sender {{sender@example.com}} --debug
# compress a jpeg image
guetzli {{input.jpg}} {{output.jpg}}
# create a compressed jpeg from a png
guetzli {{input.png}} {{output.jpg}}
# compress a jpeg with the desired visual quality (84100)
guetzli --quality {{quality_value}} {{input.jpg}} {{output.jpg}}
# wait for a process to finish given its process id (pid) and return its exit status
wait {{pid}}
# wait for all processes known to the invoking shell to finish
wait
# list all reverse socket connections from emulators and devices
adb reverse --list
# reverse a tcp port from an emulator or device to localhost
adb reverse tcp:{{remote_port}} tcp:{{local_port}}
# remove a reverse socket connections from an emulator or device
adb reverse --remove tcp:{{remote_port}}
# remove all reverse socket connections from all emulators and devices
adb reverse --remove-all
# process macros in a file
m4 {{path/to/file}}
# define a macro before processing files
m4 -D{{macro_name}}={{macro_value}} {{path/to/file}}