[CentOS] Newbie : Tar question

Truejack

truejack at gmail.com
Thu Oct 20 12:43:09 UTC 2005


How did I overwrite a file to in "tar" file.

For example I have file "backup.tar" in my home directory, which contains
two file "x.sh" and "y.sh"

I made some changes to one of the file "x.sh" and want to update the "
backup.tar"

I use tar -uvf, but this appends at the end of the tar file, but what I want
is replace the file.

The only way, I know of right now is, delete the file by issuing the
following command

tar --delete --file=backup.tar x.sh

and then adding the file again using

tar -uvf backup.tar x.sh

Is there a better way of doing this, on a single command.

Thanks in Advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20051020/05133799/attachment.html>


More information about the CentOS mailing list