Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jul 2004 13:55:00 -0700 (PDT)
From:      Joe Schmoe <non_secure@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   making files opposite from themselves (100% change)
Message-ID:  <20040705205500.30396.qmail@web53306.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040705205500.30396.qmail>