I'm asking this out of pure curiosity.
Is it possible to completely bog down an operating system by creating uncountable amount of empty files on the system partition?
In theory they have 0 bytes size, but in practice they contribute to the filesystem's metadata, as they have a name, a modification time and so on.
I once created about 6500 1-megabyte sized files to test if
rsync is significantly slower when dealing with a lot of small files than with a couple of big ones. I've notices that whenever I accessed the directory that contained all the files, the file manager froze for a good chunk of time, trying to list all the files. Deleting them also took a very long while.
I wonder if this could be used to put out a cyber attack, and if one could then defend against it.
I did a small test and created 100 000 empty files with
touch. That took 3 minutes 10 seconds and created a directory that is reported to be 2,1 megabytes big. Afterwards my file manager Dolphin has frozen.
Removing the whole directory with
rm -rf took only 1 second.
I wonder if this could be scaled up to render an operating system unusable?
I'm running GNU/Linux (Linux Mint) with EXT4 filesystems but I wonder how different operating sys5tems and filesystems would deal with this problem.