Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Nov 17 '10 at 0:01

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.