It appears that scp
first uses stat
to determine the size of the file being transferred, and then transfers up to that number of bytes. Because /proc
is a pseudo-filesystem, and /proc/cpuinfo
is a pseduo-file, stat
reports its size as zero bytes. Therefore, scp
transfers nothing.
In contrast, cp
appears to just read blocks from the file until it can read no more, so the zero size reported by stat
is irrelevant.
To copy the file to another system it seems you'll have to first use cp
to make a local copy, and then use scp
to transfer over the network.