I am creating a tar file and then I am gzipping the tar file. So I am getting a .tgz file and now I want to delete the previous tar file.
${gzipExe} -f --rsyncable $tarname.TAR --stdout >> $tarname.TGZ
|
show 7 more comments
feedback
|
This question came from our site for professional and enthusiast programmers.
|
I usually zip the file at the same time by using the 'z' parameter with the tar command:
The above command creates a new archive file called allmyfiles.tar.gz that contains all the files in the current folder, and zips it. Otherwise, just delete the .tar file with the next command:
Note that .tar.gz is more commonly used than .tgz. | |||
|
feedback
|
|
You have a couple of options. Assuming you need that
REM I think you are on Windows so... set GZIP=--rsyncable tar czf file.tar.gz files
tar c files | gzip --rsyncable > file.tar.gz
tar -cf file.tar files gzip -f --rsyncable file.tar If you simply run Also note that using | |||||||
feedback
|
gzip filedoesn't leave the original file. – jemfinch Apr 6 '10 at 20:38<and>or are your just passing the filename to gzip? – Alexandre Jasmin Apr 6 '10 at 21:00