From owner-freebsd-questions@FreeBSD.ORG Mon Jul 5 20:55:01 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E49016A4CF for ; Mon, 5 Jul 2004 20:55:01 +0000 (GMT) Received: from web53306.mail.yahoo.com (web53306.mail.yahoo.com [206.190.39.235]) by mx1.FreeBSD.org (Postfix) with SMTP id 1DAFD43D48 for ; Mon, 5 Jul 2004 20:55:01 +0000 (GMT) (envelope-from non_secure@yahoo.com) Message-ID: <20040705205500.30396.qmail@web53306.mail.yahoo.com> Received: from [24.94.23.114] by web53306.mail.yahoo.com via HTTP; Mon, 05 Jul 2004 13:55:00 PDT Date: Mon, 5 Jul 2004 13:55:00 -0700 (PDT) From: Joe Schmoe To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: making files opposite from themselves (100% change) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 20:55:01 -0000 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