GNU bug report logs - #31335
unexpected cp -f behavior

Previous Next

Package: coreutils;

Reported by: Ernesto Alfonso <erjoalgo <at> gmail.com>

Date: Tue, 1 May 2018 18:15:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ernesto Alfonso <erjoalgo <at> gmail.com>
To: 31335 <at> debbugs.gnu.org
Subject: bug#31335: unexpected cp -f behavior
Date: Tue, 01 May 2018 11:14:44 -0700
cp -f fails when destination is a recursive symlink:

    $ ln -s self self
    $ cat self 
    self: Too many levels of symbolic links
    $ touch a
    $ cp a self 
    cp: failed to access 'self': Too many levels of symbolic links
    $ cp -f a self 
    cp: failed to access 'self': Too many levels of symbolic links
    

From the man page:

       -f, --force
              if  an  existing destination file cannot be opened, remove it and try again (this option is ignored when
              the -n option is also used)

What am I missing?

Thanks,

Ernesto




This bug report was last modified 7 years and 57 days ago.

Previous Next


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