3 options to create a dummy file
Sometimes a big size dummy file is necessary.
There are roughly 3 ways to achieve this:
I found them from this Stackoverflow answer.
It’s the most famous one, but it’s basically for copy data from one to another in hard way. It’s accurate but slow. If you want just a dummy file, it’s not a good choice.
It’s maybe the fasted way. But it doesn’t actually allocate the space. What it does is cheat the file system with repetition of smaller amount of data. If you really want to allocate the space, it’s not the best one.
Now, it’s the last and the best option.
The basic usage is
fallocate -l [length] [filename]