900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > [Linux] unzip命令:解压缩zip格式文件

[Linux] unzip命令:解压缩zip格式文件

时间:2021-09-24 09:02:20

相关推荐

[Linux] unzip命令:解压缩zip格式文件

unzip命令用于解压缩zip格式文件,虽然Linux系统中更多的使用tar命令进行对压缩包的管理工作,但有时也会收到同Windows系统常用的.zip和.rar格式的压缩包文件,unzip格式便派上了用场。直接使用unzip命令解压缩文件后,压缩包内原有的文件会被提取并输出保存到当前工作目录下。

语法格式:unzip [参数] 压缩包

常用参数:

实例参考

将压缩包文件解压到当前工作目录中:

[root@liuzhongwei ~]# unzip latest.zipArchive: latest.zip creating: wordpress/ inflating: wordpress/xmlrpc.phpinflating: wordpress/wp-blog-header.php inflating: wordpress/readme.htmlinflating: wordpress/wp-signup.php inflating: wordpress/index.php………………省略部分输出信息………………

将压缩包文件解压到指定的目录中:

[root@liuzhongwei ~]# unzip latest.zip -d /homeArchive: latest.zip creating: /home/wordpress/ inflating: /home/wordpress/xmlrpc.php inflating: /home/wordpress/wp-blog-header.php inflating: /home/wordpress/readme.html inflating: /home/wordpress/wp-signup.php inflating: /home/wordpress/index.php ………………省略部分输出信息………………

测试压缩包文件是否完整,文件有无损坏:

[root@liuzhongwei ~]# unzip -t latest.zipArchive: latest.zip testing: wordpress/ OK testing: wordpress/xmlrpc.php OK testing: wordpress/wp-blog-header.php OK testing: wordpress/readme.htmlOK testing: wordpress/wp-signup.php OK testing: wordpress/index.php OK………………省略部分输出信息………………

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。