Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unzip files in folders automatically [mac os x] [closed]

Tags:

terminal

unzip

I have a folder on my desktop that has around 2500 folders in it, each folder has multiple files in them that are zipped, I can unzip them by manually clicking on them, is there a way to do this automatically through terminal?

like image 260
d12n Avatar asked Apr 03 '13 13:04

d12n


People also ask

Does Mac unzip files automatically?

Safari on the Mac may automatically "unpack" or "unzip" these types of files. If that is the case, you'll want to change your Safari preferences so that it does not automatically unzip the exported file: In Safari, click the Safari menu at the top. Select Preferences.

Why will my Mac not open zip files?

If it won't open with a double-click, it may be corrupted, but you can also try Stuffit Expander and/or The Unarchiver in case it's a non-standard zip. If they can't open it, the problem is with the zip file. Try downloading again.

Where did my zip file go Mac?

zip' was extracted to create a folder called 'Archive' which contains the contents of the origin zip file. The built in Archive Utility tool in Mac OS will open the zip archive and extract the file(s), typically they are placed within a folder of the same name of the zip archive, minus the . zip file extension.


2 Answers

find ./ -name \*.zip -exec unzip {} \; maybe?

like image 55
Jorge Núñez Avatar answered Oct 07 '22 16:10

Jorge Núñez


you can try the unzip command, but i think it only works with zip/tar files.

http://www.lifewithtech.net/apple/tip-unzip-multiple-files-into-a-single-directory-in-mac-osx/

http://magma.maths.usyd.edu.au/magma/faq/extract

or if you have the app The Unarchiver:

you can use the open command.

cd to your folder and use:

$ open */*.rar

this should extract all rar files in all sub-folders, according to your Unarchiver setup into a new folder or in the same folder.

Hope this helps.

like image 33
CML Avatar answered Oct 07 '22 17:10

CML