linux 压缩命令 zip
2023-09-14 09:12:11 时间
1.zip命令
例如:zip -r mysql.zip mysql 该句命令的含义是:将mysql文件夹压缩成mysql.zip
zip -r abcdef.zip abc def.txt 这句命令的意思是将文件夹abc和文件def.txt压缩成一个压缩包abcdef.zip
2.unzip命令
与zip命令相反,这是解压命令,用起来很简单。 如:unzip mysql.zip 在当前目录下直接解压mysql.zip。
[root@localhost test]# ls a.txt mysql [root@localhost test]# zip mysql.zip mysql adding: mysql/ (stored 0%) [root@localhost test]# ls a.txt mysql mysql.zip [root@localhost test]# rm -rf mysql [root@localhost test]# ls a.txt mysql.zip [root@localhost test]# unzip mysql.zip Archive: mysql.zip creating: mysql/ [root@localhost test]# ls a.txt mysql mysql.zip [root@localhost test]#
[root@localhost test]# ls a.txt mysql mysql.zip [root@localhost test]# rm -rf mysql.zip [root@localhost test]# ls a.txt mysql [root@localhost test]# zip -r a.txt mysql/ zip warning: missing end signature--probably not a zip file (did you zip warning: remember to use binary mode when you transferred it?) zip warning: (if you are trying to read a damaged archive try -F) zip error: Zip file structure invalid (a.txt) [root@localhost test]# zip -r test.zip a.txt mysql/ adding: a.txt (stored 0%) adding: mysql/ (stored 0%) [root@localhost test]# ls a.txt mysql test.zip [root@localhost test]# rm -rf a.txt mysql/ [root@localhost test]# ls test.zip [root@localhost test]# unzip test.zip Archive: test.zip extracting: a.txt creating: mysql/ [root@localhost test]# ls a.txt mysql test.zip [root@localhost test]#
相关文章
- [Linux] linux awk命令详解
- Linux zip
- 【学习总结】快速上手Linux玩转典型应用-第2章-linux简介
- linux zip命令打包压缩文件目录
- Mac和Linux安装selenium+phantomjs+chromedriver
- L85.linux命令每日一练 -- 第12章 Linux系统常用内置命令(一)
- L83.linux命令每日一练 -- 第11章 Linux系统管理命令 -- ipcs和ipcrm
- L80.linux命令每日一练 -- 第11章 Linux系统管理命令 -- ntsysv和setup
- L69.linux命令每日一练 -- 第十章 Linux网络管理命令 -- arpping和telnet
- L66.linux命令每日一练 -- 第十章 Linux网络管理命令 -- arp和ip
- L64.linux命令每日一练 -- 第十章 Linux网络管理命令 -- ifconfig和ifup
- L61.linux命令每日一练 -- 第九章 Linux进程管理命令 -- renice和nohup
- L60.linux命令每日一练 -- 第九章 Linux进程管理命令 -- top和nice
- L58.linux命令每日一练 -- 第九章 Linux进程管理命令 -- pgrep和kill
- L57.linux命令每日一练 -- 第九章 Linux进程管理命令 -- ps和pstree
- L54.linux命令每日一练 -- 第八章 Linux磁盘与文件系统管理命令 -- umount和df
- L52.linux命令每日一练 -- 第八章 Linux磁盘与文件系统管理命令 -- resize2fs和fsck
- L50.linux命令每日一练 -- 第八章 Linux磁盘与文件系统管理命令 -- tune2fs和parted
- L45.linux命令每日一练 -- 第七章 Linux用户管理及用户信息查询命令 -- sudo和id
- L42.linux命令每日一练 -- 第七章 Linux用户管理及用户信息查询命令 -- groupdel和passwd
- L36.linux命令每日一练 -- 第五章 Linux信息显示与搜索文件命令 -- locate和updatedb
- L2.linux命令每日一练 -- 第一章 Linux命令行简介
- linux下常用压缩命令 tar压缩Linux解压 压缩Linux压缩Ubuntu压缩centos压缩解压gz txt.gz
- ZYNQ - 嵌入式Linux开发 -08- linux应用程序开发
- 使用wget批量下载geo数据集的全部文件 linux下载geo数据 geo处理的数据不是下载原始数据 Linux如何下载ftp文件 geo ftp geo ftp下载 geo下载