This is a discussion on Re: du and df discrepancy - FreeBSD ; Bill Vermillion writes: > I've seen it many times in my XX years of Unix work. > > du - shows the amount of blocks used by the system > df - shows the amunt of space it thinks is ...
> I've seen it many times in my XX years of Unix work.
> du - shows the amount of blocks used by the system
> df - shows the amunt of space it thinks is being used.
> The latter will compute the length of sparse files so df will show
> less free space than du. Sparse file will have blocks of no data in
> them. These are typically created by database programs.
df will show the amount of space used in the file system, including
space used by files that have no directory entry (e.g. temporary files
which the application unlinks immediately after opening)
du will show the amount of space used by the files it is able to find by
traversing the directories specified on the command line.
Both will DTRT for sparse files.
Note that when running 'du *' in the root of a file system, the shell
will most likely not include directories and files whose names begin
with a dot in its expansion of '*'.
Dag-Erling Sm=C3=B8rgrav - email@example.com
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "email@example.com"