Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using tar+gzip 1

Status
Not open for further replies.

omegabetax

Technical User
Jun 20, 2006
54
RO

Can tell me someone why it's necessary to use tar command then gzip to compress a file.
Why not only gzip then simply gunzip ?

Thanks
 
You don't need to use tar if you're only compressing one file. But if you want to compress several files into one, you have to first use tar to create an archive of the files, then compress the archive.
 
It can can compress many files at once, but they'll be individual zipped files in the end.

If you have file1,file2 and file3, then "gzip file?" would yield file1.gz, file2.gz and file3.gz.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top