I recently noticed a use case for this feature: https://review.openstack.org/#change,4435 But I managed to forget we had a patch pending for this, and spent a couple of hours writing my own version :p Well at least it's good practise for reviewing Roman's... I notice Roman's seeks() the output for any run of NULs, while mine only considers blocks of the full output block size. Checking the full block is a bit more CPU efficient, and gives a bit more control, so I'm marginally leaning towards doing that? Also Roman's doesn't handle the case where a seek is done at the end of the file. In that case an ftruncate() or write() is needed to correctly set the size. Notes on my version attached are: I first need to refactor is_nul() for use by cp too. My version is advisory also We may need to coalesce seeks to larger ones? something like cache_round()? I thought it better to keep the code simple in this regard though as it's probably not of practical concern. I used conv= for bsd compat, rather than oflag=. Needs tests and docs yet. cheers, Pádraig.