[kwlug-disc] scp file size

Chris Irwin chris at chrisirwin.ca
Tue Dec 21 14:52:21 EST 2010


On Tue, Dec 21, 2010 at 14:20, Insurance Squared Inc.
<gcooke at insurancesquared.com> wrote:
> I'm nervous.  In preparation for an OS upgrade, I copied my home directory
> over to another machine.  When I do a 'du', I'm getting 20 gigs on the copy,
> 23 gigs on the original.

You're probably missing all your hidden files.

> From my home directory /home/user I did the following:
>  scp -r -C * 10.0.22.3:/backup2/user

Bash expands * before calling scp and does not include hidden files.

> 'du' issued at 10.0.22.3:/backup2/user shows 20 gig.
> 'du' issued at /home/user shows 23 gigs.

Check with `du -chs *`, which will only compare visible items. There
may still be a slight difference due to block sizes (as John
mentioned) but should be pretty close.

> Directory listings sure seem the same based on a cursory inspection.

Did you compare output of `ls -a`, or just `ls`?

I'd try again and copy the directory itself (instead of the files
within it). You could use rsync to save yourself re-transferring about
20GB.

-- 
Chris Irwin
<chris at chrisirwin.ca>




More information about the kwlug-disc mailing list