Sparse file
dd of=output.dat bs=1 seek=390143672 count=0
This adds the advantage of creating a sparse file if this file system supports it. This means that it is not wasted if some of the pages (_blocks) are ever written, and file creation is very fast .
Opaque (opaque) file:
Edit , since people, correctly indicating that sparse files have characteristics that may be disadvantageous in some scenarios, here's a sweet point:
You can use fallocate (on Debian due to util-linux ) instead:
fallocate -l 390143672 output.dat
This still has the advantage of not having to actually write blocks, so it is pretty fast, like creating a sparse file , but it is not sparse. The best of two worlds.
sehe
source share