I'm curious, what is the smallest size a file can really be on Linux? (Assuming Ext3 fs, so why not ext4 fs as well).

Sure you can write a file that only contains one byte, or maybe even less; but surely that'll allocates a minimum, and reasonable amount of data for convenience.

So what is the minimum allocation / block size that can be allocated on ext3, and or ext4?

  • 1
    1024 is the smallest according to the mke2fs manpage. 4096 is the default. – jordanm Mar 20 '15 at 0:24

The smallest possible allocation size for a file in ext3/ext4 is 0 (none at all) because of inline data: files with sizes smaller than 60 bytes can be stores completely inside the inode itself.

Of course, every file, whether it's a regular file, symlink, directory (which can contain data), or character device or block device or named pipe (none of which possess the concept of "contents"), still occupies an inode. You can read about the size of the inode itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.