holes in files

John F Haugh II jfh at rpp386.cactus.org
Sun Dec 16 02:28:33 AEST 1990


In article <1820 at b15.INGR.COM> rob at b15.INGR.COM (Rob Lemley) writes:
>Examples please.  As stated before, when READING a file (ie: via open/read),
>there is NO WAY to determine if a block of zeros constituted an actual hole
>in the file or a disk block full of zeros.

The example of checksumming the results of stat() works pretty well.
A few weeks back there was some discussion about date roll back and
so on.  Keeping track of the exact contents of the entire inode and
file might be one form of copy protection or file validation.  You
could ignore the parts that change (like st_atime), but keep track
of the rest (like st_mtime, st_blocks, etc) along with file data.
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org
"While you are here, your wives and girlfriends are dating handsome American
 movie and TV stars. Stars like Tom Selleck, Bruce Willis, and Bart Simpson."



More information about the Comp.unix.internals mailing list