Conflicting answers from du with different units
- by dpitch40
My question is quite simple. I get this output when checking the total amount of space I'm using on my Walkman.
david@Milton:/media$ du -b --max-depth=0 WALKMAN/
14823290693 WALKMAN/
david@Milton:/media$ du -k --max-depth=0 WALKMAN/
14523776 WALKMAN/
Last I checked, 14,523,776 KB * 1024 = 14,872,646,624 B, not 14,823,290,693. Dividing the two, their "K" unit seems to be equal to about 1020.62 rather than 1024 as advertised. This is causing some errors in the program I wrote to sync my Walkman, so it fills up faster than it claims to. Can anyone explain this discrepency?