[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird df info




I did a small experiment to compare gzip and bzip2, and noticed a very
strange thing with the reporting of free diskspace. "zz" is just a
copy of the first 89 MB of /dev/zero. :-) Now look at this:

alexsh:~> ls -l zz*
-rw-------   1 alexsh   alexsh   89088000 Jan 14 19:41 zz
-rw-r--r--   1 alexsh   alexsh       6793 Jan 14 19:49 zz.bz2
-rw-r--r--   1 alexsh   alexsh      86489 Jan 14 19:42 zz.gz
alexsh:~> df
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/hda3            3369806 1160824  2174121     35%   /
/dev/hda1             819056  339904   479152     41%   /dos
alexsh:~> rm zz*
alexsh:~> df
Filesystem         1024-blocks  Used Available Capacity Mounted on
/dev/hda3            3369806 1073388  2261557     32%   /
/dev/hda1             819056  339904   479152     41%   /dos
alexsh:~> ls -l zz*
ls: No match.

What the hell is going on? Is there some compression the kernel is
doing on filesystem data that I don't know about? FWIW I'm running
2.2.0-pre6. It's not a multiuser system and mine was the only activity
when I did the experiment. Any ideas? Can anyone try it on their
system and tell me if they get the same results?


-- 
Alex Shnitman
alexsh@linux.org.il   UIN 188956
http://members.xoom.com/alexsh  --  PGP key here
http://www.debian.org  --  and the OS here