Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4831  / 1 Year ago, sat, may 13, 2023, 3:30:18

I have a folder ExampleFolder which contains many zipped folders. These zipped folders also contains multiple zipped folders. How to go through ExampleFolder and extract all of its zipped folders recursively?



Note that ExampleFolder itself, is not zipped, it's just a normal folder



Okay now I know what's happening Rinzwind and nux answers are both correct (except that I have to keep pressing Y or A forever)



But it's seems that some of the zipped files, contained zipped files and rar files as well, the rar files will not be extracted by



while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]; do find -type f -name "*.zip" -exec unzip -- '{}' ; -exec rm -- '{}' ;; done 


or whatever



Edit 2 Some files are named .r00 and r01, .r02 up to r14, they are rar files, but not .rar


More From » tar

 Answers
3

You can use this command , it will recursively unzip all files in your current directory .



Note This will delete original zipped files , but If you want to leave original files , delete -exec rm -- '{}' ; code .



Command :



while [ "`find . -type f -name '*.zip' | wc -l`" -gt 0 ]; do find -type f -name "*.zip" -exec unzip -- '{}' ; -exec rm -- '{}' ;; done 

[#25015] Monday, May 15, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fectlyole

Total Points: 64
Total Questions: 110
Total Answers: 110

Location: Nicaragua
Member since Thu, Feb 3, 2022
2 Years ago
fectlyole questions
Sun, May 8, 22, 02:54, 2 Years ago
Mon, Jun 21, 21, 16:56, 3 Years ago
Fri, Jul 9, 21, 17:44, 3 Years ago
;