Linux unzip解压多个文件

news/2024/7/6 3:10:01 标签: linux, zip, unzip, 解压缩, 多个文件

假设当前目录下有多个zip文件
data.zip invoices.zip pictures.zip visit.zip
直接
unzip *.zip
等价于
unzip data.zip invoices.zip pictures.zip
会报错

Archive: data.zip
caution: filename not matched: invoices.zip
caution: filename not matched: pictures.zip
caution: filename not matched: visit.zip

因为会认为后面三个zip文件是在第一个zip文件里面的,因此需要
unzip '*.zip'
或者
unzip "*.zip"
或者
unzip \*.zip
来屏蔽掉linux的通配符(man可以看到Be sure to quote any character that might otherwise be interpreted or modified by the operating system, particularly under Unix and VMS.
或者
for z in *.zip; do unzip $z; done


refer:
1. https://www.cyberciti.biz/faq/linux-unix-shell-unzipping-many-zip-files/
2. https://askubuntu.com/questions/564607/unzip-multiple-files


http://www.niftyadmin.cn/n/1091493.html

相关文章

linux svn 身份认证,Linux配置svn+apache+ssl+radius身份认证

单位最近要上个新项目,要给项目组弄个SVN服务器,原来没弄过,那就边研究边摸索着来吧,废话不多说,下面直接开始【环境】Centos6.4 X86_64 minimum,iptables,selinux已关闭,所需软件包采取yum安装…

C字符串复制

void mystrcpy(char *from, char *to) {for(; *from ! \0; from, to){*to *from;}*to \0;return ; }void main() {char str1[]"abcd1234";char str2[100]{0};mystrcpy(str1, str2);printf("%s\n", str2); }输出: abcd1234转载于:https://www…

linux git diff 显示,linux – 实时git diff

我通常喜欢在查看git diff时键入我的git commit消息.我非常喜欢this little perl add-on to git产生的输出,并从git diff产生看起来像这样的输出(这是git log -p的截图,但你明白了:由于它如何突出显示已更改的线条的相应部分,因此很容易看出发生了哪些变化.只是想分…

[python]自问自答:python -m参数?

作者:削微寒 出处:http://www.cnblogs.com/xueweihan/

Spring4总结

1. 明确Spring的主要作用就是为代码“解耦”,降低代码间的耦合度。使用IoC使得主业务在相互调用过程中,不用再自己维护关系了,即不用再自己创建要使用的对象了,而是由Spring容器统一管理,自动“注入”;使用…

凑成整数x----二进制枚举

给n个数&#xff0c;给定x。 用这n个数求和凑成x&#xff0c;问有多少种凑法。 #include<bits/stdc.h> using namespace std; int main() {int n,x;cin>>n>>x;int a[25];for(int i0;i<n;i) cin>>a[i];int ans0;for(int i0;i<(1<<n);i){int…

Jupyter notebook can not load module

环境 ubuntu16.04 64 bitanaconda 4.4.0 安装了pytorch&#xff0c;设置了conda环境变量 conda create -n pytorch 启动jupyter notebook 运行发现不能加载torch 解决方案 refer https://stackoverflow.com/questions/33960051/unable-to-import-a-module-from-python-…

Remote Access to IPython Notebooks via SSH

原作者&#xff1a;Nikolaus 链接&#xff1a;https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh