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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar and gzip question 1

Status
Not open for further replies.

apocalypse11

Technical User
Jan 11, 2001
77
AU
Hi everyone,

I know how to tar a dir and then gzip it... how do i do it all at once?

#tar cf <tarfilename> <directorytobe tar'ed>
#gzip <tar'ed directory>

Thanks..
 
The gnutar has a -z option just for that purpose.
If you don't have gnutar then you may try this:
tar cf - <directorytobe tar'ed> | gzip -c > tarfilename.tgz

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top