mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-16 13:00:21 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/gzip
12
tldr/gzip
@@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Decompress a file, replacing it with the original uncompressed version:
|
||||
|
||||
`gzip {{-d|--decompress}} {{path/to/file.gz}}`
|
||||
`gzip {{[-d|--decompress]}} {{path/to/file.gz}}`
|
||||
|
||||
- Compress a file, keeping the original file:
|
||||
|
||||
`gzip {{-k|--keep}} {{path/to/file}}`
|
||||
`gzip {{[-k|--keep]}} {{path/to/file}}`
|
||||
|
||||
- Compress a file, specifying the output filename:
|
||||
|
||||
`gzip {{-c|--stdout}} {{path/to/file}} > {{path/to/compressed_file.gz}}`
|
||||
`gzip {{[-c|--stdout]}} {{path/to/file}} > {{path/to/compressed_file.gz}}`
|
||||
|
||||
- Decompress a `gzip` archive specifying the output filename:
|
||||
|
||||
`gzip {{-c|--stdout}} {{-d|--decompress}} {{path/to/file.gz}} > {{path/to/uncompressed_file}}`
|
||||
`gzip {{[-c|--stdout]}} {{[-d|--decompress]}} {{path/to/file.gz}} > {{path/to/uncompressed_file}}`
|
||||
|
||||
- Specify the compression level. 1 is the fastest (low compression), 9 is the slowest (high compression), 6 is the default:
|
||||
|
||||
`gzip -{{1..9}} {{-c|--stdout}} {{path/to/file}} > {{path/to/compressed_file.gz}}`
|
||||
`gzip -{{1..9}} {{[-c|--stdout]}} {{path/to/file}} > {{path/to/compressed_file.gz}}`
|
||||
|
||||
- Display the name and reduction percentage for each file compressed or decompressed:
|
||||
|
||||
`gzip {{-v|--verbose}} {{-d|--decompress}} {{path/to/file.gz}}`
|
||||
`gzip {{[-v|--verbose]}} {{[-d|--decompress]}} {{path/to/file.gz}}`
|
||||
|
||||
Reference in New Issue
Block a user