![Does a zero byte file take up 4k](https://kumkoniak.com/34.jpg)
![does a zero byte file take up 4k does a zero byte file take up 4k](https://cdn.windowsreport.com/wp-content/uploads/2016/09/2.png)
Some filesystems have a more sophisticated allocation scheme: they have fixed-size blocks, but can use the same block to store the last few bytes of more than one file. What ext2 calls blocks, FAT calls clusters the concept is the same. The FAT filesystem used in particular by MS-DOS and early versions of Windows has a similarly simple space allocation. That block size is what you specify with mke2fs -b.
![does a zero byte file take up 4k does a zero byte file take up 4k](https://venturebeat.com/wp-content/uploads/2020/04/Screenshot86_photos_v2_x4.png)
A file¹ whose size is between N blocks plus one byte and N+1 blocks occupies N+1 blocks. All blocks on a given filesystem have the same size, usually one of 1024, 2048 or 4096 bytes.
![does a zero byte file take up 4k does a zero byte file take up 4k](https://images.wondershare.com/recoverit/article/2019/06/change-file-extensions-check.jpg)
Filesystemsįor ext2 or ext3, the situation is relatively simple: each file occupies a certain number of blocks. Terms like “block size” and “cluster size” don't have a universal meaning, even within the context of filesystem literature. I think you're confused, possibly because you've read several documents that use different terminology.
![Does a zero byte file take up 4k](https://kumkoniak.com/34.jpg)