It is well-known that empty text files have zero bytes:
However, each of them contains metadata, which according to my research, is stored in inodes, and do use space.
Given this, it seems logical to me that it is possible to fill a disk by purely creating empty text files. Is this correct? If so, how many empty text files would I need to fill in a disk of, say, 1GB?
To do some checks, I run df -i
but this apparently shows the % of inodes being used(?) rather than how much they weigh.
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 947470 556 946914 1% /dev
tmpfs 952593 805 951788 1% /run
/dev/sda2 28786688 667980 28118708 3% /
tmpfs 952593 25 952568 1% /dev/shm
tmpfs 952593 5 952588 1% /run/lock
tmpfs 952593 16 952577 1% /sys/fs/cgroup
/dev/sda1 0 0 0 - /boot/efi
tmpfs 952593 25 952568 1% /run/user/1000
/home/lucho/.Private 28786688 667980 28118708 3% /home/lucho