0

I have literally thousands of archives containing Amiga adf files that I've downloaded and want to unpack them all.

Can someone please tell me the command line i need to use in terminal in order to extract multiple archives (mostly zips but some rars and i think gzips maybe) that are in multiple sub folders please?

I want to make sure all files including hidden and system files are extracted (i read somewhere that unzip can't process system files or hidden files or something like that - is that correct?).

I'd like the extracted files to be placed into folders (along side the archive they have come from) named after the archives (they don't necessarily get named after the archives name when i double click them).

I also want the archives removed to the trash once they are successfully unpacked.

I did find this command but it needs improving:

Cd to root of folders then

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

  • The command you found is [flawed](https://superuser.com/q/1217773/432690) but after adding quotes it's the right lead. I can improve it but I don't know Mac at all, so help me help you. Does your `find` support `-execdir`? Is there any general-purpose unpacker in your OS (like [`ark`](https://www.systutorials.com/docs/linux/man/1-ark/) in my Kubuntu) that allows us to treat every archive alike instead of calling specified tools? Do you know how to extract to a directory named after the archive for a single archive of each type? Is "trash" a system trash or just a directory named `trash`? – Kamil Maciorowski Mar 04 '20 at 20:30
  • I know it's not an answer to your question, but [Stuffit Expander](https://www.stuffit.com) (freeware) will just let you check a couple of prefs boxes to do all that - then you just drop the entire folder on it. No syntax, no hair-pulling, no cost. – Tetsujin Mar 05 '20 at 08:03
  • Hello. Kamil:I don't know Mac command enough to be able to find out any of the answers to your questions I'm afraid...? – Steve Garratt Mar 07 '20 at 11:33
  • Tetsujin:I tried that app and it worked on one folder but another that had more files in it kept reporting error code -54 and wouldn't work – Steve Garratt Mar 07 '20 at 11:34
  • The command line that i included actually works to find zips and then extract then but it didn't then delete or move the archives, that completed successfully, to the recycle bin. Did anyone know how to amend this to the command line please? – Steve Garratt Mar 11 '20 at 15:20

0 Answers0