79

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 02b852e3571e46f25fdfc79f43ceb726ddff9ba7 inflating: .editorconfig inflating: .gitattributes bash> 

Here is what I want:

bash> unzip <something to silence zip> MyArchive.zip bash> 
4
  • 4
    man unzip is your friend (works for more or less all commands you can run in Terminal) Commented Mar 28, 2017 at 5:48
  • 3
    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. Commented Mar 30, 2017 at 16:07
  • It takes some time tontet used to it, but things like command line options are easy to be found there. Commented Mar 30, 2017 at 18:37
  • 3
    Asking here is a lot more effort than using man command. But googling and jumping to the best answer after this has been asked is easier than using man. So bless this guy for asking. Commented Jun 8, 2019 at 20:17

2 Answers 2

134

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

unzip -qq filename 
1
  • 2
    A link to the manual with a quote of the relevant part would be great Commented Aug 27, 2023 at 8:02
7

If you don’t want to see the output from your terminal commands then you can redirect both standard output 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.