bug-tar
[Top][All Lists]
Advanced

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

Re: [Bug-tar] keep newer files bug?


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] keep newer files bug?
Date: Wed, 25 May 2005 15:58:40 +0300

Helmut Waitzmann <address@hidden> wrote:

> So it's impossible to let
> $ tar --keep-newer-files -x ...
> overwrite old files rather than unlink and recreate them?  

Yes, it is impossible.

> This is what I hoped,
> $ --overwrite --keep-newer-files -x ...
> would do.

To summarize: the three options --keep-newer-files, --overwrite and
--unlink-first control the behavior of tar when extracting archive
member over *existing* files. Their effect is as follows:

   --keep-newer-files     If the file on the filesystem is newer than
                          its archive version, preserve the filesystem
                          version. Otherwise, unlink it and replace with
                          the archive version.
   --overwrite            No matter what the file timestamp is, replace
                          it with the archive version. Notice, that
                          replacing means unlinking old file and
                          creating a new one in its stead.
   --unlink-first         Same as --overwrite, the only difference being
                          that --unlink-first tries to unlink file
                          before opening (even if it does not exist),
                          while --overwrite unlinks it only after
                          opening it returns EEXIST.

Regards,
Sergey                    




reply via email to

[Prev in Thread] Current Thread [Next in Thread]