• gzip
  • Gzip命令

    gzip

    将一个大的文件通过文件压缩算法变成一个小文件,gzip命令不能直接压缩目录,所以要先用tar命令打包成一个文件。 -d 解压文件 -v 显示指令执行的过程 -l 列出压缩文件的内容 -c 将内容输出到标准输出,不改变原始文件 -r 递归操作 -n 数据1-9,指定压缩率,默认为6,值越大压缩率越高 -t 测试压缩文件是否完整

     ~/Desktop  ll
    total 144
    drwxr-xr-x  2 andy root  4096 7月  15 22:40 .
    drwx------ 59 andy root 20480 7月  18 09:08 ..
    -rw-r--r--  1 andy root   103 7月  15 22:12 code.copy
    -rw-r--r--  1 andy root   103 6月  27 18:37 code.py
    -rw-r--r--  1 andy root     1 6月  27 18:36 code.rb
    -rw-r--r--  1 andy root  4480 7月  12 12:15 gui-config.json
    -rw-------  1 andy root  2044 3月   7 15:14 link.py
    -rw-r--r--  1 andy root 12288 2月   1 20:17 .macbuntu.sh.swp
    -rwxr-xr-x  1 andy root   203 2月   1 11:20 pycharm.desktop
    -rw-r--r--  1 andy root 12344 7月  12 18:35 v.jpg
     ~/Desktop  gzip .macbuntu.sh.swp 
     ~/Desktop  ll
    total 136
    drwxr-xr-x  2 andy root  4096 7月  18 09:09 .
    drwx------ 59 andy root 20480 7月  18 09:09 ..
    -rw-r--r--  1 andy root   103 7月  15 22:12 code.copy
    -rw-r--r--  1 andy root   103 6月  27 18:37 code.py
    -rw-r--r--  1 andy root     1 6月  27 18:36 code.rb
    -rw-r--r--  1 andy root  4480 7月  12 12:15 gui-config.json
    -rw-------  1 andy root  2044 3月   7 15:14 link.py
    -rw-r--r--  1 andy root   486 2月   1 20:17 .macbuntu.sh.swp.gz
    -rwxr-xr-x  1 andy root   203 2月   1 11:20 pycharm.desktop
    -rw-r--r--  1 andy root 12344 7月  12 18:35 v.jp
    

    上一篇:Tar命令

    下一篇:Flask socketio简单示例