Cynthia Eastham wrote: > Roland Mainz wrote: >> Hi! >> >> ---- >> >> Do /usr/bin/cp + /usr/bin/mv support copying sparse files ? I've been >> looking for simple code which demonstrates the use of >> |SEEK_HOLE|/|SEEK_DATA| but it looks there isn't an example in the open >> parts of OS/Net (or am I looking in the wrong places ?) ... > > No, not yet. I've got a tool (a personal tool which is not part of > OS/Net) I've attached, though, which I wrote to determine if a file is > sparse or not. Hope it helps.
It's been pointed out to me that the work which the above tool does could be performed by comparing file size with blocksize, however the sample program was written to demonstrate the use of SEEK_HOLE/SEEK_DATA (which could be expanded to gather data and hole offsets of a file). :) Cindy
