Results 1 to 7 of 7
I've checked out the man pages for unzip, and it doesn't seem to have a recursion flag, to unzip all the files in a directory and subdirectories tree. How do ...
- 02-13-2006 #1Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
Unzip Commands
I've checked out the man pages for unzip, and it doesn't seem to have a recursion flag, to unzip all the files in a directory and subdirectories tree. How do people normally unzip all the zip files located in a large set of subdirectories?
- 02-13-2006 #2
depending on which distro/ de you use, you could use ark,fileroller et al
andySLOMO: acer extensa 5235 2.2ghz,2gb ram 160gb hdd wireless
SPEEDY: homebrew desktop,Amd x2 dualcore,2gb ram,500gb +1tb( 2x500gb) hdd suse 11.3,32mb fibreline
registered linux user #401845
- 02-13-2006 #3Linux Enthusiast
- Join Date
- Aug 2005
- Location
- Hell
- Posts
- 514
how about something like this?
Originally Posted by mwt
Code:find . -name "*.zip" -exec unzip '{}' \;
- 02-14-2006 #4Just Joined!
- Join Date
- Feb 2006
- Posts
- 2
That works almost perfectly, except that all the unzipped files are moved to the current working directory (the default behavior of unzip). I want them to stay in their individual directories, which I assume means using the -d flag. I just don't know how to code that. Help?
Originally Posted by spoon!
- 02-20-2006 #5Banned
- Join Date
- Aug 2004
- Posts
- 15
I just checked my man page
unzip extracts all files by default
- 02-20-2006 #6
Unzip multiple zip-files and recurse to lower directories. Extract each zip to the directory it is in.
Code:for i in `find . -name "*.zip"`; do unzip -d `dirname $i` $i;done;
- 03-16-2009 #7



