Hi
I'm just starting replacing FreeBSD 5.3 on couple of
servers with
NetBSD 3.0.1 and had tarred up all the FreeBSD directories
over nfs
onto another NetBSD system.
After restoring the main data directories (21G and 11G) onto
the new
system I did a quick check with 'du' that all main
directories were
at least same size but found a few discrepancies so checked
individual files and had some strange results.
For apparently same file I get three different sizes from
du. Is
this a bug or limitation with du, or am I missing something?
# cp
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
/tmp/pf0
# du -h /home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe
126K /home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe
# du -h
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
/tmp/pf0
142K
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
152K /tmp/pf0
# ls -l /home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe
-rwxr--r-- 1 clamav clamav 145008 Oct 22 2000
/home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe
# ls -l
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
/tmp/pf0
-rwxr--r-- 1 clamav clamav 145008 Oct 22 2000
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
-rwxr--r-- 1 root wheel 145008 Aug 12 19:57 /tmp/pf0
# md5 /home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe
MD5 (/home/dlord/home_dlord_fbsd/win98/prfile/PrFile.exe)
= e8074493c77dce2dea4d765b2b842cce
# md5
/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.ex
e
/tmp/pf0
MD5
(/mnt/p4x2400c.06080201/usr/home/dlord/win98/prfile/PrFile.e
xe)
= e8074493c77dce2dea4d765b2b842cce
MD5 (/tmp/pf0)
= e8074493c77dce2dea4d765b2b842cce
Strange output from 'du'
2006-08-12 21:08:42
On Sat, Aug 12, 2006 at 08:57:52PM -0000, David Lord wrote:
>
> For apparently same file I get three different sizes
from du. Is
> this a bug or limitation with du, or am I missing
something?
They might be sparse files on the original system.
David
--
David Laight: davidl8s.co.uk