GNU bug report logs - #17578
cp(1) man page: behavior of "cp -R dir target" on symbolic links is unclear

Previous Next

Package: coreutils;

Reported by: Vincent Lefevre <vincent <at> vinc17.net>

Date: Sat, 24 May 2014 15:08:02 UTC

Severity: normal

Tags: wontfix

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vincent Lefevre <vincent <at> vinc17.net>
To: bug-coreutils <at> gnu.org
Subject: cp(1) man page: behavior of "cp -R dir target" on symbolic links is
 unclear
Date: Sat, 24 May 2014 17:07:05 +0200
The cp(1) man page does not describe the behavior on symbolic links
when copying recursively. It appears that in such a case, cp does not
dereference the links (this is also what the info file says: "When
copying from a symbolic link, `cp' normally follows the link only
when not copying recursively."). Tested with cp (GNU coreutils) 8.21
on Debian/unstable.

As the usual behavior of utilities on symbolic links is to follow the
links, this may be surprising to the user who only reads the man page
(even if he knows POSIX, as POSIX doesn't specify the behavior if
only -R is used).

So, the man page should say that by default (e.g. without -H, -L, -P),
cp follows source symbolic links only when not copying recursively.

-- 
Vincent Lefèvre <vincent <at> vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




This bug report was last modified 11 years and 62 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.