neulab/tldr huggingface dataset:
# e[x]tract an archive preserving the original directory structure
7zr x {{path/to/archive.7z}}
# e[x]tract an archive to a specific directory
7zr x {{path/to/archive.7z}} -o{{path/to/output}}
# e[x]tract an archive to stdout
7zr x {{path/to/archive.7z}} -so
# [l]ist the contents of an archive
7zr l {{path/to/archive.7z}}
# list available archive types
7zr i
# show documentation for the current package
go doc
# show package documentation and exported symbols
go doc {{encoding/json}}
# show also documentation of symbols
go doc -all {{encoding/json}}
# show also sources
go doc -all -src {{encoding/json}}
# show a specific symbol
go doc -all -src {{encoding/json.Number}}
# merge a branch into your current branch
git merge {{branch_name}}
# edit the merge message
git merge -e {{branch_name}}
# merge a branch and create a merge commit
git merge --no-ff {{branch_name}}
# abort a merge in case of conflicts
git merge --abort
# extract the patch and author data from an email message
git mailinfo {{message|patch}}
# extract but remove leading and trailing whitespace
git mailinfo -k {{message|patch}}
# remove everything from the body before a scissors line (e.g. ">* ") and retrieve the message or patch
git mailinfo --scissors {{message|patch}}
# install all gems defined in the `gemfile` expected in the working directory
bundle install
# execute a command in the context of the current bundle
bundle exec {{command}} {{arguments}}
# update all gems by the rules defined in the `gemfile` and regenerate `gemfile.lock`
bundle update
# update one or more specific gem(s) defined in the `gemfile`
bundle update {{gem_name}} {{gem_name}}
# update one or more specific gems(s) defined in the `gemfile` but only to the next patch version
bundle update --patch {{gem_name}} {{gem_name}}
# update all gems within the given group in the `gemfile`
bundle update --group {{development}}
# list installed gems in the `gemfile` with newer versions available
bundle outdated
# create a new gem skeleton
bundle gem {{gem_name}}
# forward all ipv4 tcp traffic via a remote ssh server
sshuttle --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}
# also forward all dns traffic to the server's default dns resolver
sshuttle --dns --remote={{username}}@{{sshserver}} {{0.0.0.0/0}}
# forward all traffic except that which is bound for a specific subnet
sshuttle --remote={{username}}@{{sshserver}} {{0.0.0.0/0}} --exclude {{192.168.0.1/24}}
# use the tproxy method to forward all ipv4 and ipv6 traffic
sshuttle --method=tproxy --remote={{username}}@{{sshserver}} {{0.0.0.0/0}} {{::/0}} --exclude={{your_local_ip_address}} --exclude={{ssh_server_ip_address}}
# compile a sketch
arduino-builder -compile {{path/to/sketch.ino}}
# specify the debug level (1 to 10, defaults to 5)
arduino-builder -debug-level {{level}}
# specify a custom build directory
arduino-builder -build-path {{path/to/build_directory}}
# use a build option file, instead of specifying `hardware`, `tools`, etc. manually every time
arduino-builder -build-options-file {{path/to/build.options.json}}
# enable verbose mode
arduino-builder -verbose {{true}}
# list available databases
dict -D
# get information about a database
dict -i {{database_name}}
# look up a word in a specific database
dict -d {{database_name}} {{word}}
# look up a word in all available databases
dict {{word}}
# show information about the dict server
dict -I
# transpile a specified input file and output to stdout
babel {{path/to/file}}
# transpile a specified input file and output to a specific file
babel {{path/to/input_file}} --out-file {{path/to/output_file}}
# transpile the input file every time it is changed
babel {{path/to/input_file}} --watch
# transpile a whole directory of files
babel {{path/to/input_directory}}
# ignore specified commaseparated files in a directory
babel {{path/to/input_directory}} --ignore {{ignored_files}}
# transpile and output as minified javascript
babel {{path/to/input_file}} --minified
# choose a set of presets for output formatting
babel {{path/to/input_file}} --presets {{presets}}
# output all available options
babel --help
# output the first few lines of a file
head -n {{count_of_lines}} {{filename}}
# output the first few bytes of a file
head -c {{size_in_bytes}} {{filename}}
# output everything but the last few lines of a file
head -n -{{count_of_lines}} {{filename}}
# output everything but the last few bytes of a file
head -c -{{size_in_bytes}} {{filename}}
# repeatedly run a command and show the result
watch {{command}}
# rerun a command every 60 seconds
watch -n {{60}} {{command}}
# monitor the contents of a directory, highlighting differences as they appear
watch -d {{ls -l}}
# start a new stopwatch, giving a tag name to the activity being tracked
timew start {{activity_tag}}
# view running stopwatches
timew
# stop the stopwatch with a given tag name
timew stop {{activity_tag}}
# stop all running stopwatches
timew stop
# view tracked items
timew summary
# find files containing "foo" and print the files with highlighted matches
pt {{foo}}
# find files containing "foo" and display count of matches in each file
pt -c {{foo}}
# find files containing "foo" as a whole word and ignore its case
pt -wi {{foo}}
# find "foo" in files with a given extension using a regular expression
pt -G='{{\.bar$}}' {{foo}}
# find files whose contents match the regular expression, up to 2 directories deep
pt --depth={{2}} -e '{{^ba[rz]*$}}'
# view documentation for the original command
tldr objdump
# show logs for a singlecontainer pod
kubectl logs {{pod_name}}
# show logs for a specified container in a pod
kubectl logs --container {{container_name}} {{pod_name}}
# show logs for all containers in a pod
kubectl logs --all-containers={{true}} {{pod_name}}
# stream pod logs
kubectl logs --follow {{pod_name}}
# stream logs for a specified container in a pod
kubectl logs --follow --container {{container_name}} {{pod_name}}
# show pod logs newer than a relative time like `10s`, `5m`, or `1h`
kubectl logs --since={{relative_time}} {{pod_name}}
# show the 10 most recent logs in a pod
kubectl logs --tail={{10}} {{pod_name}}
# create a torrent with 2048 kb as the piece size
transmission-create -o {{path/to/example.torrent}} --tracker {{tracker_announce_url}} --piecesize {{2048}} {{path/to/file_or_directory}}
# create a private torrent with a 2048 kb piece size
transmission-create -p -o {{path/to/example.torrent}} --tracker {{tracker_announce_url}} --piecesize {{2048}} {{path/to/file_or_directory}}
# create a torrent with a comment
transmission-create -o {{path/to/example.torrent}} --tracker {{tracker_url1}} -c {{comment}} {{path/to/file_or_directory}}
# create a torrent with multiple trackers
transmission-create -o {{path/to/example.torrent}} --tracker {{tracker_url1}} --tracker {{tracker_url2}} {{path/to/file_or_directory}}
# show help page
transmission-create --help
# generate a qr code
echo "{{data}}" | qr
# specify the error correction level (defaults to m)
echo "{{data}}" | qr --error-correction={{L|M|Q|H}}
# format go source files in the current directory
go fmt
# format a specific go package in your import path (`$gopath/src`)
go fmt {{path/to/package}}
# format the package in the current directory and all subdirectories (note the `...`)
go fmt {{./...}}
# print what format commands would've been run, without modifying anything
go fmt -n
# print which format commands are run as they are run
go fmt -x
# display filesystems and their disk usage in humanreadable form with colours and graphs
dfc
# display all filesystems including pseudo, duplicate and inaccessible filesystems
dfc -a
# display filesystems without colour
dfc -c never
# display filesystems containing "ext" in the filesystem type
dfc -t ext
# resume the most recently suspended job and run it in the background
bg
# resume a specific job (use `jobs l` to get its id) and run it in the background
bg %{{job_id}}
# start a repl (interactive shell)
racket
# execute a racket script
racket {{path/to/script.rkt}}
# execute a racket expression
racket --eval "{{expression}}"
# run module as a script (terminates option list)
racket --lib {{module_name}} --main {{arguments}}
# start a repl (interactive shell) for the `typed/racket` hashlang
racket -I typed/racket
# list files one per line
ls -1
# list all files, including hidden files
ls -a
# list all files, with trailing `/` added to directory names
ls -F
# long format list (permissions, ownership, size, and modification date) of all files
ls -la
# long format list with size displayed using humanreadable units (kib, mib, gib)
ls -lh
# long format list sorted by size (descending)
ls -lS
# long format list of all files, sorted by modification date (oldest first)
ls -ltr
# only list directories
ls -d */
# show deleted files
git ls-files --deleted
# show modified and deleted files
git ls-files --modified
# show ignored and untracked files
git ls-files --others
# run a crystal file
crystal {{path/to/file.cr}}
# compile a file and all dependencies to a single executable
crystal build {{path/to/file.cr}}
# start a local interactive server for testing the language
crystal play
# create a project directory for a crystal application
crystal init app {{application_name}}
# display all help options
crystal help
# start the interactive graph plotting shell
gnuplot
# plot the graph for the specified graph definition file
gnuplot {{path/to/definition.plt}}
# set the output format by executing a command before loading the definition file
gnuplot -e "{{set output "path/to/filename.png" size 1024,768}}" {{path/to/definition.plt}}
# persist the graph plot preview window after gnuplot exits
gnuplot --persist {{path/to/definition.plt}}
# recognize text in an image and save it to `output.txt` (the `.txt` extension is added automatically)
tesseract {{image.png}} {{output}}
# specify a custom language (default is english) with an iso 6392 code (e.g. deu = deutsch = german)
tesseract -l deu {{image.png}} {{output}}
# list the iso 6392 codes of available languages
tesseract --list-langs
# specify a custom page segmentation mode (default is 3)
tesseract -psm {{0_to_10}} {{image.png}} {{output}}
# list page segmentation modes and their descriptions
tesseract --help-psm
# initialize it inside an existing git repository
git flow init
# start developing on a feature branch based on `develop`
git flow feature start {{feature}}
# finish development on a feature branch, merging it into the `develop` branch and deleting it
git flow feature finish {{feature}}
# publish a feature to the remote server
git flow feature publish {{feature}}
# get a feature published by another user
git flow feature pull origin {{feature}}
# query `.csv` file by specifying the delimiter as ','
q -d',' "SELECT * from {{path/to/file}}"
# query `.tsv` file
q -t "SELECT * from {{path/to/file}}"
# query file with header row
q -d{{delimiter}} -H "SELECT * from {{path/to/file}}"
# read data from stdin; '' in the query represents the data from stdin
{{output}} | q "select * from -"
# join two files (aliased as `f1` and `f2` in the example) on column `c1`, a common column
q "SELECT * FROM {{path/to/file}} f1 JOIN {{path/to/other_file}} f2 ON (f1.c1 = f2.c1)"
# format output using an output delimiter with an output header line (note command will output column names based on the input file header or the column aliases overridden in the query)
q -D{{delimiter}} -O "SELECT {{column}} as {{alias}} from {{path/to/file}}"
# generate tags for a single file, and output them to a file named "tags" in the current directory, overwriting the file if it exists
ctags {{path/to/file}}
# generate tags for all files in the current directory, and output them to a specific file, overwriting the file if it exists
ctags -f {{filename}} *
# generate tags for all files in the current directory and all subdirectories
ctags --recurse
# search google for a keyword
googler {{keyword}}
# search google and open the first result in web browser
googler -j {{keyword}}
# show n search results (default 10)
googler -n {{N}} {{keyword}}
# disable automatic spelling correction
googler -x {{keyword}}
# search one site for a keyword
googler -w {{site}} {{keyword}}
# show google search result in json format
googler --json {{keyword}}
# perform inplace selfupgrade
googler -u
# for more help in interactive mode
?
# decompose one or more graphs into their biconnected components
bcomps {{path/to/input1.gv}} {{path/to/input2.gv ...}} > {{path/to/output.gv}}
# print the number of blocks and cutvertices in one or more graphs
bcomps -v -s {{path/to/input1.gv}} {{path/to/input2.gv ...}}
# write each block and blockcutvertex tree to multiple numbered filenames based on `output.gv`
bcomps -x -o {{path/to/output.gv}} {{path/to/input1.gv}} {{path/to/input2.gv ...}}
# display help for `bcomps`
bcomps -?
# hide mouse cursor after 3 seconds
unclutter -idle {{3}}
# list all docker containers (running and stopped)
docker ps --all
# show the latest created container (includes all states)
docker ps --latest
# filter containers that contain a substring in their name
docker ps --filter="name={{name}}"
# filter containers that share a given image as an ancestor
docker ps --filter "ancestor={{image}}:{{tag}}"
# filter containers by exit status code
docker ps --all --filter="exited={{code}}"
# filter containers by status (created, running, removing, paused, exited and dead)
docker ps --filter="status={{status}}"
# filter containers that mount a specific volume or have a volume mounted in a specific path
docker ps --filter="volume={{path/to/directory}}" --format "table {{.ID}}\t{{.Image}}\t{{.Names}}\t{{.Mounts}}"
# commit staged files to the repository with a message
git commit -m "{{message}}"
# commit staged files with a message read from a file
git commit --file {{path/to/commit_message_file}}
# auto stage all modified files and commit with a message
git commit -a -m "{{message}}"
# commit staged files and [s]ign them with the gpg key defined in `~/.gitconfig`
git commit -S -m "{{message}}"
# update the last commit by adding the currently staged changes, changing the commit's hash
git commit --amend
# commit only specific (already staged) files
git commit {{path/to/file1}} {{path/to/file2}}
# create a commit, even if there are no staged files
git commit -m "{{message}}" --allow-empty
# display information about a matroska file
mkvmerge --identify {{path/to/file.mkv}}
# extract the audio from track 1 of a specific file
mkvextract tracks {{path/to/file.mkv}} {{1}}:{{path/to/output.webm}}
# extract the subtitle from track 3 of a specific file
mkvextract tracks {{path/to/file.mkv}} {{3}}:{{path/to/subs.srt}}
# initialize a backup repository in the specified local directory
restic init --repo {{path/to/repository}}
# backup a directory to the repository
restic --repo {{path/to/repository}} backup {{path/to/directory}}
# show backup snapshots currently stored in the repository
restic --repo {{path/to/repository}} snapshots
# restore a specific backup snapshot to a target directory
restic --repo {{path/to/repository}} restore {{latest|snapshot_id}} --target {{path/to/target}}
# restore a specific path from a specific backup to a target directory
restic --repo {{path/to/repository}} restore {{snapshot_id}} --target {{path/to/target}} --include {{path/to/restore}}
# clean up the repository and keep only the most recent snapshot of each unique backup
restic forget --keep-last 1 --prune
# disable the ability to commit changes of a local file
git lock {{path/to/file}}
# check the style of a single file
pycodestyle {{file.py}}
# check the style of multiple files
pycodestyle {{file1.py}} {{file2.py}} {{file3.py}}
# show only the first occurrence of an error
pycodestyle --first {{file.py}}
# show the source code for each error
pycodestyle --show-source {{file.py}}
# show the specific pep 8 text for each error
pycodestyle --show-pep8 {{file.py}}
# save output to a file
httpry -o {{path/to/file.log}}
# listen on a specific interface and save output to a binary pcap format file
httpry {{eth0}} -b {{path/to/file.pcap}}
# filter output by a commaseparated list of http verbs
httpry -m {{get|post|put|head|options|delete|trace|connect|patch}}
# read from an input capture file and filter by ip
httpry -r {{path/to/file.log}} '{{host 192.168.5.25}}'
# run as daemon process
httpry -d -o {{path/to/file.log}}
# start supervisord with specified configuration file
supervisord -c {{path/to/file}}
# run supervisord in the foreground
supervisord -n
# merge two (or more) pdfs
pdfjam {{path/to/file1.pdf}} {{path/to/file2.pdf}} --outfile {{path/to/output_file.pdf}}
# merge the first page of each file together
pdfjam {{files...}} 1 --outfile {{path/to/output_file.pdf}}
# merge subranges from two pdfs
pdfjam {{path/to/file1.pdf 3-5,1}} {{path/to/file2.pdf 4-6}} --outfile {{path/to/output_file.pdf}}
# sign an a4 page (adjust delta to height for other formats) with a scanned signature by overlaying them
pdfjam {{path/to/file.pdf}} {{path/to/signature}} --fitpaper true --outfile {{path/to/signed.pdf}} --nup "{{1x2}}" --delta "{{0 -842pt}}"
# arrange the pages from the input file into a fancy 2x2 grid
pdfjam {{path/to/file.pdf}} --nup {{2x2}} --suffix {{4up}} --preamble '{{\usepackage{fancyhdr} \pagestyle{fancy}}}'
# reverse the order of pages within each given file and concatenate them
pdfjam {{files...}} {{last-1}} --suffix {{reversed}}
# start a wizard to choose what kind of code (e.g. module, service, form, etc.) to generate
dcg
# directly specify the kind of code to generate
dcg {{service|plugin|theme|module|form}}
# generate the code in a specific directory
dcg --directory {{path/to/directory}}
# list the stacks in the app
cdk ls
# synthesize and print the cloudformation template for the specified stack(s)
cdk synth {{stack_name}}
# deploy a spaceseparated list of stacks
cdk deploy {{stack_name}}
# destroy a spaceseparated list of stacks
cdk destroy {{stack_name}}
# compare the specified stack with the deployed stack or a local cloudformation template
cdk diff {{stack_name}}
# create a new cdk project in the current directory for a specified language
cdk init -l {{language_name}}
# open the cdk api reference in your browser
cdk doc
# view documentation for the original command
tldr clj
# open moe and create a backup file (file~) when saving edits
moe {{path/to/file}}
# open a file as readonly
moe --read-only {{path/to/file}}
# edit a file without creating backups
moe --no-backup {{path/to/file}}
# edit a file ignoring case in searches
moe --ignore-case {{path/to/file}}
# save and quit
Ctrl + X
# start skim on all files in the specified directory
find {{path/to/directory}} -type f | sk
# start skim for running processes
ps aux | sk
# start skim with a specified query
sk --query "{{query}}"
# select multiple files with `shift + tab` and write to a file
find {{path/to/directory}} -type f | sk --multi > {{filename}}
# show changed files which are not yet added for commit
git status
# give output in [s]hort format
git status -s
# don't show untracked files in the output
git status --untracked-files=no
# show output in [s]hort format along with [b]ranch info
git status -sb
# print a quotation
fortune
# print an offensive quotation
fortune -o
# print a long quotation
fortune -l
# print a short quotation
fortune -s
# list the available quotation database files
fortune -f
# print a quotation from one of the database files listed by `fortune f`
fortune {{filename}}
# list all supported import formats
assimp listext
# list all supported export formats
assimp listexport
# convert a file to one of the supported output formats, using the default parameters
assimp export {{input_file.stl}} {{output_file.obj}}
# convert a file using custom parameters (the dox_cmd.h file in assimp's source code lists available parameters)
assimp export {{input_file.stl}} {{output_file.obj}} {{parameters}}
# display a summary of a 3d file's contents
assimp info {{path/to/file}}
# list all supported subcommands ("verbs")
assimp help
# get help on a specific subcommand (e.g. the parameters specific to it)
assimp {{subcommand}} --help
# compile a nsis script
makensis {{path/to/file.nsi}}
# compile a nsis script in strict mode (treat warnings as errors)
makensis -WX {{path/to/file.nsi}}
# print help for a specific command
makensis -CMDHELP {{command}}
# find all instances of a command
where {{command}}
# check the git version
git --version
# show general help
git --help
# show help on a git subcommand (like `commit`, `log`, etc.)
git help {{subcommand}}
# execute a git subcommand
git {{subcommand}}
# execute a git subcommand on a custom repository root path
git -C {{path/to/repo}} {{subcommand}}
# execute a git subcommand with a given configuration set
git -c '{{config.key}}={{value}}' {{subcommand}}
# gzip several files at once, using all cores
parallel gzip ::: {{file1}} {{file2}} {{file3}}
# read arguments from stdin, run 4 jobs at once
ls *.txt | parallel -j4 gzip
# convert jpg images to png using replacement strings
parallel convert {} {.}.png ::: *.jpg
# parallel xargs, cram as many args as possible onto one command
{{args}} | parallel -X {{command}}
# break stdin into ~1m blocks, feed each block to stdin of new command
cat {{big_file.txt}} | parallel --pipe --block 1M {{command}}
# run on multiple machines via ssh
parallel -S {{machine1}},{{machine2}} {{command}} ::: {{arg1}} {{arg2}}
# convert to a tabdelimited file (tsv)
csvformat -T {{data.csv}}
# convert delimiters to a custom character
csvformat -D "{{custom_character}}" {{data.csv}}
# convert line endings to carriage return (^m) + line feed
csvformat -M "{{\r\n}}" {{data.csv}}
# minimize use of quote characters
csvformat -U 0 {{data.csv}}
# maximize use of quote characters
csvformat -U 1 {{data.csv}}
# apply a patch file
git am {{path/to/file.patch}}
# abort the process of applying a patch file
git am --abort
# apply as much of a patch file as possible, saving failed hunks to reject files
git am --reject {{path/to/file.patch}}
# show information about the latest commit (hash, message, changes, and other metadata)
git show
# show information about a given commit
git show {{commit}}
# show information about the commit associated with a given tag
git show {{tag}}
# show information about the 3rd commit from the head of a branch
git show {{branch}}~{{3}}
# show a commit's message in a single line, suppressing the diff output
git show --oneline -s {{commit}}
# show only statistics (added/removed characters) about the changed files
git show --stat {{commit}}
# show only the list of added, renamed or deleted files
git show --summary {{commit}}
# show the contents of a file as it was at a given revision (e.g. branch, tag or commit)
git show {{revision}}:{{path/to/file}}
# start the mysql database server
mysqld
# start the server, printing error messages to the console
mysqld --console
# start the server, saving logging output to a custom log file
mysqld --log={{path/to/file.log}}
# print the default arguments and their values and exit
mysqld --print-defaults
# start the server, reading arguments and values from a file
mysqld --defaults-file={{path/to/file}}
# start the server and listen on a custom port
mysqld --port={{port}}
# show all help options and exit
mysqld --verbose --help
# verify a signed file
gpgv {{path/to/file}}
# verify a signed file using a detached signature
gpgv {{path/to/signature}} {{path/to/file}}
# add a file to the list of keyrings (a single exported key also counts as a keyring)
gpgv --keyring {{./alice.keyring}} {{path/to/signature}} {{path/to/file}}
# generate a key interactively
ssh-keygen
# specify file in which to save the key
ssh-keygen -f {{~/.ssh/filename}}
# generate an ed25519 key with 100 key derivation function rounds
ssh-keygen -t {{ed25519}} -a {{100}}
# generate an rsa 4096bit key with email as a comment
ssh-keygen -t {{dsa|ecdsa|ed25519|rsa}} -b {{4096}} -C "{{comment|email}}"
# remove the keys of a host from the known_hosts file (useful when a known host has a new key)
ssh-keygen -R {{remote_host}}
# retrieve the fingerprint of a key in md5 hex
ssh-keygen -l -E {{md5}} -f {{~/.ssh/filename}}
# change the password of a key
ssh-keygen -p -f {{~/.ssh/filename}}
# change the type of the key format (for example from openssh format to pem), the file will be rewritten inplace
ssh-keygen -p -N "" -m {{PEM}} -f {{~/.ssh/OpenSSH_private_key}}
# edit the crontab file for the current user
crontab -e
# edit the crontab file for a specific user
sudo crontab -e -u {{user}}
# replace the current crontab with the contents of the given file
crontab {{path/to/file}}
# view a list of existing cron jobs for current user
crontab -l
# remove all cron jobs for the current user
crontab -r
# sample job which runs at 1000 every day (* means any value)
0 10 * * * {{command_to_execute}}
# sample job which runs every minute on the 3rd of april
* * 3 Apr * {{command_to_execute}}
# sample job which runs a certain script at 0230 every friday
30 2 * * Fri {{/absolute/path/to/script.sh}}
# list all available commands
pyenv commands
# list all python versions under the `${pyenv_root}/versions` directory
pyenv versions
# install a python version under the `${pyenv_root}/versions` directory
pyenv install {{2.7.10}}
# uninstall a python version under the `${pyenv_root}/versions` directory
pyenv uninstall {{2.7.10}}
# set python version to be used globally in the current machine
pyenv global {{2.7.10}}
# set python version to be used in the current directory and all directories below it
pyenv local {{2.7.10}}
# run tests on all test environments
tox
# create a `tox.ini` configuration
tox-quickstart
# list the available environments
tox --listenvs-all
# run tests on a specific environment (e.g. python 3.6)
tox -e {{py36}}
# force the virtual environment to be recreated
tox --recreate -e {{py27}}
# sync two directories (creates log first time these two directories are synchronised)
unison {{path/to/directory_1}} {{path/to/directory_2}}
# automatically accept the (nonconflicting) defaults
unison {{path/to/directory_1}} {{path/to/directory_2}} -auto
# ignore some files using a pattern
unison {{path/to/directory_1}} {{path/to/directory_2}} -ignore {{pattern}}
# show documentation
unison -doc {{topics}}
# run tests in the current directory. note expects you to have a 'phpunit.xml'
phpunit
# run tests in a specific file
phpunit {{path/to/TestFile.php}}
# run tests annotated with the given group
phpunit --group {{name}}
# run tests and generate a coverage report in html
phpunit --coverage-html {{directory}}
# show a list of existing remotes, their names and url
git remote -v
# show information about a remote
git remote show {{remote_name}}
# add a remote
git remote add {{remote_name}} {{remote_url}}
# change the url of a remote (use `add` to keep the existing url)
git remote set-url {{remote_name}} {{new_url}}
# remove a remote
git remote remove {{remote_name}}
# rename a remote
git remote rename {{old_name}} {{new_name}}
# connect to the default x server
twm
# connect to a specific x server
twm -display {{display}}
# only manage the default screen
twm -s
# use a specific startup file
twm -f {{path/to/file}}
# enable verbose mode and print unexpected errors in x
twm -v
# run on server
iperf -s
# run on server using udp mode and set server port to listen on 5001
iperf -u -s -p {{5001}}
# run on client
iperf -c {{server_address}}
# run on client every 2 seconds
iperf -c {{server_address}} -i {{2}}
# run on client with 5 parallel threads
iperf -c {{server_address}} -P {{5}}
# run on client using udp mode
iperf -u -c {{server_address}} -p {{5001}}
# start the deluge daemon
deluged
# start the deluge daemon on a specific port
deluged -p {{port}}
# start the deluge daemon using a specific configuration file
deluged -c {{path/to/configuration_file}}
# start the deluge daemon and output the log to a file
deluged -l {{path/to/log_file}}
# compile a vala file, with gtk+
valac {{path/to/file.vala}} --pkg {{gtk+-3.0}}
# display version info
valac --version
# display helper message
valac --help
# let a steam locomotive run through your terminal
sl
# the train burns, people scream
sl -a
# let the train fly
sl -F
# make the train little
sl -l
# let the user exit (ctrl + c)
sl -e
# start a repl (interactive shell)
ghci
# start a repl and load the specified haskell source file
ghci {{source_file.hs}}
# start a repl and enable a language option
ghci -X{{language_option}}
# start a repl and enable some level of compiler warnings (e.g. `all` or `compact`)
ghci -W{{warning_level}}
# start a repl with a colonseparated list of directories for finding source files
ghci -i{{path/to/directory1}}:{{path/to/directory2}}
# list all running processes
ps aux
# list all running processes including the full command string
ps auxww
# search for a process that matches a string
ps aux | grep {{string}}
# list all processes of the current user in extra full format
ps --user $(id -u) -F
# list all processes of the current user as a tree
ps --user $(id -u) f
# get the parent pid of a process
ps -o ppid= -p {{pid}}
# sort processes by memory consumption
ps --sort size
# analyse duplicated code for a specific file or directory
phpcpd {{path/to/file_or_directory}}
# analyse using fuzzy matching for variable names
phpcpd --fuzzy {{path/to/file_or_directory}}
# specify a minimum number of identical lines (defaults to 5)
phpcpd --min-lines {{number_of_lines}} {{path/to/file_or_directory}}
# specify a minimum number of identical tokens (defaults to 70)
phpcpd --min-tokens {{number_of_tokens}} {{path/to/file_or_directory}}
# exclude a directory from analysis (must be relative to the source)
phpcpd --exclude {{path/to/excluded_directory}} {{path/to/file_or_directory}}
# output the results to a phpcpd xml file
phpcpd --log-pmd {{path/to/log_file}} {{path/to/file_or_directory}}
# print stack and locks information of a java process
jhsdb jstack --pid {{pid}}
# open a core dump in interactive debug mode
jhsdb clhsdb --core {{path/to/core_dump}} --exe {{path/to/jdk/bin/java}}
# start a remote debug server
jhsdb debugd --pid {{pid}} --serverid {{optional_unique_id}}
# connect to a process in interactive debug mode
jhsdb clhsdb --pid {{pid}}
# start syncthing
syncthing
# start syncthing without opening a web browser
syncthing -no-browser
# print the device id
syncthing -device-id
# change the home directory
syncthing -home={{path/to/directory}}
# force a full index exchange
syncthing -reset-deltas
# change the address upon which the web interface listens
syncthing -gui-address={{ip_address:port|path/to/socket.sock}}
# show filepaths to the files used by syncthing
syncthing -paths
# disable the syncthing monitor process
syncthing -no-restart
# convert an ebook into another format
ebook-convert {{source}} {{destination}}
# convert markdown or html to ebook with toc, title and author
ebook-convert {{source}} {{destination}} --level1-toc="//h:h1" --level2-toc="//h:h2" --level3-toc="//h:h3" --title={{title}} --authors={{author}}
# list printers present on the machine and whether they are enabled for printing
lpstat -p
# show the default printer
lpstat -d
# display all available status information
lpstat -t
# show a list of print jobs queued by the specified user
lpstat -u {{user}}
# tile images into a grid, automatically resizing images larger than the grid cell size
montage {{image1.png}} {{image2.jpg}} {{imageN.png}} montage.jpg
# tile images into a grid, automatically calculating the grid cell size from the largest image
montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 montage.jpg
# set the grid cell size and resize images to fit it before tiling
montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry 640x480+0+0 montage.jpg
# limit the number of rows and columns in the grid, causing input images to overflow into multiple output montages
montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -tile 2x3 montage_%d.jpg
# resize and crop images to fill their grid cells before tiling
montage {{image1.png}} {{image2.jpg}} {{imageN.png}} -geometry +0+0 -resize 640x480^ -gravity center -crop 640x480+0+0 montage.jpg
# run a javascript file
node {{path/to/file}}
# start a repl (interactive shell)
node
# evaluate javascript code by passing it as an argument
node -e "{{code}}"
# evaluate and print result, useful to see node's dependencies versions
node -p "{{process.versions}}"
# activate inspector, pausing execution until a debugger is connected once source code is fully parsed
node --no-lazy --inspect-brk {{path/to/file}}
# start recording in file named "typescript"
script
# stop recording
exit
# start recording in a given file
script {{logfile.log}}
# append to an existing file
script -a {{logfile.log}}
# execute quietly without start and done messages
script -q {{logfile.log}}
# terminate a program using the default sigterm (terminate) signal
kill {{process_id}}
# list available signal names (to be used without the `sig` prefix)
kill -l
# terminate a background job
kill %{{job_id}}
# terminate a program using the sighup (hang up) signal. many daemons will reload instead of terminating
kill -{{1|HUP}} {{process_id}}
# terminate a program using the sigint (interrupt) signal. this is typically initiated by the user pressing `ctrl + c`
kill -{{2|INT}} {{process_id}}
# signal the operating system to immediately terminate a program (which gets no chance to capture the signal)
kill -{{9|KILL}} {{process_id}}
# signal the operating system to pause a program until a sigcont ("continue") signal is received
kill -{{17|STOP}} {{process_id}}
# send a `sigusr1` signal to all processes with the given gid (group id)
kill -{{SIGUSR1}} -{{group_id}}
# extract pages from pdf file and make a separate pdf file for each page
pdfseparate {{path/to/source_filename.pdf}} {{path/to/destination_filename-%d.pdf}}
# specify the first/start page for extraction
pdfseparate -f {{3}} {{path/to/source_filename.pdf}} {{path/to/destination_filename-%d.pdf}}
# specify the last page for extraction
pdfseparate -l {{10}} {{path/to/source_filename.pdf}} {{path/to/destination_filename-%d.pdf}}
# generate random password with s[y]mbols
pwgen -y {{length}}
# generate secure, hardtomemorize passwords
pwgen -s {{length}}
# generate password with at least one capital letter in them
pwgen -c {{length}}
# convert wav to opus using default options
opusenc {{path/to/input.wav}} {{path/to/output}}.opus
# convert stereo audio at the highest quality level
opusenc --bitrate {{512}} {{path/to/input.wav}} {{path/to/output}}.opus
# convert 5.1 surround sound audio at the highest quality level
opusenc --bitrate {{1536}} {{path/to/input.flac}} {{path/to/output}}.opus
# convert speech audio at the lowest quality level
opusenc {{path/to/input.wav}} --downmix-mono --bitrate {{6}} {{path/to/out}}.opus
# show unstaged, uncommitted changes
git diff
# show all uncommitted changes (including staged ones)
git diff HEAD
# show only staged (added, but not yet committed) changes
git diff --staged
# show changes from all commits since a given date/time (a date expression, e.g. "1 week 2 days" or an iso date)
git diff 'HEAD@{3 months|weeks|days|hours|seconds ago}'
# show only names of changed files since a given commit
git diff --name-only {{commit}}
# output a summary of file creations, renames and mode changes since a given commit
git diff --summary {{commit}}
# compare a single file between two branches or commits
git diff {{branch_1}}..{{branch_2}} [--] {{path/to/file}}
# compare different files from the current branch to other branch
git diff {{branch}}:{{path/to/file2}} {{path/to/file}}
# start an ssh session, restarting when a monitoring port fails to return data
autossh -M {{monitor_port}} "{{ssh_command}}"
# forward a local port to a remote one, restarting when necessary
autossh -M {{monitor_port}} -L {{local_port}}:localhost:{{remote_port}} {{user}}@{{host}}
# fork `autossh` into the background before executing `ssh` and don't open a remote shell
autossh -f -M {{monitor_port}} -N "{{ssh_command}}"
# run in the background, with no monitoring port, and instead send ssh keepalive packets every 10 seconds to detect failure
autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "{{ssh_command}}"
# run in the background, with no monitoring port and no remote shell, exiting if the port forward fails
autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L {{local_port}}:localhost:{{remote_port}} {{user}}@{{host}}
# run in the background, logging `autossh` debug output and `ssh` verbose output to files
AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{path/to/autossh_log_file.log}} autossh -f -M {{monitor_port}} -v -E {{path/to/ssh_log_file.log}} {{ssh_command}}
# extract zip file(s) (for multiple files, separate file paths by spaces)
unzip {{file(s)}}
# extract zip files(s) to given path
unzip {{compressed_file(s)}} -d {{path/to/put/extracted_file(s)}}
# list the contents of a zip file without extracting
unzip -l {{file.zip}}
# extract the contents of the file(s) to stdout alongside the extracted file names
unzip -c {{file.zip}}
# extract a zip file created on windows, containing files with nonascii (e.g. chinese or japanese characters) filenames
unzip -O {{gbk}} {{file.zip}}
# download a uri to a file
aria2c {{url}}
# download the file pointed to by the specified uri with the specified output name
aria2c --out={{filename}} {{url}}
# download multiple files in parallel
aria2c --force-sequential {{url_1}} {{url_2}}
# download from multiple sources with each uri pointing to the same file
aria2c {{url_1}} {{url_2}}
# download the uris listed in a file with limited parallel downloads
aria2c --input-file={{filename}} --max-concurrent-downloads={{number_of_downloads}}
# download with multiple connections
aria2c --split={{number_of_connections}} {{url}}
# ftp download with username and password
aria2c --ftp-user={{username}} --ftp-passwd={{password}} {{url}}
# limit download speed in bytes/s
aria2c --max-download-limit={{speed}} {{url}}
# list all aliases
git alias
# create a new alias
git alias "{{name}}" "{{command}}"
# search for an existing alias
git alias ^{{name}}
# launch a program with altered priority
nice -n {{niceness_value}} {{command}}
# display the content of a parquet file
parquet-tools cat {{path/to/parquet}}
# display the first few lines of a parquet file
parquet-tools head {{path/to/parquet}}
# print the schema of a parquet file
parquet-tools schema {{path/to/parquet}}
# print the metadata of a parquet file
parquet-tools meta {{path/to/parquet}}
# print the content and metadata of a parquet file
parquet-tools dump {{path/to/parquet}}
# concatenate several parquet files into the target one
parquet-tools merge {{path/to/parquet1}} {{path/to/parquet2}} {{path/to/target_parquet}}
# print the count of rows in a parquet file
parquet-tools rowcount {{path/to/parquet}}
# print the column and offset indexes of a parquet file
parquet-tools column-index {{path/to/parquet}}
# remove files from arbitrary locations
rm {{path/to/file}} {{path/to/another/file}}
# recursively remove a directory and all its subdirectories
rm -r {{path/to/directory}}
# forcibly remove a directory, without prompting for confirmation or showing error messages
rm -rf {{path/to/directory}}
# interactively remove multiple files, with a prompt before every removal
rm -i {{file(s)}}
# remove files in verbose mode, printing a message for each removed file
rm -v {{path/to/directory/*}}
# display the entire revision history of the repository
hg log
# display the revision history with an ascii graph
hg log --graph
# display the revision history with file names matching a specified pattern
hg log --include {{pattern}}
# display the revision history, excluding file names that match a specified pattern
hg log --exclude {{pattern}}
# display the log information for a specific revision
hg log --rev {{revision}}
# display the revision history for a specific branch
hg log --branch {{branch}}
# display the revision history for a specific date
hg log --date {{date}}
# display revisions committed by a specific user
hg log --user {{user}}
# format c/c++ source according to the linux style guide, automatically back up the original files, and replace with the indented versions
indent --linux-style {{path/to/source.c}} {{path/to/another_source.c}}
# format c/c++ source according to the gnu style, saving the indented version to a different file
indent --gnu-style {{path/to/source.c}} -o {{path/to/indented_source.c}}
# format c/c++ source according to the style of kernighan & ritchie (k&r), no tabs, 3 spaces per indent, and wrap lines at 120 characters
indent --k-and-r-style --indent-level3 --no-tabs --line-length120 {{path/to/source.c}} -o {{path/to/indented_source.c}}
# run command as new root directory
chroot {{path/to/new/root}} {{command}}
# specify user and group (id or name) to use
chroot --userspec={{user:group}}
# search for a package via its name or description
nix search {{search_term}}
# start a nix shell with the specified packages available
nix run {{nixpkgs.pkg1 nixpkgs.pkg2 nixpkgs.pkg3...}}
# optimise nix store disk usage by combining duplicate files
nix optimise-store
# start an interactive environment for evaluating nix expressions
nix repl
# upgrade nix to the latest stable version
nix upgrade-nix
# display changes in a histogram
diff {{file1}} {{file2}} | diffstat
# display inserted, deleted and modified changes as a table
diff {{file1}} {{file2}} | diffstat -t
# display metadata for a given file in the console
mediainfo {{file}}
# store the output to a given file along with displaying in the console
mediainfo --Logfile={{out.txt}} {{file}}
# display the list of metadata attributes that can be extracted
mediainfo --Info-Parameters
# show a decorated tree graph for all branches annotated with tags and branch names
git show-tree
# list all supported operations (enabled operations are indicated with asterisks)
virt-sysprep --list-operations
# run all enabled operations but don't actually apply the changes
virt-sysprep --domain {{vm_name}} --dry-run
# run only the specified operations
virt-sysprep --domain {{vm_name}} --operations {{operation1,operation2,...}}
# generate a new `/etc/machineid` file and enable customizations to be able to change the host name to avoid network conflicts
virt-sysprep --domain {{vm_name}} --enable {{customizations}} --hostname {{host_name}} --operation {{machine-id}}
# check out a pull request locally
gh pr checkout {{pr_number}}
# view the changes made in the pr
gh pr diff
# approve the pull request of the current branch
gh pr review --approve
# edit a pull request interactively
gh pr edit
# edit the base branch of a pull request
gh pr edit --base {{branch_name}}
# start wordgrinder (loads a blank document by default)
wordgrinder
# open a given file
wordgrinder {{filename}}
# show the menu
Alt + M
# subscribe to the topic `sensors/temperature` information with quality of service (`qos`) set to 1. (the default hostname is `localhost` and port 1883)
mosquitto_sub -t {{sensors/temperature}} -q {{1}}
# subscribe to all broker status messages publishing on `iot.eclipse.org` port 1885 and print published messages verbosely
mosquitto_sub -v -h "iot.eclipse.org" -p 1885 -t {{\$SYS/#}}
# subscribe to multiple topics matching a given pattern. (+ takes any metric name)
mosquitto_sub -t {{sensors/machines/+/temperature/+}}
# print a text message
printf "{{%s\n}}" "{{Hello world}}"
# print an integer in bold blue
printf "{{\e[1;34m%.3d\e[0m\n}}" {{42}}
# print a float number with the unicode euro sign
printf "{{\u20AC %.2f\n}}" {{123.4}}
# print a text message composed with environment variables
printf "{{var1: %s\tvar2: %s\n}}" "{{$VAR1}}" "{{$VAR2}}"
# store a formatted message in a variable (does not work on zsh)
printf -v {{myvar}} {{"This is %s = %d\n" "a year" 2016}}
# extract pages 13, 5 and 610 from a pdf file and save them as another one
qpdf --empty --pages {{input.pdf}} {{1-3,5,6-10}} -- {{output.pdf}}
# merge (concatenate) all the pages of a list of pdf files and save the result as a new pdf
qpdf --empty --pages {{file1.pdf}} {{file2.pdf}} {{file3.pdf}} -- {{output.pdf}}
# merge (concatenate) given pages from a list of pdf files and save the result as a new pdf
qpdf --empty --pages {{file1.pdf}} {{1,6-8}} {{file2.pdf}} {{3,4,5}} -- {{output.pdf}}
# write each group of n pages to a separate output file with a given filename pattern
qpdf --split-pages=n {{input.pdf}} {{out_%d.pdf}}
# rotate certain pages of a pdf with a given angle
qpdf --rotate={{90:2,4,6}} --rotate={{180:7-8}} {{input.pdf}} {{output.pdf}}
# remove the password from a passwordprotected file
qpdf --password={{password}} --decrypt {{input.pdf}} {{output.pdf}}
# remove spaces and other undesirable characters from a file's name
detox {{file}}
# show how detox would rename all the files in a directory tree
detox --dry-run -r {{directory}}
# remove spaces and other undesirable characters from all files in a directory tree
detox -r {{directory}}
# render a man page as plain text, and display the result
groff -man -T utf8 {{manpage.1}}
# render a man page using the ascii output device, and display it using a pager
groff -man -T ascii {{manpage.1}} | less
# render a man page into an html file
groff -man -T html {{manpage.1}} > {{page.html}}
# process a roff file using the `tbl` and `pic` preprocessors, and the `me` macro set
groff -t -p -me -T utf8 {{foo.me}}
# run a `groff` command with preprocessor and macro options guessed by the `grog` utility
eval "$(grog -T utf8 {{foo.me}})"
# show loggedin users info
w
# show loggedin users info without a header
w -h
# build a nix expression
nix-build --attr {{expression_name}}
# build a sandboxed nix expression (on nonnixos)
nix-build --attr {{expression_name}} --option sandbox true
# list imported keys
gpg2 --list-keys
# encrypt a specified file for a specified recipient, writing the output to a new file with `.gpg` appended
gpg2 --encrypt --recipient {{alice@example.com}} {{path/to/doc.txt}}
# encrypt a specified file with only a passphrase, writing the output to a new file with `.gpg` appended
gpg2 --symmetric {{path/to/doc.txt}}
# decrypt a specified file, writing the result to the standard output
gpg2 --decrypt {{path/to/doc.txt.gpg}}
# import a public key
gpg2 --import {{path/to/public_key.gpg}}
# export the public key of a specified email address to the standard output
gpg2 --export --armor {{alice@example.com}}
# export the private key with a specified email address to the standard output
gpg2 --export-secret-keys --armor {{alice@example.com}}
# decrypt text after a keystroke
echo "{{Hello, World!}}" | nms
# decrypt output immediately, without waiting for a keystroke
{{ls -la}} | nms -a
# decrypt the content of a file, with a custom output color
cat {{path/to/file}} | nms -a -f {{blue|white|yellow|black|magenta|green|red}}
# clear the screen before decrypting
{{command}} | nms -a -c
# move the cursor to a screen location
tput cup {{y_coordinate}} {{x_coordinate}}
# set foreground (af) or background (ab) color
tput {{setaf|setab}} {{ansi_color_code}}
# show number of columns, lines, or colors
tput {{cols|lines|colors}}
# ring the terminal bell
tput bel
# reset all terminal attributes
tput sgr0
# enable / disable word wrap
tput {{smam|rmam}}
# list available diff tools
git difftool --tool-help
# set the default diff tool to meld
git config --global diff.tool "{{meld}}"
# use the default diff tool to show staged changes
git difftool --staged
# use a specific tool (opendiff) to show changes since a given commit
git difftool --tool={{opendiff}} {{commit}}
# check commits for a gpg signature
git verify-commit {{commit_hash1 optional_commit_hash2 ...}}
# check commits for a gpg signature and show details of each commit
git verify-commit {{commit_hash1 optional_commit_hash2 ...}} --verbose
# check commits for a gpg signature and print the raw details
git verify-commit {{commit_hash1 optional_commit_hash2 ...}} --raw
# display the names and values of shell variables
set
# mark variables that are modified or created for export
set -a
# notify of job termination immediately
set -b
# set various options, e.g. enable `vi` style line editing
set -o {{vi}}
# make a bootable usb drive from an isohybrid file (such like `archlinuxxxx.iso`) and show the progress
dd if={{file.iso}} of=/dev/{{usb_drive}} status=progress
# clone a drive to another drive with 4 mib block, ignore error and show progress
dd if=/dev/{{source_drive}} of=/dev/{{dest_drive}} bs=4M conv=noerror status=progress
# generate a file of 100 random bytes by using kernel random driver
dd if=/dev/urandom of={{random_file}} bs=100 count=1
# benchmark the write performance of a disk
dd if=/dev/zero of={{file_1GB}} bs=1024 count=1000000
# generate a system backup into an img file and show the progress
dd if=/dev/{{drive_device}} of={{path/to/file.img}} status=progress
# restore a drive from an img file and show the progress
dd if={{path/to/file.img}} of=/dev/{{drive_device}} status=progress