From owner-freebsd-questions@FreeBSD.ORG Fri May 2 18:56:45 2003 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 90D9E37B401 for ; Fri, 2 May 2003 18:56:45 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA48C43F85 for ; Fri, 2 May 2003 18:56:44 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: from clunix.cl.msu.edu (localhost [127.0.0.1]) by clunix.cl.msu.edu (8.12.9/8.12.9) with ESMTP id h431uhOg019152; Fri, 2 May 2003 21:56:43 -0400 (EDT) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.12.9/8.12.9/Submit) id h431ugXe019151; Fri, 2 May 2003 21:56:42 -0400 (EDT) From: Jerry McAllister Message-Id: <200305030156.h431ugXe019151@clunix.cl.msu.edu> To: ertr1013@student.uu.se (Erik Trulsson) Date: Fri, 2 May 2003 21:56:42 -0400 (EDT) In-Reply-To: <20030503000330.GA98398@falcon.midgard.homeip.net> from "Erik Trulsson" at May 03, 2003 02:03:30 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Jerry McAllister cc: freebsd-questions@freebsd.org Subject: Re: Zeros and ones 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: Sat, 03 May 2003 01:56:45 -0000 Hi all, Thanks for the input. > > But, I would like to write all ones - as in 0xff or maybe some > > other pattern - as if there was a /dev/one also. > > > > Is there a nice way to do this using UNIXistic stringing existing > > stuff together? Or do I have to write a little piece of code? > > Of course there is a nice way. :-) > > Try something like > > tr '\000' '\377' < /dev/zero | dd of=onesfile bs=512 count=1770000 > > to get a file with all bits equal to one. Wow, I use tr all the time to clean up files, especially stripping the extra CR going from MS to UNIX, but it never crossed my dazed head to use it here. Thanks for steering me back on the path to all who responded.. ////jerry . > > -- > > Erik Trulsson > ertr1013@student.uu.se