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

Status
Not open for further replies.

jestrada101

Technical User
Mar 28, 2003
332
Is there a way I can move a set of files, tar them and compress them into another directory?

 
The GNU tar can create compressed archives (.tgz) with the -cz options.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Is there a way to move files and compress them without manually deleting the files?

for example... if I tar a set of files, the same files still exist... with the additional tar.. I know I could write a shell script to come in and delete files... etc.. etc... but I was wondering if there's a way to tar them and get rid of them at the same time...

thanks!
 
GNU tar have the following option:
--remove-files remove files after adding them to the archive

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Typing "man tar" or "info tar" would be a faster way to get an answer to a question like this. If your version of tar supports --remove-files or something similar, you'll see it in there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top