4K file size

All file systems have a cluster or block size, or the smallest amount of disk space that can be allocated to hold a file. Even if the actual file size is smaller than the cluster/block size, it will still consume one cluster, or 4K on your file system. The cluster size depends on the file system, and the file system options.

If it contains zero bytes, as Gilles pointed out, it uses zero blocks/clusters but one inode on typical *nix file systems, which better answers the caveat, “unless it’s blank.”

dd if=/dev/zero of=1_byte.bin bs=1 count=1

But wait a minute:

du -sh 1_byte.bin
4.0K 1_byte.bin

 

Leave a Reply

Your email address will not be published. Required fields are marked *