Z
Zhukov Pavel
I need to creat an empty file, over 10GB size.
Which way is fastest in file creation?
Which way is fastest in file creation?
Zhukov said:I need to creat an empty file, over 10GB size.
Which way is fastest in file creation?
^^^^^^^^^^^^ts said:use IO#sysseek followed which a IO#seekwrite
use IO#sysseek followed which a IO#seekwrite
But note that this will not work on all OS in case the file must be
allocated. Seeking likely creates a sparse file.
Another approach is to use dd like
dd if=/dev/zero of=your_file bs=1048576 count=10240
That's probably as fast as it gets if you need blocks actually allocated to
the file.
Kind regards
robert
I need to creat an empty file, over 10GB size.
Which way is fastest in file creation?
i can't use dd, cause i want a cross-platform application
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.