Linux 环境下 gzip 的加解密命令

1、加密

[root@127-0-0-1 nginx]# gzip  -v  access.log-20190328
  access.log-20190328:	 95.8% -- replaced with access.log-20190328.gz
[root@127-0-0-1 nginx]# 

 replaced   with :被替代

2、解压

     方法一:

[root@127-0-0-1 nginx]# gzip -dv  /var/log/nginx/access.log-20190328.gz 
access.log-20190328.gz:	 95.8% -- replaced with access.log-20190328
[root@127-0-0-1 nginx]# 

  方法二:

[root@127-0-0-1 nginx]# gunzip -v access.log-20190328.gz 
  access.log-20190328.gz:  95.8% -- replaced with access.log-20190328
[root@127-0-0-1 nginx]# 

3、版本

[root@127-0-0-1 nginx]# gzip -V
gzip 1.5
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
[root@127-0-0-1 nginx]# 

4、总结

    -v:显示指令执行过程;

    -d:解开压缩文件;

    -V:显示版本信息;

posted @ 2019-07-22 15:07  活出自己范儿  Views(2184)  Comments(0Edit  收藏  举报