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

Olaf Titz
2003-12-05T22:47:11Z

> I was thinking of making a toy that would run periodically against a
> seldom-changed filesystem, find runs of zeroes of a certain minimum
> size, and turn 'em into holes. The fragmentation might not be worth
> it, though...

"cp" does that already. Hunt for sparse files, copy them and move the
new file to the old location.
There used to be an installer (Slackware, I think) back in very old
days which did this to every binary after untarring...

Olaf