4

I unzipped a file from a script with "unzip filename.zip" and in the terminal I see all the unzipped file names. I would like to unzip the file without printing those names so that I have a clean terminal interface.

6

From the MODIFIERS section of man unzip:

-q     perform  operations  quietly  (-qq  = even quieter).  Ordinarily
       unzip prints the names of the files it's extracting or  testing,
       the extraction methods, any file or zipfile comments that may be
       stored in the archive, and possibly a summary when finished with
       each  archive.   The -q[q] options suppress the printing of some
       or all of these messages.

So

unzip -q filename.zip
  • Does that work also with move and copy? When I moved my files to another directories it displayed the whole process in the terminal just like it did with zip – Jim6834 Oct 20 at 19:20
  • 3
    @Jim6834 are you referring to the standard mv and cp commands? if so, then AFAIK they don't report successful operations by default (they use -v to increase the verbosity, rather than -q to decrease it). Or are you moving/copying files some other way? – steeldriver Oct 20 at 19:40
  • 1
    @Jim6834 If you want something that works with practically anything: your command 2>/dev/null. – Giacomo Alzetta Oct 21 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.