Subject: Re: du ouput query
To: None <port-i386@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 07/30/2007 05:10:40
> [rsync over ssh]
> [tar, ftp, untar]
> `diff -r' said there were no differences, but `du -sh' said the
> rsync'ed copy was 425 MB in size while the untarred one was 356 MB.
> Could you explain why du thinks these directories have different
> sizes please?
Not definitely, not without more information.
The two plausible reasons that come to mind immediately:
- The source tree contains some files which are hardlinked together;
tar preserved the hardlink relationship, while rsync didn't.
- The source tree contains some files which are (or could be) sparse;
tar generated sparse files, while rsync didn't.
If I had to pick one as more likely to be responsible in your
particular case, solely on the information I have, I'd pick the first.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B