归档命令(4)——gzip
来源:互联网 发布:比尔盖茨编程水平 编辑:程序博客网 时间:2024/06/05 19:53
[root@localhost ~]# 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 在标准输出上写,保持原始文件不变 -d, --decompress 解压缩 -f, --force 强制强制重写输出文件并压缩链接 -h, --help give this help -l, --list 列出压缩文件内容 -L, --license 显示软件许可证 -n, --no-name 不保存或恢复原始名称和时间戳 -N, --name 保存或恢复原始名称和时间戳 -q, --quiet 禁止所有警告 -r, --recursive 在目录上递归地操作 -S, --suffix=SUF 在压缩文件上使用后缀SUF -t, --test 测试压缩文件的完整性 -v, --verbose 详细模式 -V, --version 显示版本号 -1, --fast 压缩更快 -9, --best 压缩更好--rsyncable Make rsync-friendly archive
With no FILE, or when FILE is -, read standard input.
Report bugs to bug-gzip@gnu.org.
示例
gzip 压缩文件,并删除原始文件
siu@Darling ~/work $ lsa b c dirsiu@Darling ~/work $ gzip asiu@Darling ~/work $ lsa.gz b c dirsiu@Darling ~/work $
gzip -v 压缩文件,并显示压缩信息
siu@Darling ~/work $ gzip -v bb: 26.4% -- replaced with b.gzsiu@Darling ~/work $ lsa.gz b.gz c dir
gunzip 解压文件,gunzip == gzip -dsiu@Darling ~/work $ gunzip a.gz siu@Darling ~/work $ lsa b.gz c dir
zcat 不解压而显示压缩文件的内容siu@Darling ~/work $ zcat b.gz Picture perfect memories scattered all around the floorReaching for the phone 'cause I can't fight it anymoreAnd I wonder if I ever cross your mindFor me it happens all the time
gunzip -c 解压文件到标准输出,也就是一解压就输出内容到屏幕,不改动文件siu@Darling ~/work $ gunzip -c b.gz Picture perfect memories scattered all around the floorReaching for the phone 'cause I can't fight it anymoreAnd I wonder if I ever cross your mindFor me it happens all the time
gunzip -l 显示压缩和解压缩的信息,但并不执行解压缩siu@Darling ~/work $ gunzip -l b.gz compressed uncompressed ratio uncompressed_name 154 182 26.4% bsiu@Darling ~/work $ lsa b.gz c dir
gzip -9 -r 用压缩量最大的方式递归压缩目录中的文件siu@Darling ~/work $ gzip -9 -r dirsiu@Darling ~/work $ lsa b.gz c dirsiu@Darling ~/work $ ls -l dir总用量 12-rw-r--r-- 1 siu siu 154 1月 12 16:22 a.gz-rw-r--r-- 1 siu siu 154 1月 12 16:22 b.gz-rw-r--r-- 1 siu siu 154 1月 12 16:22 c.gz
阅读全文
0 0
- 归档命令(4)——gzip
- linux命令(17)——gzip
- 归档命令(1)——tar
- 归档命令(2)——cpio
- 归档命令(3)——ar
- 归档命令(5)——shar
- linux基本命令(32)——gzip命令
- 归档及压缩命令 gzip、bzip2、tar 命令详情
- linux命令之——gzip
- Linux学习笔记——gzip命令
- Shell命令——归档备份
- Linux命令之文件归档、压缩、解压缩-tar,gzip,gunzip,bzip2,bunzip2,zip
- Linux 文件的解压和压缩 —— gzip命令
- gzip命令
- gzip 命令
- gzip命令
- gzip命令
- gzip命令
- 洛谷P2679 NOIP2015 子串
- Base64位图片上传和解密
- 简单页面(C标签)+java后台+数据库,对前篇文章的改进
- SSH项目整合-简单在线订单系统
- 小白算法练习 简单背包专题003 完全背包 hdu lanqiao 包子凑数 dp
- 归档命令(4)——gzip
- 算法学习笔记17-经典排序算法
- ProjectBySwift-02-CustomFont
- struct和typedef struct分析
- js 定时器如何立即关闭
- 【挖坑】在阿里云上部署Web项目(学生9块9一个月!)
- jQuery源码学习笔记(05)
- 数据结构排序基础算法总结(C++版)
- 使用python如何实现森另算法?