日期:2014-05-16  浏览次数:20723 次

Linux压缩命令整理
关于后缀名
引用
*.Z   compress程序压缩的文件
*.bz2  bzip2程序压缩的文件
*.gz gzip程序压缩的文件
*.tar tar程序打包的数据,没有经过压缩
*.tar.gz tar程序打包的数据,经过gzip压缩


1、compress
压缩
compress filename

解压缩
compress -d filename.Z

or
uncompress filename.Z


2、bzip2,bzcat
引用
bzip2 -h                                                                                                                                            ──(Mon,Jul01)─┘
bzip2, a block-sorting file compressor.  Version 1.0.6, 6-Sept-2010.

   usage: bzip2 [flags and input files in any order]

   -h --help           print this message
   -d --decompress     force decompression
   -z --compress       force compression
   -k --keep           keep (don't delete) input files
   -f --force          overwrite existing output files
   -t --test           test compressed file integrity
   -c --stdout         output to standard out
   -q --quiet          suppress noncritical error messages
   -v --verbose        be verbose (a 2nd -v gives more)
   -L --license        display software version & license
   -V --version        display software version & license
   -s --small          use less memory (at most 2500k)
   -1 .. -9            set block size to 100k .. 900k
   --fast              alias for -1
   --best              alias for -9

   If invoked as `bzip2', default action is to compress.
              as `bunzip2',  default action is to decompress.
              as `bzcat', default action is to decompress to stdout.

   If no file names are given, bzip2 compresses or decompresses
   from standard input to standard output.  You can combine
   short flags, so `-v -4' means the same as -v4 or -4v, &c.

bzip2 [-dz] filename

参数说明
-d :解压缩
-z :压缩
bzcat filename