GNU bug report logs - #13893
bug in CP

Previous Next

Package: coreutils;

Reported by: kredden <at> maysvilleky.net

Date: Wed, 6 Mar 2013 21:07:01 UTC

Severity: normal

Tags: notabug

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13893 in the body.
You can then email your comments to 13893 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#13893; Package coreutils. (Wed, 06 Mar 2013 21:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to kredden <at> maysvilleky.net:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 06 Mar 2013 21:07:02 GMT) Full text and rfc822 format available.

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

From: "Kevin C. Redden" <kcredden <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: bug in CP
Date: Wed, 06 Mar 2013 15:23:18 -0500
Sir:

I'm using Debian 6.06/KDE 4.4, and I found either a bug, or else an 
omission in CP.

I tried to copy files from one directory to another with the command

kcredden <at> zeus:/STORE2/TH-zeus/work-desk/WRITNG/WRITING-CURRENT$ cp -R * 
/media/SNEAKERNET1/

It goes about half-way, then completely aborts with:

cp: cannot create directory 
`/media/SNEAKERNET1/Tools/NEW-FOLDER-FRAMEWORK ': Invalid argument

I honestly don't know what's wrong with that directory, but Dolphin 
cannot copy it as well. I was finally able to copy the files with a SU 
midnight commander. When MC ttried to copy that file it just asked if I 
wish to skip it which I did, and MC finished copying the rest of the files.

First I'm wondering; is this a bug? If not, is there a way to force CP 
to copy files without aborting if it runs into a problem? There is a 
command in Windows called 'Xcopy'. It has a command switch telling it to 
just skip over bad files, and copy the rest. I cannot recall exactly 
what the command is, since I've been off windows for quite awhile. But 
it's something like 'xcopy -c *.* /dir.' (-c for 'continue')

If this is a bug, or an omission. Can I request that someone fix cp for 
either a command switch like Xcopy's, or else at least default to just 
skip bad files, instead of aborting completely? This abort problem has 
also plagued both windows and linux file managers for years (except for 
MC) and it's frankly very annoying.

Thanks.

- Kc (linux user since Ubuntu 8.04.01)

-- 

Kevin C. Redden
--
kcredden <at> gmail.com
https://awanderingminddotme.wordpress.com/

"I am free because I know that I alone am morally responsible for everything I do. I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do."
Robert A. Heinlein

"Be wary of strong drink. It can make you shoot at tax collectors... and miss." - (personal favorite :)
Robert A. Heinlein





Information forwarded to bug-coreutils <at> gnu.org:
bug#13893; Package coreutils. (Wed, 06 Mar 2013 21:59:02 GMT) Full text and rfc822 format available.

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

From: Eric Blake <eblake <at> redhat.com>
To: kredden <at> maysvilleky.net
Cc: "Kevin C. Redden" <kcredden <at> gmail.com>, 13893 <at> debbugs.gnu.org
Subject: Re: bug#13893: bug in CP
Date: Wed, 06 Mar 2013 14:57:32 -0700
[Message part 1 (text/plain, inline)]
On 03/06/2013 01:23 PM, Kevin C. Redden wrote:
> Sir:
> 
> I'm using Debian 6.06/KDE 4.4, and I found either a bug, or else an
> omission in CP.
> 
> I tried to copy files from one directory to another with the command
> 
> kcredden <at> zeus:/STORE2/TH-zeus/work-desk/WRITNG/WRITING-CURRENT$ cp -R *
> /media/SNEAKERNET1/
> 
> It goes about half-way, then completely aborts with:
> 
> cp: cannot create directory
> `/media/SNEAKERNET1/Tools/NEW-FOLDER-FRAMEWORK ': Invalid argument

Notice the trailing space.  Also, notice that your destination file is
mounted under /media, and these days, most /media mounts are to USB
flash sticks, which in turn tend to be default-formatted as FAT.  The
FAT file system is puny - among other things, it doesn't permit trailing
spaces in file names.  The kernel is telling you that it cannot create
the desired filename with a trailing space because of the restrictions
of the destination file system.

> 
> I honestly don't know what's wrong with that directory, but Dolphin
> cannot copy it as well. I was finally able to copy the files with a SU
> midnight commander. When MC ttried to copy that file it just asked if I
> wish to skip it which I did, and MC finished copying the rest of the files.
> 
> First I'm wondering; is this a bug? If not, is there a way to force CP
> to copy files without aborting if it runs into a problem? There is a
> command in Windows called 'Xcopy'. It has a command switch telling it to
> just skip over bad files, and copy the rest. I cannot recall exactly
> what the command is, since I've been off windows for quite awhile. But
> it's something like 'xcopy -c *.* /dir.' (-c for 'continue')

This is not a bug, but a limitation of your choice of file systems.
Rename the file on the source to something that doesn't violate FAT
naming requirements, and then you will be able to copy things.  Or
reformat your USB stick to use ext4 or other similar more-permissive
filesystem (although based on the name of your media, you are planning
on sneaker-netting your files to another machine, so pick a filesystem
that the destination OS can read).

> 
> If this is a bug, or an omission. Can I request that someone fix cp for
> either a command switch like Xcopy's, or else at least default to just
> skip bad files, instead of aborting completely? This abort problem has
> also plagued both windows and linux file managers for years (except for
> MC) and it's frankly very annoying.

cp should have copied as much as possible, without recursing into the
impossible directory name.  If you can prove that cp aborted early
instead of copying all remaining files, even after failing on that one
directory, then we have a bug to fix.  But if only that one directory
(and all its descendants) were the only things omitted in your recursive
copy, then 'cp' did its job as best it could in spite of the kernel
restriction against creating impossible files on less-capabilt file systems.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#13893; Package coreutils. (Thu, 07 Mar 2013 01:37:02 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: "Kevin C. Redden" <kcredden <at> gmail.com>, kredden <at> maysvilleky.net,
	13893 <at> debbugs.gnu.org
Subject: Re: bug#13893: bug in CP
Date: Thu, 07 Mar 2013 01:36:23 +0000
tag 13893 notabug
stop

I agree with the analysis here.
We can open again if necessary.

thanks,
Pádraig.





Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Thu, 07 Mar 2013 01:37:03 GMT) Full text and rfc822 format available.

Reply sent to Bob Proulx <bob <at> proulx.com>:
You have taken responsibility. (Tue, 08 Apr 2014 17:22:03 GMT) Full text and rfc822 format available.

Notification sent to kredden <at> maysvilleky.net:
bug acknowledged by developer. (Tue, 08 Apr 2014 17:22:04 GMT) Full text and rfc822 format available.

Message #18 received at 13893-done <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: 13893-done <at> debbugs.gnu.org
Cc: "Kevin C. Redden" <kcredden <at> gmail.com>, kredden <at> maysvilleky.net
Subject: Re: bug#13893: bug in CP
Date: Tue, 8 Apr 2014 11:21:17 -0600
Pádraig Brady wrote:
> I agree with the analysis here.
> We can open again if necessary.

It has been a year and no one has added anything to this bug which
seems to have been completely resolved.  I am therefore closing it
in the bug tracking system.

Bob




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 07 May 2014 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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