zip:打包和压缩文件
简介zip压缩格式是很多计算机平台通用的压缩格式。和gzip命令相比,zip命令压缩不仅不会删除源文件,而且还可以压缩目录
说明
zip压缩格式是很多计算机平台通用的压缩格式。和gzip命令相比,zip命令压缩不仅不会删除源文件,而且还可以压缩目录
格式
zip [option] [file]
常用参数
- -r:将指定目录下的所有文件和子目录一并压缩
- -x:压缩文件时排除某个文件
- -q:不显示压缩信息
示例
1、压缩文件
[root@localhost test]# cp /etc/services .
[root@localhost test]# ll -h services
-rw-r--r--. 1 root root 655K May 14 15:33 services
[root@localhost test]# zip services.zip ./services
adding: services (deflated 80%)
[root@localhost test]# ll -h services*
-rw-r--r--. 1 root root 655K May 14 15:33 services
-rw-r--r--. 1 root root 134K May 14 15:34 services.zip
2、压缩目录
[root@localhost ~]# zip test.zip ./test #不加-r参数将只会压缩目录这个额一个文件,所以这样使用不对
updating: test/ (stored 0%)
[root@localhost ~]# zip -r test.zip ./test #-r参数
adding: test/ (stored 0%)
adding: test/test_01.txt (stored 0%)
adding: test/test_02.txt (stored 0%)
adding: test/test_03.txt (stored 0%)
adding: test/test_04.txt (stored 0%)
adding: test/test_05.txt (stored 0%)
adding: test/test_06.txt (stored 0%)
adding: test/test_07.txt (stored 0%)
adding: test/test_08.txt (stored 0%)
adding: test/test_09.txt (stored 0%)
adding: test/test_10.txt (stored 0%)
adding: test/test_11.txt (stored 0%)
adding: test/test_12.txt (stored 0%)
adding: test/test.txt (stored 0%)
adding: test/services (deflated 80%)
adding: test/services.zip (stored 0%)
3、排除压缩文件
[root@localhost ~]# zip -r test.zip ./test -x test/services.zip test/services
updating: test/ (stored 0%)
updating: test/test_01.txt (stored 0%)
updating: test/test_02.txt (stored 0%)
updating: test/test_03.txt (stored 0%)
updating: test/test_04.txt (stored 0%)
updating: test/test_05.txt (stored 0%)
updating: test/test_06.txt (stored 0%)
updating: test/test_07.txt (stored 0%)
updating: test/test_08.txt (stored 0%)
updating: test/test_09.txt (stored 0%)
updating: test/test_10.txt (stored 0%)
updating: test/test_11.txt (stored 0%)
updating: test/test_12.txt (stored 0%)
updating: test/test.txt (stored 0%)
快速生成表格
apiDoc是一款可以有源代码中的注释直接自动生成api接口文档的工具,它几乎支持目前主流的所有风格的注释。例如:
Javadoc风格注释(可以在C#, Go, Dart, Java, JavaScript, PHP, TypeScript等语言中使用)
CFSSL是CloudFlare开源的一款PKI/TLS工具。 CFSSL 包含一个命令行工具 和一个用于 签名,验证并且捆绑TLS证书的 HTTP API 服务。 使用Go语言编写。
zip压缩格式是很多计算机平台通用的压缩格式。和gzip命令相比,zip命令压缩不仅不会删除源文件,而且还可以压缩目录
在公司内部多项目并行的时候,每次开启要给项目就需要申请一个域名,并且每个域名就需要支持HTTPS,所以前面我们已经用过Certbot生成证书,那么本文我们主要记录Certbot生成泛域名证书。
Electron页面跳转、浏览器打开链接和打开新窗口
在使用Git的过程中,不想每次都输入用户名和密码去拉取代码,所以就需要保存这些信息,那么既然有保存了,就必须有清除功能。
Docker编译镜像出现:fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.12/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.2c4ac24e.tar.gz: No such file or directory问题
在Mac电脑中,如何对Git的用户名和密码进行修改呢?起初不懂Mac,所以整了很久,本文将记录如何对这个进行操作,以便后期使用。