Is there a "make hole" (truncate in middle) syscall?

Rob Landley
2003-12-04T20:32:06Z

You can make a file with a hole by seeking past it and never writing to that
bit, but is there any way to punch a hole in a file after the fact? (I mean
other with lseek and write. Having a sparse file as the result....)

What are the downsides of holes? (How big do they have to be to actually save
space, is there a performance penalty to having a file with 1000 4k holes in
it, etc...)

Rob