Small fast question

just to confirm
du from sh show sizes as multiples of 512 byte right?

Yes.

To get the value in kilobytes.

du -k

Some versions have a "-h" (human-readable) format option.

1 Like

great thanks methyl

---------- Post updated at 10:28 AM ---------- Previous update was at 10:22 AM ----------

same as ls -s? ls -s default 512 too right?

Yes, but I don't know of an option in unix ls to have it in more usable units.
It all dates back to the standard disc block size of 512 bytes on early systems (which is totally irrelevant on modern hardware).

Many unixes still use HFS filesystems for the filesystem containing the bootable kernel (/stand). This filesystem works in the old manner with strict 512 byte blocks and no fragmentation allowed.

oo.. so du still the best for size stuff