this post was submitted on 27 Dec 2023
96 points (68.2% liked)

Technology

59390 readers
2896 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
 

I often find myself explaining the same things in real life and online, so I recently started writing technical blog posts.

This one is about why it was a mistake to call 1024 bytes a kilobyte. It's about a 20min read so thank you very much in advance if you find the time to read it.

Feedback is very much welcome. Thank you.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 3 points 10 months ago* (last edited 10 months ago) (1 children)

As the article mentions, windows also uses KB/MB/GB to refer to powers of 2 when calculating disk space. AFAIK Linux somes does too, although the article says otherwise. Apparently OSX uses the KB=1000 definition.

It may be outdated, but it's still incredibly common for people to use KB/MB/GB to refer to powers of 2 in computing. Best not to assume KB is always 1000.

[โ€“] [email protected] 1 points 10 months ago* (last edited 10 months ago)

Windows and Mac both use KB = 1000. With Linux I think it depends on the distro.

You're thinking of very old versions of Windows... old versions of MacOS were also 1024.

It's honestly irrelevant anyway - if you want to actually know how much space a file is using on disk, you should look up how many pages / sectors are being used.

A page (on an SSD) or sector (on a HDD) is 32768 bits on most modern drives. They can't store a file smaller than that and all of your files take up a multiple of that. A lot of modern filesystems quietly use zip compression though. Also they have snapshots and files that exist in multiple locations other shit going on which will really mess with your actual usage.

I'm not going to run du -h / on my laptop, because it'd take forever, but I'm pretty sure it would be a number significantly larger than my actual disk. Wouldn't surprise me if it's 10x the size of my disk. Macs do some particularly interesting stuff in the filesystem layer - to the point where it's hard to even figure out how much free space you have... my Home directory has 50 GB of available space on my laptop. Open the Desktop directory (which is in the Home directory...) and the file browser shows 1.9 TB of available space.