[英]How to unzip all files in sub-directories?
I have a folder named data
, inside this folder there are sub-folders, in these sub-folders I have the compressed files. 我有一个名为
data
的文件夹,此文件夹中有子文件夹,在这些子文件夹中,我有压缩文件。
I tried to unzip one file and succeed using: 我试图解压缩一个文件并成功使用:
tar -xvzf file.tgz
Now I want to unzip all files in data
. 现在,我想将
data
所有文件解压缩。 Any hints on this? 有什么提示吗?
I am using Linux. 我正在使用Linux。
find . -maxdepth 2 -name '*.tgz' -exec tar -xvzf {} \;
其他方法在这里: https : //unix.stackexchange.com/questions/50313/how-do-i-perform-an-action-on-all-files-with-a-specific-extension-in-sub-folders
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.