[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cp(1) fails to copy file from /proc

On 2009-04-15 18:07 +0200, Jukka Salmi wrote:

> I'm not sure wheter this is a bug or a feature...  However, I just noticed
> that cp(1) fails to copy /proc/cpuinfo to the file system (tested on i686 and
> x86_64 lenny systems):
> $ wc -l /proc/cpuinfo 200 /proc/cpuinfo
> $ cp /proc/cpuinfo /tmp
> $ echo $?
> 0
> $ wc -l /tmp/cpuinfo
> 125 /tmp/cpuinfo
> The first part of the file is copied correctly, but the rest is missing.
> Running strace(1) on cp reveals that cp requests to read 4 kB, receives less
> (but still >0), writes the received data to the destination file and exits:

I can reproduce that with current cp from coreutils 7.2.  This is
clearly a bug, please report it to bug-coreutils@gnu.org.


Reply to: