GNU bug report logs - #20603
Possible bug in cp

Previous Next

Package: coreutils;

Reported by: Chris Puttick <cputtick <at> gmail.com>

Date: Mon, 18 May 2015 15:45:06 UTC

Severity: normal

Tags: notabug

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

Bug is archived. No further changes may be made.

Full log


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

From: Chris Puttick <cputtick <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Re: Possible bug in cp
Date: Mon, 18 May 2015 15:49:43 +0100
Follow up, reproducing:

tested on openSuSE Factory

Do:

# mkdir test
# echo "this is file 1" > test/file1
# touch test/file2
# cp test/*
# cat test/file2

If there is a 3rd file in the directory you get an error:

"cp: target ‘test/file3’ is not a directory"



On 18 May 2015 at 14:04, Chris Puttick <cputtick <at> gmail.com> wrote:
> Hi
>
> In moment of tiredness issued a cp command similar to
>
> cp /path/to/files/*
>
> neglecting to add a destination (should have been ./)
>
> The files in the directory were 2 vdisks both ending .qcow2.
>
> No error message was generated and the apparent result of running the
> command is that the file whose name came first alphabetically was
> copied over the other.
>
> The installed OS on the machine was Ubuntu 12.04 and cp version 7.4.
>
> I can provide more details on request.
>
> Regards
>
> Chris
>
> --
> @putt1ck
> putt1ck.blogspot.com
> http://twoten.is
> skype: putt1ck
>
> Opinions in this email are my own and may not reflect that of my
> clients, past employers, associates, friends, family, pets etc..



-- 
@putt1ck
putt1ck.blogspot.com
http://twoten.is
skype: putt1ck

Opinions in this email are my own and may not reflect that of my
clients, past employers, associates, friends, family, pets etc..




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

Previous Next


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