[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bad cp -a behaviour
From: |
Philip Rowlands |
Subject: |
Re: Bad cp -a behaviour |
Date: |
Wed, 11 Aug 2004 02:53:11 +0100 (BST) |
On Tue, 10 Aug 2004, Tim Waugh wrote:
>How odd. Is that a patched 5.2.1?
Possibly; it's from an unadulterated Fedora Core 2.
>Here's what I get with unpatched 5.2.1, straight from the tarball:
>
>address@hidden ~/coreutils-5.2.1/src]$ ./cp --version
>cp (coreutils) 5.2.1
>Written by Torbjorn Granlund, David MacKenzie, and Jim Meyering.
>
>Copyright (C) 2004 Free Software Foundation, Inc.
>This is free software; see the source for copying conditions. There is NO
>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>address@hidden ~/coreutils-5.2.1/src]$ rm -fr 1 2
>address@hidden ~/coreutils-5.2.1/src]$ mkdir -p 1/d 2/d
>address@hidden ~/coreutils-5.2.1/src]$ echo foo > 1/d/1
>address@hidden ~/coreutils-5.2.1/src]$ ln 1/d/1 1/d/2
>address@hidden ~/coreutils-5.2.1/src]$ ln 1/d/1 1/d/3
>address@hidden ~/coreutils-5.2.1/src]$ echo foo > 2/d/1
>address@hidden ~/coreutils-5.2.1/src]$ echo bar > 2/d/2
>address@hidden ~/coreutils-5.2.1/src]$ ln 2/d/2 2/d/3
>address@hidden ~/coreutils-5.2.1/src]$ ln 2/d/2 2/d/4
>address@hidden ~/coreutils-5.2.1/src]$ ./cp -af 2/d 1
>address@hidden ~/coreutils-5.2.1/src]$ diff -upr 2 1
>diff -upr 2/d/1 1/d/1
>--- 2/d/1 2004-08-10 13:19:02.695163241 +0100
>+++ 1/d/1 2004-08-10 13:19:02.703161000 +0100
>@@ -1 +1 @@
>-foo
>+bar
I tried building from source, but I get the same as before (i.e. no
problem, no output from diff). Bizarre. Let's keep digging:
$ src/cp -afv 2/d 1
`2/d/4' -> `1/d/4'
`2/d/2' -> `1/d/2'
`2/d/1' -> `1/d/1'
`2/d/3' -> `1/d/3'
$ ls -U1 2/d
4
2
1
3
[ this is running on an ext3 filesystem ]
The bug might be order-specific; does your test produce the same output
as the above with "-v"?
Cheers,
Phil
- Bad cp -a behaviour, Tim Waugh, 2004/08/07
- Re: Bad cp -a behaviour, Andreas Schwab, 2004/08/07
- Re: Bad cp -a behaviour, Philip Rowlands, 2004/08/07
- Re: Bad cp -a behaviour, Tim Waugh, 2004/08/10
- Re: Bad cp -a behaviour,
Philip Rowlands <=
- Re: Bad cp -a behaviour, Tim Waugh, 2004/08/11
- Re: Bad cp -a behaviour, Philip Rowlands, 2004/08/11
- Re: Bad cp -a behaviour, Tim Waugh, 2004/08/11
- Re: Bad cp -a behaviour, Paul Eggert, 2004/08/11
- Re: Bad cp -a behaviour, Tim Waugh, 2004/08/12
- Re: Bad cp -a behaviour, Philip Rowlands, 2004/08/12
- Re: Bad cp -a behaviour, Andreas Schwab, 2004/08/12