[TriLUG] File Size Wierdness in Copy from HP-UX to Linux

Scott Chilcote scottchilcote at earthlink.net
Sun Nov 2 22:11:58 EST 2003


Hi Folks,

I ran into an odd problem this weekend when recursively copying a large 
directory from an HP-UX system to a Linux system.  I'm using scp (ssh) 
to perform the copy.

The directory I'm copying appears to be two very different sizes.  When 
I type "du -s -k <dir>" on the HP-UX system, I get just over 629,000 Kbytes.

I copy the directory to the Linux system, using

   scp -p -r <dir> <user at linuxmachine:/dir>

After the copy completes (hours later), I find that I've copied over 1.6 
Gigabytes to the Linux system.

Again, I used "du -s -k <dir>" on the Linux system to determine the size 
of the copied directory.  The "-k" flag is supposed to eliminate any 
block size mismatch error.

My initial guess was that scp follows links, and there must be a lot of 
linked stuff being copied.  I looked at the man page for scp, and didn't 
see any reference to how links or handled (or not).  I didn't see any 
parameters that control this either, like tar provides.

There are a number of links in the data being copied, but I have trouble 
believing that it would result in nearly three times as much stuff!

Is this a "follow links" problem, and does anyone know a way around it?

Creating a tar file on the HP-UX system is out of the question; its 
filesystems are all nearly full.

Thanks for any help!

Scott C.





More information about the TriLUG mailing list