What is the difference between gunzip and unzip? Tried to search but couldn't find anything relevant with this.

  • 7
    There was no need to search something. All you had to do just to open man unzip and then open man gunzip. All differences are there. ;)
    – rush
    Sep 20 '12 at 12:42
  • Or for a concise one-line description, whatis gunzip unzip.
    – jw013
    Sep 20 '12 at 17:20

unzip decompress zip algorithm same *.zip files and gunzip decompress gz algorithm that same *.gz files. If you migrated from windows, You have many compression algorithm in UNIX world such as *.7z , *.gz , *.bz2 and so on. Also you can compress file which already archived with tar command: such as :

tar -zcvf mydir.tar.gz mydir #gz and tar
tar -jcvf mydir.tar.bz2 mydir #bz2 and tar 
tar -Jcvf mydir.tar.xz mydir #xz and tar 
  • 1
    tar -Jcvf mydir.tar.xz mydir #xz and tar
    – vonbrand
    Jan 16 '13 at 10:56
  • tar --use-compress-program=funky-compress cvf mydir.tar.fc mydir #Some other compression
    – vonbrand
    Jan 16 '13 at 10:57
  • Why do you say that 7z is "a compression algorithm in UNIX world"?
    – Pacerier
    Jul 14 '15 at 9:26

They are two different programs to unzip two different types of compressed files:

  • unzip: "list, test and extract compressed files in a ZIP archive" (from the man page). The Zip file format is the most commonly used compression format on Windows machines, the file ending is typically .zip. See the Wikipedia article for more information.
  • gunzip: For a similar file format for single compressed files, much more common in Unix/Linux systems. The file ending is typically .gz. gzip files contain only one compressed file, if compression of a folder-like structure is required, additional tools like tar are used, typically resulting in compressed folders with a line ending .tar.gz or .tgz. This is what Wikipedia has to say about the gzip format and program.

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.