33

How do I silently extract files, without displaying status?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Adedoyin Akande
  • 471
  • 1
  • 5
  • 10

4 Answers4

51

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.
Ipor Sircer
  • 14,376
  • 1
  • 27
  • 34
10

From the unzip man page:

-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 -qq yourfile.zip it is.

Artemis
  • 231
  • 1
  • 5
2

PHP has an extension for that

http://php.net/manual/en/book.zip.php

<?php
$zip = new ZipArchive;
if ($zip->open('test.zip') === TRUE) {
    $zip->extractTo('/my/destination/dir/');
    $zip->close();
    echo 'ok';
} else {
    echo 'failed';
}
?>
Michael D.
  • 2,820
  • 16
  • 24
1

I suggest with this is using gunzip command

gunzip /path/to/file/filename.z

this will also output silently

vip_noob
  • 37
  • 3