Subject: bug#20603: Possible bug in cp

From: Chris Puttick <[email-masked]>
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 <[email-masked]> 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..