if i write 4 charcters to a file its size is 4 bytes but what about the title and the meta data like my pc and stuff where are they stored?
1 Answers
The file size os normally the number of bytes of content inside the file. What's not shown in this number is the file's metadata (filename, date of creation, access time, access rights and so on). All this stuff is stored in the filesystem tables itself. And here it really depends on what filesystem is used! What's also not shown (but present in most file system implementations) is the real size that the file uses on the disk (because most (all?) file systems organize the space in blocks and a file always occupies a whole number of blocks, so a file that would require 1.1 blocks will occupy 2 whole blocks) Some filesystems (like NTFS) can even store the content of small files inside the meta data, so there is no need to waste a whole block on the storage medium for tiny files.
What amount of meta data is stored and how is different for every filesystem.
- 265