bugGNU Core Utilities - Bugs: bug #15619, cp -al dir1/ dir2/ fails when dir2...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15619: cp -al dir1/ dir2/ fails when dir2 non-existent with coreutils version > 5.3

Submitted by:  None
Submitted on:  Fri 03 Feb 2006 10:04:38 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 16 Feb 2006 03:33:00 AM UTC, comment #2:

Thanks Jim for stating that this change is intended.

Could the change in cp be clearly documented?

If intended, could it please be clearly documented in
changelogs, man pages, etc. And is it possible to have an
option to ignore a trailing slash on destination directories
so we can get the old behaviour?

David Keegel <djk20>
Sun 12 Feb 2006 08:33:07 AM UTC, comment #1:

Sorry, but the new behavior is deliberate,
and required by POSIX.

Jim Meyering <meyering>
Project Administrator
Fri 03 Feb 2006 10:04:38 PM UTC, original submission:

In coreutils version 5.2.1, if I run:
cp -al /etc/ /tmp/copy/
where /tmp/copy does not exist beforehand, then cp will
treat this the same as if they had no trailing slashes:
cp -al /etc /tmp/copy
and create the directory /tmp/copy and do the copy as
expected.

However in coreutils version 5.3 or 5.9.x cp's behaviour
is different. Instead it gives an error:
/bin/cp: target `/tmp/copy/' is not a directory: No such
file or directory

rsnapshot likes to put trailing slashes on the end of
directory names, for consistency with rsync, and so it
is failing when trying to do these copies with gnu cp on
recent SuSE Linux and Gentoo Linux distributions.

Can someone please clarify whether this change in behaviour
with cp (giving an error when copying to nonexistent/) is
an intended or unintended feature?

If intended, could it please be clearly documented in
changelogs, man pages, etc. And is it possible to have an
option to ignore a trailing slash on destination directories
so we can get the old behaviour?

If unintended, can cp please be changed back so that copying
to "nonexistent/" is the same as coping to "nonexistent".

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 14 Feb 2006 10:27:49 PM UTCmeyeringOpen/ClosedOpen=>Closed
Sun 12 Feb 2006 08:33:07 AM UTCmeyeringStatusNone=>Wont Fix
Fri 03 Feb 2006 10:23:41 PM UTCdjk20Carbon-Copy-=>Added djk20

Back to the top


Powered by Savane 3.1-cleanup1