GNU bug report logs - #23120
cp with --dereference (-L) and --link (-l) or --symbolic-link (-s)

Previous Next

Package: coreutils;

Reported by: Petr Skočík <pskocik <at> gmail.com>

Date: Sat, 26 Mar 2016 13:55:01 UTC

Severity: normal

Tags: fixed

Merged with 15173

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Petr Skočík <pskocik <at> gmail.com>
To: 23120 <at> debbugs.gnu.org
Subject: bug#23120: cp with --dereference (-L) and --link (-l) or --symbolic-link (-s)
Date: Sat, 26 Mar 2016 11:36:15 +0100
Hi,

I'm on a system with cp 8.21, and when I do `cp -Ll` or `cp -Ls` on a
symlink, it hardlinks (-Ll) or symlinks (-Ls) the symlink instead of the
target of the symlink.

It behaves the same on single files and trees (with `-r`).

I think the logical thing to do would be for to `cp` to symlink or
hardlink the symlink target in these cases.

What do you think?

Best regards,
Petr.

(
My particular use case is that I'd like to turn a part of an augmented
tree of symlinks (created with `cp -s` + additional file creation on top
of that) into a tree of hardlinks to the sources.
)





This bug report was last modified 6 years and 205 days ago.

Previous Next


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