File size in Snow Leopard

前端 未结 4 1004
[愿得一人]
[愿得一人] 2021-02-11 08:16

I\'m trying to figure out how to convert a file\'s (or directory\'s) byte size into kilobytes, megabytes, gigabytes, etc... respectively according the file\'s or directory\'s si

4条回答
  •  忘了有多久
    2021-02-11 08:39

    In HFS+ each file will occupy a multiple of 4,096 bytes (the "block size").

    If your directory contains one thousand 1-byte files, the total size occupied by the directory would be

    (1000 * 4,096) = 4,096,000 = 4.1 MB,
    

    although the number of bytes used by the directory is still

    1 * 1000 = 1,000 bytes.
    

提交回复
热议问题