I have a lot of Zip archives that I want to unpack in a script. Is there any way to run them silently?

Here is what I have:

bash> unzip  02b852e3571e46f25fdfc79f43ceb726ddff9ba7.zip 
Archive:  02b852e3571e46f25fdfc79f43ceb726ddff9ba7.zip
  inflating: .editorconfig           
  inflating: .gitattributes      

Here is what I want:

bash> unzip <something to silence zip> MyArchive.zip      
  • 3
    man unzip is your friend (works for more or less all commands you can run in Terminal) – nohillside Mar 28 '17 at 5:48
  • I know about man but I believe most people will agree it is difficult to find what you want looking through man pages. I think it was faster and easier to ask here. – Whitecat Mar 30 '17 at 16:07
  • It takes some time tontet used to it, but things like command line options are easy to be found there. – nohillside Mar 30 '17 at 18:37

As stated in the manual, -q (quiet) or -qq (even quieter).

unzip -qq filename

If you don’t want to see the output from your terminal commands then you can redirect both standard out and standard error to /dev/null by adding '> /dev/null 2>&1’ to the end of your command. Of course this can hide errors, so you might want to redirect it to a file instead, depending on your use case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .