making files opposite from themselves (100% change)

Joe Schmoe non_secure at yahoo.com
Mon Jul 5 13:55:01 PDT 2004


Hi,

I want to do some benchmarking and speed testing of
rsync and UFS snapshots by taking existing files,
doing rsyncs and snapshots of them and their
filesystem, and then _changing_ those files by a
certain percent difference, and rsyncing/snapshotting
again.

So the question is, how do I take a given file and
make it 100% different from itself (but maintain its
size and place on disk) ?  I could just output
/dev/zero to it, but that would leave unchanged all
the bits that were aleady zero.

So how do I flip the bits of an entire file ? 
Further, is there a good command line that will flip
the bits of some percentage of the file ?

thanks.


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the freebsd-questions mailing list