linux的解压zip文件,Linux解压zip文件命令
Post Views:
98
1. 前言
通常情况下,Linux系统并不会产生zip文件,而是由用户把zip文件上传到Linux系统中,产生解压的需求。
2. 安装zip解压工具unzip
以CentOS7.5最小化安装为例,系统并没有集成unzip工具,需要额外安装
[root@zcwyou ~]# yum -y install unzip
看到以下输出即代表安装成功。
Running transaction
Installing : unzip-6.0-19.el7.x86_64 1/1
Verifying : unzip-6.0-19.el7.x86_64 1/1
Installed:
unzip.x86_64 0:6.0-19.el7
Complete!
先查看一下压缩文件 3. 解压文件
先查看一下压缩文件
[root@zcwyou zip]# ll *.zip
查询结果如下
total 4
-rw-r--r--. 1 root root 3032 Dec 4 17:14 zcwyou.zip
解压这个zcwyou.zip文件
[root@zcwyou zip]# unzip zcwyou.zip
执行过程如下:
Archive: test.zip
inflating: 333.txt
extracting: abc.txt
inflating: cisco1.txt
inflating: cisco2.txt
extracting: compress.txt
extracting: cp1.txt
extracting: cp2.txt
inflating: cut2.txt
extracting: cut.txt
extracting: diff1.txt
extracting: diff2.txt
creating: dir123/
extracting: hard123.txt
extracting: hard.txt
extracting: linux123.txt
extracting: soft.txt
extracting: test.txt
可以看到,unzip程序创建了一个目录dir123/,并且解压了一些文件。目录dir123是压缩文件里的一个目录。
检查:
[root@zcwyou zip]# ll
total 40
-rw-r--r--. 1 root root 315 Nov 27 16:15 333.txt
-rw-r--r--. 1 root root 9 Nov 21 11:39 abc.txt
-rw-r--r--. 1 root root 173 Oct 13 15:24 cisco1.txt
-rw-r--r--. 1 root root 179 Oct 13 15:24 cisco2.txt
-rw-r--r--. 1 root root 0 Oct 12 14:40 compress.txt
-rw-r--r--. 1 root root 0 Oct 11 10:23 cp1.txt
-rw-r--r--. 1 root root 0 Oct 11 10:23 cp2.txt
-rw-r--r--. 1 root root 57 Oct 12 13:45 cut2.txt
-rw-r--r--. 1 root root 50 Oct 12 11:59 cut.txt
-rw-r--r--. 1 root root 9 Oct 13 14:59 diff1.txt
-rw-r--r--. 1 root root 18 Oct 13 15:00 diff2.txt
drwxr-xr-x. 2 root root 6 Dec 4 17:06 dir123
-rw-r--r--. 1 root root 0 Nov 26 17:47 hard123.txt
-rw-r--r--. 1 root root 0 Nov 26 17:47 hard.txt
-rw-r--r--. 1 root root 0 Nov 29 17:25 linux123.txt
-rw-r--r--. 1 root root 0 Nov 26 17:47 soft.txt
-rw-r--r--. 1 root root 10 Nov 19 13:33 test.txt
-rw-r--r--. 1 root root 3032 Dec 4 17:14 zcwyou.zip
发现zcwyou.zip里的文件已经被全部解压出来了,并且保留了源文件zcwyou.zip。
解压其它例子
linux的解压zip文件,Linux解压zip文件命令相关推荐
- linux下 zip解压 tar解压 gz解压 bz2等各种解压文件命令
大致总结了一下linux下各种格式的压缩包的压缩.解压方法.但是部分方法我没有用到,也就不全,希望大家帮我补充,我将随时修改完善,谢谢! .tar 解包:tar xvf FileName.tar 打包 ...
- linux解压文件名乱码,linux下解压zip文件时,文件名乱码的解决(转载)
转自:http://blog.sina.com.cn/s/blog_6261f8690101c1gx.html windows下的zip文件,在linux下解压时,经常会出现文件名乱码的情况. 主要原 ...
- linux jar和zip,Linux命令———zip和jar文件压缩解压
Linux命令---zip和jar文件压缩解压 (1)ubuntu 使用unzip和zip压缩文件 1.功能作用:解压缩zip文件 2.位置:/usr/bin/unzip 3.格式用法:unzip [ ...
- linux中.sql.gz文件解压,linux下tar.gz、tar、bz2、zip等解压缩、压缩命令小结
本文介绍了linux下的压缩程式tar.gzip.gunzip.bzip2.bunzip2.compress .uncompress. zip. unzip.rar.unrar等程式,以及如何使用它们 ...
- linux解压7z文件,Linux 下压缩与解压.zip和.rar及.7z文件
对于Window下的常见压缩文件.zip和.rar,Linux也有相应的方法来解压它们: 1)对于.zip linux下提供了zip和unzip程序,zip是压缩程序,unzip是解压程序.它们的参数 ...
- Linux:文件压缩解压gz、tar.gz、tar.xz、tar.bz2、tgz、zip
目录 tar.tar.gz.tar.xz.tar.bz2.tgz gz zip tar.tar.gz.tar.xz.tar.bz2.tgz 1.压缩 tar -zcvf 压缩文件名.tar.gz 被压 ...
- linux解压7z文件,Linux下解压.zip.7z和.rar文件
1)对于.zip linux下提供了zip和unzip程序,zip是压缩程序,unzip是解压程序.它们的参数选项很多,可用命令zip -help和unzip -help查看,这里只做简单介绍,举例说 ...
- linux看zip的目录结构,无需解压如何查看一个归档或压缩文件的内容
在本教程中,我们将学习如何在类 Unix 系统中查看一个归档或者压缩文件的内容而无需实际解压它.在深入之前,让我们先厘清归档和压缩文件的概念,它们之间有显著不同.归档是将多个文件或者目录归并到一个文件 ...
- 如何解压服务器系统,如何解压Linux系统下的zip文件
如何解压Linux系统下的zip文件 发布时间:2020-08-10 09:28:56 来源:亿速云 阅读:76 作者:Leah 这期内容当中小编将会给大家带来有关如何解压Linux系统下的zip文件 ...
- linux 下tar怎样解压zip文件,linux下 zip解压 tar解压 gz解压 bz2等各种解压文件命令(示例代码)...
简介这篇文章主要介绍了linux下 zip解压 tar解压 gz解压 bz2等各种解压文件命令(示例代码)以及相关的经验技巧,文章约6037字,浏览量504,点赞数7,值得推荐! .tar 解包:ta ...
最新文章
- [软考]信息系统项目管理师考试大纲
- 如何用计算机弹出ink sans,INKSANS模拟器PC
- 上周热点回顾(10.1-10.7)
- 嵌入式设备web服务器比较
- 「数据库系列四」分布式数据库CAP理论与最终一致性
- 整车厂核心制造系统及数据流
- 堆积密度怎么做_长尾关键词怎么优化?这样布局关键词排名效率高
- Sharding-Proxy安装_以及_sharding-proxy自动分表配置_Sharding-Sphere,Sharding-JDBC分布式_分库分表工作笔记019
- SAP License:SAP记账码
- springcloud21---Config-bus实现配置自动刷新
- mysql 队列表设计_mysql主从同步操作,及队列设计
- laravel项目安装与重要目录文件说明(一)
- 编写iPhone应用程序有何不同
- 跨域小结(为什么form表单提交没有跨域问题,但ajax提交有跨域问题)
- linux 深度美化,deepin15(Linux) 美化终端 安装zsh+oh-my-zsh及其配置和插件
- xp系统粘贴是灰色的_XP系统无法复制粘贴要怎么解决?
- ZIPF分布、PARETO分布和幂律分布
- ssm框架整合以及登录案例
- “21 天好习惯”第一期-2 2021牛客暑期多校训练营10 F、Train Wreck
- html怎么改默认浏览器,怎样设置默认浏览器?3种更改默认浏览器方法介绍