Re: Problem with updating an archive (Option -u )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ingo Lantschner wrote:

On Wed, 31 Dec 2003, Cameron Simpson wrote:



RTFM. The info file for tar says:

`--update' `-u' Adds files to the end of the archive, but only if they
are newer than their counterparts already in the archive, or if they do
not already exist in the archive. see "update".



Believe me, I read this manual several times and I fully understand the above. I even reproduced exactly this behavior of tar. (See my second example in my original mail).


BUT "tar -uvf home.tar ~" adds each time ALL files in ~ to home.tar - NOT
only the ones which have changed or which are new. So in fact the size of
home.tar is doubled with the second time I call "tar -u home.tar ~", even
if just 1% of the files in ~ have changed.



I think it's a bug, but it's a function of the leading "/" on the path name. I have a little direcory in /tmp and if I do this:


   $ cd /
   $ tar vuf /tmp/test1.tar tmp/test
   <files added>
   $ tar vuf /tmp/test1.tar tmp/test
   <nothing added>

but

   $ tar vuf /tmp/test2.tar /tmp/test
   tar: Removing leading `/' from member names
   <files added>
   $ tar vuf /tmp/test2.tar /tmp/test
   tar: Removing leading `/' from member names
   <files added again>

If I add the "P" flag it's just fine (assuming you want the leading "/" on the path name) I haven't tried it to see if you get the same problem with incremental (-G or -g) operations.

jch

jch



-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux