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

Måns Rullgård
2003-12-05T23:26:03Z

Mike Fedyk <mfedyk@matchmail.com> writes:

>> I found this paragraph in the man page of GNU cp:
>>
>> --sparse=WHEN
>> always Always make the output file sparse. This is
>> useful when the input file resides on a
>> filesystem that does not support sparse
>> files, but the output file is on a filesys-
>> tem that does.
>
> So with this, you can create sparse files for an entire set of files
> by just cping them? :)

Yes. It won't query the system for where any potential holes in the
source files might be, though, so if there are large holes, cp will
spend unnecessary time crunching through them.

--
Måns Rullgård
mru@kth.se