"Today's post is similar in spirit, but not a replay of that
previous memory/swap reporting issue. Today, we're going to take a
look at two other commands that, seemingly, measure and display the
same information, although with (sometimes) huge discrepancies in
output. Those two commands are du and df.
"The question you'll most often see (or, perhaps, have :) is
something to the effect of "Why do my outputs from du and df
differ? One says I'm using more disk space than the other. Which of
them is correct?" Generally you'll find that df shows more disk
spaced used than du does, but the case can sometimes be the
opposite. It's very rare (unless you don't use your computer, and
it doesn't use itself, at all ;) that the output from the two
commands match. It's actually rare that they ever come close to
matching. Generally, the longer a machine is up, the greater the
rift between figures becomes."