- 论坛徽章:
- 0
|
quite comon
sorry, my IME sucks.
du and df are different.
du calculates file by file, that means, it will scan every file in the specific directory. so it is slow, most of the time.
df calculates via a smarter way, by the blocks in the block_image_zone in a filesystem, so beside the space recorgnized by du, df will also count such situations in:
1. super blocks, various zones to record the fs informations.
2. blocks which are not full, if 3K of the 4K block is taken by a file, du counts 3K in, but 4K for df.
3. a unlinked file, but still hold by some processes, like yours, you know, it only release the blocks until related processes get quit.
So, du always show you a smaller disk usage than df. but i trust df, which is even faster. |
|