-
Notifications
You must be signed in to change notification settings - Fork 4
/
tldr.txt
14319 lines (9546 loc) · 388 KB
/
tldr.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Archive a file or folder
7z a {{archived.7z}} {{path/to/file}}
# Encrypt an existing archive (including headers)
7z a {{encrypted.7z}} -p{{password}} -mhe {{archived.7z}}
# Extract an existing 7z file with original directory structure
7z x {{archived.7z}}
# Extract an archive with user-defined output path
7z x {{archived.7z}} -o{{path/to/output}}
# Archive using a specific archive type
7z a -t {{zip|gzip|bzip2|tar|...}} {{archived.7z}} {{path/to/file}}
# List available archive types
7z i
# List the contents of an archive file
7z l {{archived.7z}}
# Archive a file or folder
7za a {{archived.7z}} {{path/to/file}}
# Extract an existing 7z file with original directory structure
7za x {{archived}}
# Archive using a specific archive type
7za a -t{{zip|gzip|bzip2|tar|...}} {{archived}} {{path/to/file}}
# List available archive types
7za i
# List the contents of an archive file
7za l {{archived}}
# Archive a file or folder
7zr a {{archived.7z}} {{path/to/file}}
# Extract an existing 7z file with original directory structure
7zr x {{archived.7z}}
# List the contents of an archive file
7zr l {{archived.7z}}
# Execute 100 HTTP GET requests to given URL
ab -n 100 {{url}}
# Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL
ab -n 100 -c 10 {{url}}
# Find files containing "foo"
ack {{foo}}
# Find files in a specific language
ack --ruby {{each_with_object}}
# Count the total number of matches for the term "foo"
ack -ch {{foo}}
# Show the file names containing "foo" and number of matches in each file
ack -cl {{foo}}
# Check whether the adb server process is running and start it
adb start-server
# Terminate the adb server process
adb kill-server
# Start a remote shell in the target emulator/device instance
adb shell
# Push an Android application to an emulator/device
adb install -r {{path/to/file.apk}}
# Copy a file/folder from the target device
adb pull {{path/to/device_file_or_folder}} {{path/to/local_destination_folder}}
# Copy a file/folder to the target device
adb push {{path/to/local_file_or_folder}} {{path/to/device_destination_folder}}
# Get a list of connected devices
adb devices
# Find files containing "foo", and print the line matches in context
ag {{foo}}
# Find files containing "foo" in a specific directory
ag {{foo}} {{path/to/folder}}
# Find files containing "foo", but only list the filenames
ag -l {{foo}}
# Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line
ag -i -o {{FOO}}
# Find "foo" in files with a name matching "bar"
ag {{foo}} -G {{bar}}
# Find files whose contents match a regular expression
ag '{{^ba(r|z)$}}'
# Find files with a name matching "foo"
ag -g {{foo}}
# Wait for message and display when received
airpaste
# Send text
echo {{text}} | airpaste
# Send file
airpaste < {{path/to/file}}
# Receive file
airpaste > {{path/to/file}}
# Create/Join channel
airpaste {{channel_name}}
# Create a generic alias
alias {{word}}="{{command}}"
# View the command associated to a given alias
alias {{word}}
# Remove an aliased command
unalias {{word}}
# List all aliased words
alias -p
# Turn rm into an interactive command
alias {{rm}}="{{rm -i}}"
# Create `la` as a shortcut for `ls -a`
alias {{la}}="{{ls -a}}"
# Install a role
ansible-galaxy install {{username.role_name}}
# Remove a role
ansible-galaxy remove {{username.role_name}}
# List installed roles
ansible-galaxy list
# Search for a given role
ansible-galaxy search {{role_name}}
# Create a new role
ansible-galaxy init {{role_name}}
# Run tasks in playbook
ansible-playbook {{playbook}}
# Run tasks in playbook with custom host inventory
ansible-playbook {{playbook}} -i {{inventory_file}}
# Run tasks in playbook with extra variables defined via the command line
ansible-playbook {{playbook}} -e "{{variable1}}={{value1}} {{variable2}}={{value2}}"
# Run tasks in playbook with extra variables defined in a json file
ansible-playbook {{playbook}} -e "@{{variables.json}}"
# List hosts belonging to a group
ansible {{group}} --list-hosts
# Ping a group of hosts by invoking the ping module
ansible {{group}} -m ping
# Display facts about a group of hosts by invoking the setup module
ansible {{group}} -m setup
# Execute a command on a group of hosts by invoking command module with arguments
ansible {{group}} -m command -a '{{my_command}}'
# Execute a command with administrative privileges
ansible {{group}} --become --ask-become-pass -m command -a '{{my_command}}'
# Execute a command using a custom inventory file
ansible {{group}} -i {{inventory_file}} -m command -a '{{my_command}}'
# Create random passwords (default password length is 8)
apg
# Create a password with at least 1 symbol (S), 1 number (N), 1 uppercase (C), 1 lowercase (L)
apg -M SNCL
# Create a password with 16 characters
apg -m {{16}}
# Create a password with maximum length of 16
apg -x {{16}}
# Create a password that doesn't appear in a dictionary (the dictionary file has to be provided)
apg -r {{dictionary_file}}
# Install packages from http://atom.io/packages and themes from http://atom.io/themes
apm install {{package_name}}
# Remove packages/themes
apm remove {{package_name}}
# Upgrade packages/themes
apm upgrade {{package_name}}
# Search for keyword
apropos {{regular_expression}}
# Search without restricting output to terminal width
apropos -l {{regular_expression}}
# Extract all members from an archive
ar -x {{libfoo.a}}
# List the members of an archive
ar -t {{libfoo.a}}
# Replace or add files to an archive
ar -r {{libfoo.a}} {{foo.o}} {{bar.o}} {{baz.o}}
# Insert an object file index (equivalent to using `ranlib`)
ar -s {{libfoo.a}}
# Create an archive with files and an accompanying object file index
ar -rs {{libfoo.a}} {{foo.o}} {{bar.o}} {{baz.o}}
# Download a URI to a file
aria2c {{url}}
# Download from multiple sources
aria2c {{url_1}} {{url_2}}
# Download the URIs listed in a file
aria2c -i {{filename}}
# Download with multiple connections
aria2c -s {{connections_num}} {{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}}
# Show current arp table
arp -a
# Clear the entire cache
sudo arp -a -d
# Delete a specific entry
arp -d {{address}}
# Create an entry
arp -s {{address}} {{mac_address}}
# Archive a file or folder
asar pack {{path/to/file}} {{archived.asar}}
# Extract an archive
asar extract {{archived.asar}}
# Extract a specific file from an archive
asar extract-file {{archived.asar}} {{file}}
# List the contents of an archive file
asar list {{archived.asar}}
# 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
# Apply the default style of 4 spaces per indent and no formatting changes
astyle {{source_file}}
# Apply the java style with attached braces
astyle --style=java {{path/to/file}}
# Apply the allman style with broken braces
astyle --style=allman {{path/to/file}}
# Apply a custom indent using spaces. Choose between 2 and 20 spaces
astyle --indent=spaces={{number_of_spaces}} {{path/to/file}}
# Apply a custom indent using tabs. Choose between 2 and 20 tabs
astyle --indent=tab={{number_of_tabs}} {{path/to/file}}
# Execute commands from standard input in 5 minutes (press `Ctrl + D` after entering commands)
at now + 5 minutes
# Execute a command from standard input at 10:00 AM today
echo "{{./make_db_backup.sh}}" | at 1000
# Execute commands from a given file next Tuesday
at -f {{path/to/file}} 9:30 PM Tue
# Open a file or folder
atom {{path/to/file_or_folder}}
# Open a file or folder in a new window
atom -n {{path/to/file_or_folder}}
# Open a file or folder in an existing window
atom --add {{path/to/file_or_folder}}
# Open atom in safe mode (does not load any additional packages)
atom --safe
# Prevent atom from forking into the background, keeping atom attached to the terminal
atom --foreground
# Show the current user's scheduled jobs
atq
# Show jobs from queue named 'a' (queues have single-character names)
atq -q {{a}}
# Show jobs of all users (run as super user)
sudo atq
# Remove job number 10
atrm {{10}}
# Remove many jobs, separated by spaces
atrm {{15}} {{17}} {{22}}
# Remove unused variables from a single file and display the diff
autoflake --remove-unused-variables {{file.py}}
# Remove unused imports from multiple files and display the diffs
autoflake --remove-all-unused-imports {{file1.py}} {{file2.py}} {{file3.py}}
# Remove unused variables from a file, overwriting the file
autoflake --remove-unused-variables --in-place {{file.py}}
# Remove unused variables recursively from all files in a directory, overwriting each file
autoflake --remove-unused-variables --in-place --recursive {{path/to/directory}}
# Jump to a directory that contains the given pattern
j {{pattern}}
# Jump to a sub-directory (child) of the current directory that contains the given pattern
jc {{pattern}}
# Open a directory that contains the given pattern in the operating system file manager
jo {{pattern}}
# Remove non-existing directories from the autojump database
j --purge
# Show the entries in the autojump database
j -s
# Open an SSH session, restarting when a monitoring port fails return data
autossh -M {{monitor_port}} {{ssh_command}}
# Open an SSH session which forwards a local port to a remote one, restarting if necessary
autossh -M {{monitor_port}} -L {{local_port}}:localhost:{{remote_port}} {{user}}@{{host}}
# Fork before executing ssh (runs in the background) and don't open a remote shell
autossh -f -M {{monitor_port}} -N {{ssh_command}}
# Run autossh in the background, with no monitoring port, instead relying on SSH keep-alives every 10 seconds to detect failure
autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" {{ssh_command}}
# Run autossh in the background, with no monitoring port, 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 autossh in the background with debug output logged to a file and ssh verbose output logged to a second file
AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{log_file}} autossh -f -M {{monitor_port}} -v -E {{ssh_log_file}} {{ssh_command}}
# Read AVR microcontroller
avrdude -p {{AVR_device}} -c {{programmer}} -U flash:r:{{file.hex}}:i
# Write AVR microcontroller
avrdude -p {{AVR_device}} -c {{programmer}} -U flash:w:{{file.hex}}
# List available AVR devices
avrdude -p \?
# List available AVR programmers
avrdude -c \?
# Print the fifth column (a.k.a. field) in a space-separated file
awk '{print $5}' {{filename}}
# Print the second column of the lines containing "something" in a space-separated file
awk '/{{something}}/ {print $2}' {{filename}}
# Print the last column of each line in a file, using a comma (instead of space) as a field separator
awk -F ',' '{print $NF}' {{filename}}
# Sum the values in the first column of a file and print the total
awk '{s+=$1} END {print s}' {{filename}}
# Sum the values in the first column and pretty-print the values and then the total
awk '{s+=$1; print $1} END {print "--------"; print s}' {{filename}}
# Print every third line starting from the first line
awk 'NR%3==1' {{filename}}
# Show files in a bucket
aws s3 ls {{bucket_name}}
# Sync files and folders from local to bucket
aws s3 sync {{path/to/files}} s3://{{bucket_name}}
# Sync files and folders from bucket to local
aws s3 sync s3://{{bucket_name}} {{path/to/target}}
# Sync files and folders with exclusions
aws s3 sync {{path/to/files}} s3://{{bucket_name}} --exclude {{path/to/file}} --exclude {{path/to/folder}}/*
# Remove file from bucket
aws s3 rm s3://{{bucket}}/{{path/to/file}}
# Preview changes only
aws s3 {{any_command}} --dryrun
# Download a URL to a file
axel {{url}}
# Download and specify filename
axel {{url}} -o {{filename}}
# Download with multiple connections
axel -n {{connections_num}} {{url}}
# Search for mirrors
axel -S {{mirrors_num}} {{url}}
# Limit download speed (bytes per second)
axel -s {{speed}} {{url}}
# Calculate the BLAKE2 checksum for a file
b2sum {{filename1}}
# Calculate BLAKE2 checksums for multiple files
b2sum {{filename1}} {{filename2}}
# Read a file of BLAKE2 sums and filenames and verify all files have matching checksums
b2sum -c {{filename.b2}}
# Calculate the BLAKE2 checksum from stdin
{{somecommand}} | shasum
# 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 comma-separated 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
# Search a disk for bad blocks by using a non-destructive read-only test
sudo badblocks {{/dev/sda}}
# Search an unmounted disk for bad blocks with a non-destructive read-write test
sudo badblocks -n {{/dev/sda}}
# Search an unmounted disk for bad blocks with a destructive write test
sudo badblocks -w {{/dev/sda}}
# Print the text message as a large banner (quotes are optional)
banner {{"Hello World"}}
# Print the text message as a banner with a width of 50 characters
banner -w {{50}} {{"Hello World"}}
# Read text from stdin
banner
# Encode a file
base32 {{filename}}
# Decode a file
base32 -d {{filename}}
# Encode from stdin
{{somecommand}} | base32
# Decode from stdin
{{somecommand}} | base32 -d
# Encode a file
base64 {{filename}}
# Decode a file
base64 -d {{filename}}
# Encode from stdin
{{somecommand}} | base64
# Decode from stdin
{{somecommand}} | base64 -d
# Show only the file name from a path
basename {{path/to/file}}
# Show only the file name from a path, with a suffix removed
basename {{path/to/file}} {{suffix}}
# Start interactive shell
bash
# Execute a command
bash -c "{{command}}"
# Run commands from a file
bash {{file.sh}}
# Run commands from a file, logging all commands executed to the terminal
bash -x {{file.sh}}
# Run commands from STDIN
bash -s
# Print the version information of bash (use `echo $BASH_VERSION` to show just the version string)
bash --version
# Print the contents of a file to the standard output
bat {{file}}
# Concatenate several files into the target file
bat {{file1}} {{file2}} > {{target_file}}
# Append several files into the target file
bat {{file1}} {{file2}} >> {{target_file}}
# Number all output lines
bat -n {{file}}
# Syntax highlight a json file
bat --language json {{file.json}}
# Display all supported languages
bat --list-languages
# Execute a command from standard input
echo "{{./make_db_backup.sh}}" | batch
# Execute commands from a given file
batch -f {{path/to/file}}
# Execute commands from standard input (press `Ctrl + D` when finished)
batch
# Run calculator in interactive mode using the standard math library
bc -l
# Calculate the result of an expression
bc <<< "(1 + 2) * 2 ^ 2"
# Calculate expression and force number of decimal places to 10
bc <<< "scale=10; 5 / 3"
# Calculate expression with sine and cosine using mathlib
bc -l <<< "s(1) + c(1)"
# Start beanstalkd, listening on port 11300
beanstalkd
# Start beanstalkd listening on a custom port and address
beanstalkd -l {{ip_address}} -p {{port_number}}
# Persist work queues by saving them to disk
beanstalkd -b {{path/to/persistence_directory}}
# Sync to the persistence directory every 500 milliseconds
beanstalkd -b {{path/to/persistence_directory}} -f {{500}}
# Intersect two files with respect to the sequences' strand and save the result to {{path/to/output_file}}
bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -s > {{path/to/output_file}}
# Intersect two files with a left outer join, i.e. report each feature from {{file_1}} and NULL if no overlap with {{file_2}}
bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -lof > {{path/to/output_file}}
# Using more efficient algorithm to intersect two pre-sorted files
bedtools intersect -a {{path/to/file_1}} -b {{path/to/file_2}} -sorted > {{path/to/output_file}}
# Group file {{path/to/file}} based on the first three and the fifth column and summarize the sixth column by summing it up
bedtools groupby -i {{path/to/file}} -c 1-3,5 -g 6 -o sum
# Convert bam-formated file to a bed-formated one
bedtools bamtobed -i {{path/to/file}}.bam > {{path/to/file}}.bed
# Find for all features in {{file_1}}.bed the closest one in {{file_2}}.bed and write their distance in an extra column (input files must be sorted)
bedtools closest -a {{path/to/file_1}}.bed -b {{path/to/file_2}}.bed -d
# Resume 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}}
# Render all frames of an animation in the background, without loading the UI (output is saved to `/tmp`)
blender -b {{filename}}.blend -a
# Render an animation using a specific image naming pattern, in a path relative (`//`) to the .blend file
blender -b {{filename}}.blend -o //{{render/frame_###.png}} -a
# Render the 10th frame of an animation as a single image, saved to an existing folder (absolute path)
blender -b {{filename}}.blend -o {{/path/to/output_folder}} -f {{10}}
# Render the second last frame in an animation as a JPEG image, saved to an existing folder (relative path)
blender -b {{filename}}.blend -o //{{output_folder}} -F {{JPEG}} -f {{-2}}
# Render the animation of a specific scene, starting at frame 10 and ending at frame 500
blender -b {{filename}}.blend -S {{scene_name}} -s {{10}} -e {{500}} -a
# Render an animation at a specific resolution, by passing a Python expression
blender -b {{filename}}.blend --python-expr '{{import bpy; bpy.data.scenes[0].render.resolution_percentage = 25}}' -a
# Start an interactive Blender session in the terminal with a python console (do `import bpy` after starting)
blender -b --python-console
# Create a blockmap from image file
bmaptool create -o {{blockmap.bmap}} {{source.img}}
# Copy an image file into sdb
bmaptool copy --bmap {{blockmap.bmap}} {{source.img}} {{/dev/sdb}}
# Copy a compressed image file into sdb
bmaptool copy --bmap {{blockmap.bmap}} {{source.img.gz}} {{/dev/sdb}}
# Copy an image file into sdb without using a blockmap
bmaptool copy --nobmap {{source.img}} {{/dev/sdb}}
# Start a REPL session either with the project or standalone
boot repl
# Build a single "uberjar"
boot jar
# Learn about a command
boot cljs --help
# Generate scaffolding for a new project based on a template
boot --dependencies boot/new new --template {{template_name}} --name {{project_name}}
# Build for development (if using the boot/new template)
boot dev
# Build for production (if using the boot/new template)
boot prod
# Initialise a (local) repository
borg init {{/path/to/repo_folder}}
# Backup a folder into the repository, creating an archive called "Monday"
borg create --progress {{/path/to/repo_folder}}::{{Monday}} {{/path/to/source_folder}}
# List all archives in a repository
borg list {{/path/to/repo_folder}}
# Extract a specific folder from the "Monday" archive in a remote repository, excluding all *.ext files
borg extract {{user}}@{{host}}:{{/path/to/repo_folder}}::{{Monday}} {{path/to/target_folder}} --exclude '{{*.ext}}'
# Prune a repository by deleting all archives older than 7 days, listing changes
borg prune --keep-within {{7d}} --list {{/path/to/repo_folder}}
# Mount a repository as a FUSE filesystem
borg mount {{/path/to/repo_folder}}::{{Monday}} {{/path/to/mountpoint}}
# Display help on creating archives
borg create --help
# Create local alias for director
bosh alias-env {{environment_name}} -e {{ip_address|url}} --ca-cert {{ca_certificate}}
# List environments
bosh environments
# Login to the director
bosh login -e {{environment}}
# List deployments
bosh -e {{environment}} deployments
# List environment virtual machines
bosh -e {{environment}} vms -d {{deployment}}
# Ssh into virtual machine
bosh -e {{environment}} ssh {{virtual_machine}} -d {{deployment}}
# Upload stemcell
bosh -e {{environment}} upload-stemcell {{stemcell_file|url}}
# Show current cloud config
bosh -e {{environment}} cloud-config
# Install a project's dependencies, listed in its bower.json
bower install
# Install one or more packages to the bower_components directory
bower install {{package}} {{package}}
# Uninstall packages locally from the bower_components directory
bower uninstall {{package}} {{package}}
# List local packages and possible updates
bower list
# Display help information about a bower command
bower help {{command}}
# Create a bower.json file for your package
bower init
# Install a specific dependency version, and add it to bower.json
bower install {{local_name}}={{package}}#{{version}} --save
# Build a new Phar file
box build
# Build a new Phar file using a specific config file
box build -c {{path/to/config}}
# Display information about the PHAR PHP extension
box info
# Display information about a specific Phar file
box info {{path/to/phar_file}}
# Validate the first found config file in the working directory
box validate
# Verify the signature of a specific Phar file
box verify {{path/to/phar_file}}
# Display all available commands and options
box help
# Start a server from a specific directory
browser-sync start --server {{path/to/directory}} --files {{path/to/directory}}
# Start a server from local directory, watching all css files in some directory
browser-sync start --server --files '{{path/to/directory/*.css}}'
# Create configuration file
browser-sync init
# Start browser-sync from config file
browser-sync start --config {{config_file}}
# Install all gems defined in the gemfile expected in the working directory
bundle install
# Update all gems by the rules defined in the gemfile and regenerate gemfile.lock
bundle update
# Update one specific gem defined in the gemfile
bundle update --source {{gemname}}
# Create a new gem skeleton
bundle gem {{gemname}}
# Initialize a backup repository in the specified local directory
bup -d {{path/to/repository}} init
# Prepare a given folder before taking a backup
bup -d {{path/to/repository}} index {{path/to/folder}}
# Backup a folder to the repository
bup -d {{path/to/repository}} save -n {{backup_name}} {{path/to/folder}}
# 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}}
# Compile source file(s) and create an executable
c99 {{file.c}}
# Compile source file(s) and create an executable with a custom name
c99 -o {{executable_name}} {{file.c}}
# Compile source file(s) and create object file(s)
c99 -c {{file.c}}
# Compile source file(s), link with object file(s), and create an executable
c99 {{file.c}} {{file.o}}
# Search and list packages from Hackage
cabal list {{search_string}}
# Show information about a package
cabal info {{package_name}}
# Download and install a package
cabal install {{package_name}}
# Create a new Haskell project in the current directory
cabal init
# Build the project in the current directory
cabal build
# Run tests of the project in the current directory
cabal test
# Start a server to distribute ebooks. Access at http://localhost:8080
calibre-server
# Start server on different port. Access at http://localhost:port
calibre-server --port {{port}}
# Password protect the server
calibre-server --username {{username}} --password {{password}}
# List ebooks in the library with additional information
calibredb list
# Search for ebooks displaying additional information
calibredb list --search {{search_term}}
# Search for just ids of ebooks
calibredb search {{search_term}}
# Add one or more ebooks to the library
calibredb add {{file1 file2 …}}
# Remove one or more ebooks from the library. You need ebook-ids (see above)
calibredb remove {{id1 id2 …}}
# Search for crates
cargo search {{search_string}}
# Install a crate
cargo install {{crate_name}}
# List installed crates
cargo install --list
# Create a new binary Rust project in the current directory
cargo init --bin
# Create a new library Rust project in the current directory
cargo init
# Build the Rust project in the current directory
cargo build
# Build with multiple parallel jobs
cargo build -j {{jobs}}
# Match a variable against string literals to decide which command to run
case {{$tocount}} in {{words}}) {{wc -w README}}; ;; {{lines}}) {{wc -l README}}; ;; esac
# Combine patterns with |, use * as a fallback pattern
case {{$tocount}} in {{[wW]|words}}) {{wc -w README}}; ;; {{[lL]|lines}}) {{wc -l README}}; ;; *) {{echo "what?"}}; ;; esac
# Print the contents of a file to the standard output
cat {{file}}
# Concatenate several files into the target file
cat {{file1}} {{file2}} > {{target_file}}
# Append several files into the target file
cat {{file1}} {{file2}} >> {{target_file}}
# Number all output lines
cat -n {{file}}
# Go to the given directory
cd {{path/to/directory}}
# Go to home directory of current user
cd
# Go up to the parent of the current directory
cd ..
# Go to the previously chosen directory
cd -
# Change the owner of a file/folder
chgrp {{group}} {{path/to/file}}
# Recursively change the owner of a folder and its contents
chgrp -R {{group}} {{path/to/folder}}
# Change the owner of a symbolic link
chgrp -h {{user}} {{path/to/symlink}}
# Change the owner of a file/folder to match a reference file
chgrp --reference={{path/to/reference_file}} {{path/to/file}}
# Give the [u]ser who owns a file the right to e[x]ecute it
chmod u+x {{file}}
# Give the user rights to [r]ead and [w]rite to a file/directory
chmod u+rw {{file}}
# Remove executable rights from the [g]roup
chmod g-x {{file}}
# Give [a]ll users rights to read and execute
chmod a+rx {{file}}
# Give [o]thers (not in the file owner's group) the same rights as the group
chmod o=g {{file}}
# Change permissions recursively giving [g]roup and [o]thers the abililty to [w]rite
chmod -R g+w,o+w {{directory}}
# Change the owner user of a file/folder
chown {{user}} {{path/to/file}}
# Change the owner user and group of a file/folder
chown {{user}}:{{group}} {{path/to/file}}
# Recursively change the owner of a folder and its contents
chown -R {{user}} {{path/to/folder}}
# Change the owner of a symbolic link
chown -h {{user}} {{path/to/symlink}}
# Change the owner of a file/folder to match a reference file
chown --reference={{path/to/reference_file}} {{path/to/file}}
# 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}}
# Change shell
chsh -s {{path/to/shell_binary}} {{username}}
# Display a 32 bit checksum, size in bytes and filename
cksum {{filename}}
# Compile a source code file into an executable binary
clang {{input_source.c}} -o {{output_executable}}
# Activate output of all errors and warnings
clang {{input_source.c}} -Wall -o {{output_executable}}
# Include libraries located at a different path than the source file
clang {{input_source.c}} -o {{output_executable}} -I{{header_path}} -L{{library_path}} -l{{library_name}}
# Compile source code into LLVM Intermediate Representation (IR)
clang -S -emit-llvm {{file.c}} -o {{file.ll}}
# Clear the screen (equivalent to typing Control-L when using the bash shell)
clear
# Count all the lines of code in a directory
cloc {{/path/to/directory}}
# Count all the lines of code in a directory, displaying a progress bar during the counting process
cloc --progress=1 {{/path/to/directory}}
# Compare 2 directory structures and count the differences between them
cloc --diff {{/directory/one}} {{/directory/two}}
# Generate a Makefile and use it to compile a project in the same folder as the source
cmake && make
# Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build)
cmake -H. -B{{build}} && make -C {{build}}
# Run cmake in interactive mode (it will ask for each variable, instead of using defaults)