GNU bug report logs - #17103
cp: "cp -al" doesn't copy symlinks, tries to link to them

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Wed, 26 Mar 2014 18:09:01 UTC

Severity: normal

Full log


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

From: Linda Walsh <coreutils <at> tlinx.org>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 17103 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#17103: regression: cp -al doesn't copy symlinks,
 but tries to link to them (fail)
Date: Wed, 26 Mar 2014 21:31:04 -0700

Pádraig Brady wrote:
> On 03/27/2014 02:57 AM, Pádraig Brady wrote:
> 
>> I've attached a patch for illustration.
>>
>> However I don't like it because it doesn't deal with,
>> 1. fifos, device files, setuid regular files, nor,
>> 2. relative symlinks that traverse outside the copied hierarchy.
> 
> Actually point 2 isn't specific to this issue at all,
> so forget about that disadvantage.
---
And it isn't really a problem.

Many times you'll see a link outside the hierarchy to a
directory or such -- even a file -- rather than including
it in dir -- because hardlinks are often not practical.
(cross devs...etc).  As for relative links outside the tree
they'd still work too if you are making a copy parallel in
the same tree.  I have these little gems in my
linux source/build tree:
lrwxrwxrwx  1     15 Jun 26  2010 clean_tree -> kbin/clean_tree*
lrwxrwxrwx  1     15 Jun 26  2010 doit -> kbin/install_it*
lrwxrwxrwx  1     15 Jun 26  2010 install_it -> kbin/install_it*
lrwxrwxrwx  1     11 Feb 28  2013 kbin -> ../law/kbin/
lrwxrwxrwx  1      8 Mar 26 20:52 linux -> ish-3137/
lrwxrwxrwx  1     16 Jun 26  2010 list_source -> kbin/list_source*
---
But also for # of kernels,
> ls -1d asa-* ish-* linux-*|wc -l
64

At over 300 to now over 500MB/tree that would be alot of wasted space if
they were not linked, but linked, even diff versions are relatively small:

because of tree linking:

    With            W/o
567M  ish-3101   567M  ish-3101
12M   ish-3102   567M  ish-3102
25M   ish-3105   567M  ish-3105
27M   ish-3106   567M  ish-3106
27M   ish-3107   567M  ish-3107
475M  ish-311    581M  ish-311
18M   ish-3113   581M  ish-3113
25M   ish-3116   579M  ish-3116
----  -----      ----  --------
1.1G  TOTAL      4.5G  TOTAL

the only reason I can keep so many copies is most of it is duplicate
info...






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

Previous Next


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