I've also asked a sibling question for Windows.
In Linux (I just tested):
- The size of an empty folder is given as 4 KB (regardless of its name)
- The size of an empty file is given as 0 bytes
However, files and folders obviously have names, that must be stored somewhere.
- Where, roughly, are they stored?
- Is the maximum memory available to store these data a predefined number or is it dependent on the available space in disk?
- Does an empty file with a short name take less space than an empty file with a larger name? (or perhaps the data structure in which these names are stored have a fixed byte count for each file, which perhaps fills the remaining bytes with
\0
?) - Does an empty folder with a short name take less space than an empty folder with a larger name?
- Does an empty folder called
foobar
take less space, same space or more space than an empty file calledfoobar
? - Does an empty file at
/etc/empty.txt
take less space, same space or more space than an empty file at/etc/long/nested/path/until/the/empty/file/is/reached/empty.txt
?