简体   繁体   English

如何解压缩子目录中的所有文件?

[英]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.

相关问题 如何gzip bash所有子目录下的所有文件 - How to gzip all files in all sub-directories in bash 如何在不chmod文件夹的情况下chmod子目录中的所有文件? - How to chmod all files in sub-directories without chmod the folders? 如何将所有子目录中的所有文件gzip压缩为bash中的一个压缩文件 - How to gzip all files in all sub-directories into one compressed file in bash 删除除一个以外的所有子目录和文件 - Remove all sub-directories and files except for one 如何使用 PowerShell 递归搜索目录和子目录中的所有文件? - How to recursively search all files in a directory and sub-directories using PowerShell? 如何在Linux中的目录及其子目录中的所有文件中为包含字符串“000”的行添加前缀“#”? - How to add a prefix “#” to lines that contain string “000” in all files in a directory and its sub-directories in linux? 如何重命名包含在多个子目录中的多个文件 - How to rename multiple files, contained in multiple sub-directories 如何在Linux中的所有子目录上强制CURRENT目录权限? - How to force CURRENT directory permissions on all sub-directories in Linux? 如何使用 grep 提取目录和子目录中所有文件中包含的所有 IP 地址? - How can I use grep to extract all IP addresses contained in all the files within a directory and sub-directories? 将目录中的文件分配给子目录 - assigning files in a directory to sub-directories
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM