language agnostic - Are 0 bytes files really 0 bytes? -
i have simple question.
when create file, let's "abc.txt" , leave blank.
os show file 0 bytes size , takes 0 bytes on disk.
if save 100 of these 0 bytes file folder, os folder's total size 0 bytes.
this may sound logical because there nothing in file. should not these files take @ least few bytes in storage device?
after all, save somewhere , named something. shouldn't file's name , possibly other headers @ least takes space?
no, still occupy few bytes on file system. otherwise implement neat file-system stored in terms of filenames on empty files.
to me boils down matter of definition. either "size of file" refers the size of content of file, or refers "difference" makes in terms of free bytes on underlying file system (that is, size of content (rounded closest block- or cluster-size) + bytes used it's inode).
Comments
Post a Comment