I'm still not sure about this new partial mirroring behaviour of
cp -au, but I don't know how to avoid it. The attached patch at least
documents the change.

cheers,
Pádraig.
From ba7f97bb50eeb7b06a81e7de6d05c5d72206281d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
Date: Sun, 31 Jul 2011 09:36:41 +0100
Subject: [PATCH] doc: mention the new mirroring behavior of cp -au

* NEWS: Mention the change in behavior.
* doc/coreutils.texi (cp invocation): Likewise.
---
 NEWS               |    3 +++
 doc/coreutils.texi |    6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index 291ce13..5c957c5 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,9 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   chmod, chown and chgrp now output the original attributes in messages,
   when -v or -c specified.
 
+  cp -au (where --preserve=links is implicit) now replaces possibly newer
+  separate files in the destination, to mirror hard links from the source.
+
 ** New features
 
   md5sum accepts the new --strict option.  With --check, it makes the
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index b406a3c..4dfe747 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -7954,8 +7954,10 @@ same or newer modification time.  If time stamps are 
being preserved,
 the comparison is to the source time stamp truncated to the
 resolutions of the destination file system and of the system calls
 used to update time stamps; this avoids duplicate work if several
-@samp{cp -pu} commands are executed with the same source and
-destination.
+@samp{cp -pu} commands are executed with the same source and destination.
+If @option{--preserve=links} is also specified (like with @samp{cp -au}
+for example), that will take precedence, replacing possibly newer
+separate files in the destination to mirror hard links from the source.
 
 @item -v
 @itemx --verbose
-- 
1.7.5.2

Reply via email to