Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Kindly provide command line in UNIX to zip & uzip a file gzip & uncompress gzip a file tar & untar a file kindly specify which is more suitable in best mode of compression .

share|improve this question

migrated from Nov 17 '10 at 0:01

This question came from our site for professional and enthusiast programmers.

SO is not the manpage, so please look up the complete syntax yourself.

Please note that tar is used to put multiple files (with a directory structure) into one file. It does not compress at all. The usual compression in UNIX is gzip or one of its successors. Zip is seldom used. They are probably similar in compression ratio.

As a reference, here the most common commands:

Compress: tar czf tarfile file1 file2 ... (c: compress, z: use gzip, f: write to file) Uncompress: tar xzf tarfile (x: extract, z: use gzip, f: read from file)

To use bzip2 instead of gzip use j instead of z.

share|improve this answer

You must log in to answer this question.