Date: Sat, 29 Sep 2007 09:00:41 -0600 From: Modulok <modulok@gmail.com> To: freebsd-questions@freebsd.org Cc: Dan Nelson <dnelson@allantgroup.com> Subject: Re: File size discrepancies Message-ID: <64c038660709290800q331e15bel26273dc14587ce0e@mail.gmail.com> In-Reply-To: <20070928201528.GB62033@dan.emsphone.com> References: <64c038660709281127j1df4835bxcbfe4495600fd6d7@mail.gmail.com> <20070928201528.GB62033@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> du doesn't count in bytes; it counts in disk blocks or KB. A 12KB > difference is probably just due to better packing of directories in > your newly-created tree as compared to your orignal one. To figure out > where the difference is, run "du -a" in both trees and diff the two > outputs. What I did to try and track down the problem: du -a ./dirA | sort -n > dirA.tmp; du -a ./dirB | sort -n > dirB.tmp; diff dirA.tmp dirB.tmp; # Exerp of the diff output: < 554372 ./images > 554362 ./images < 17007468 ./video > 17007466 ./video The size discrepancy is the size of the directories, not the files contained within those directories. To be sure I ran: diff -r dirA/images dirB/images; There appears to be no difference in the contents. >du doesn't count in bytes; it counts in disk blocks or KB. A 12KB >difference is probably just due to better packing of directories in >your newly-created tree as compared to your orignal one. So, the size of a directory itself can differ when the contents is identical? This is news to me. Thanks. -Modulok-
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64c038660709290800q331e15bel26273dc14587ce0e>