gzip / gunzip

发布时间: 更新时间: 总字数:548 阅读时间:2m 作者: 分享 复制网址

gzip/gunzip compress or expand files

gzip Help

gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ...  ]
# gzip --help
Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

  -c, --stdout      write 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, --license     display software license
  -n, --no-name     do 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, --verbose     verbose mode
  -V, --version     display version number
  -1, --fast        compress faster
  -9, --best        compress better
    --rsyncable   Make rsync-friendly archive

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.

gzip 示例

# ll
total 0
-rw-r--r-- 1 root root 0 Aug 11 19:33 1.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 2.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 3.md
# gzip *
# ll
total 12
-rw-r--r-- 1 root root 25 Aug 11 19:33 1.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 2.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 3.md.gz
# gzip -l 1.md.gz
         compressed        uncompressed  ratio uncompressed_name
                 25                   0   0.0% 1.md
# gzip -dv *
1.md.gz:	  0.0% -- replaced with 1.md
2.md.gz:	  0.0% -- replaced with 2.md
3.md.gz:	  0.0% -- replaced with 3.md

gunzip Help

gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ...  ]
# gunzip --help
Usage: /usr/bin/gunzip [OPTION]... [FILE]...
Uncompress FILEs (by default, in-place).

Mandatory arguments to long options are mandatory for short options too.

  -c, --stdout      write on standard output, keep original files unchanged
  -f, --force       force overwrite of output file and compress links
  -l, --list        list compressed file contents
  -n, --no-name     do 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, --verbose     verbose mode
      --help        display this help and exit
      --version     display version information and exit

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.

gunzip 示例

# ll
total 12
-rw-r--r-- 1 root root 25 Aug 11 19:33 1.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 2.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 3.md.gz
# gunzip *
# ll
total 0
-rw-r--r-- 1 root root 0 Aug 11 19:33 1.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 2.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 3.md
# gzip *
# ll
total 12
-rw-r--r-- 1 root root 25 Aug 11 19:33 1.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 2.md.gz
-rw-r--r-- 1 root root 25 Aug 11 19:33 3.md.gz
# gzip -d *
# ll
total 0
-rw-r--r-- 1 root root 0 Aug 11 19:33 1.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 2.md
-rw-r--r-- 1 root root 0 Aug 11 19:33 3.md
  • 上一页:HA
  • 下一页:grep
最新评论
加载中...
Home Archives Categories Tags Statistics