How to add 1 file in .tar.gz file IN just ONE straight command line RHEL?
Hi Guys,
I know adding 1 file in tar.gz file.
Supposed we have a.txt(a.tar.gz) and b.txt(need to add) file.
The tar and zipped filename is "a.tar.gz" file.
So here's the procedure.
1. gunzip a.tar.gz
output: a.tar
2. tar -rf a.tar b.txt
output: a.tar (change in size)
3. gzip a.tar
That's it!
BUT WHAT I WANT TO ACHIEVED IS how can I run that command in one straight line?
Thank you very much.
Last edited by RMLinux; 06-20-2013 at 02:05 AM.
|