by Anderkent · 12y ago · 0 comments
unlink(filename)
create(filename)
write(filename, random)
?
Though something that opens the file in append mode then seeks to 0 would probably overwrite the same HDD locations.You can avoid this with the 'conv=notrunc' option of 'dd'[1]. It will overwrite existing blocks instead of truncating (and possibly reallocating):
notrunc Do not truncate the output file. This will preserve
any blocks in the output file not explicitly written by
dd. The notrunc value is not supported for tapes.
[1]:https://developer.apple.com/library/mac/documentation/Darwin...Are you saying this will not overwrite some of the blocks?