Often I find myself running tests (such as transfer speed) where I need large files as testers. Doesnt matter whats in them... just use them for the data transfer or whatever.
Normally I do a:
head -c SIZE /dev/urandom > filename
where SIZE is the size of the file I need in bytes.
The problem is that for files over a few megs this method is slow because you have to wait on the machine to fill it with random information.
So my question... Is there a way to create files of arbitrary sizes instantly. Like... some way to manipulate the file descriptor so that a file is allocated a large amount of space. ???
Someone told me there is a way.. but I have no idea.