From 92131c3d6d44631fec4860109410aebf3e341685 Mon Sep 17 00:00:00 2001 From: Lena <126529524+acuteenvy@users.noreply.github.com> Date: Wed, 5 Jun 2024 02:13:52 +0200 Subject: [PATCH] gzip: update page (#12892) --- pages/common/gzip.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pages/common/gzip.md b/pages/common/gzip.md index b652044ad1..a4da2a1bc5 100644 --- a/pages/common/gzip.md +++ b/pages/common/gzip.md @@ -5,24 +5,28 @@ - Compress a file, replacing it with a `gzip` archive: -`gzip {{file.ext}}` +`gzip {{path/to/file}}` - Decompress a file, replacing it with the original uncompressed version: -`gzip -d {{file.ext}}.gz` +`gzip {{-d|--decompress path/to/file.gz}}` - Compress a file, keeping the original file: -`gzip --keep {{file.ext}}` +`gzip {{-k|--keep path/to/file}}` -- Compress a file specifying the output filename: +- Compress a file, specifying the output filename: -`gzip -c {{file.ext}} > {{compressed_file.ext.gz}}` +`gzip {{-c|--stdout path/to/file}} > {{path/to/compressed_file.gz}}` - Decompress a `gzip` archive specifying the output filename: -`gzip -c -d {{file.ext}}.gz > {{uncompressed_file.ext}}` +`gzip {{-c|--stdout -d|--decompress path/to/file.gz}} > {{path/to/uncompressed_file}}` -- Specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is 6: +- Specify the compression level. 1 is the fastest (low compression), 9 is the slowest (high compression), 6 is the default: -`gzip -9 -c {{file.ext}} > {{compressed_file.ext.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}}`