gzip命令是常用的压缩和解压缩命令。
语法帮助使用gzip --help可以查看使用手册:
-c, --stdoutwrite on standard output, keep original files unchanged-d, --decompress decompress-f, --force force overwrite of output file and compress links-h, --help give this help-l, --list list compressed file contents-L, --licensedisplay software license-n, --no-namedo not save or restore the original name and time stamp-N, --name save or restore the original name and time stamp-q, --quiet suppress all warnings-r, --recursive operate recursively on directories-S, --suffix=SUF use suffix SUF on compressed files-t, --test test compressed file integrity-v, --verboseverbose mode-V, --versiondisplay version number-1, --fast compress faster-9, --best compress better--rsyncable Make rsync-friendly archive
举例: