5

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.

1

1 Answer 1

8

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
3
  • 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, 2019 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? Oct 20, 2019 at 19:40
  • 2
    @Jim6834 If you want something that works with practically anything: your command 2>/dev/null. Oct 21, 2019 at 12:13

You must log in to answer this question.

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