Linux unzip file from script without outputting the unzipped file names

7,176

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
Share:
7,176

Related videos on Youtube

Jim6834
Author by

Jim6834

Updated on September 18, 2022

Comments

  • Jim6834
    Jim6834 over 1 year

    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.

    • vaquito
      vaquito over 4 years
      man unzip is your friend.
  • Jim6834
    Jim6834 over 4 years
    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
  • steeldriver
    steeldriver over 4 years
    @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?
  • Giacomo Alzetta
    Giacomo Alzetta over 4 years
    @Jim6834 If you want something that works with practically anything: your command 2>/dev/null.