From owner-freebsd-questions@FreeBSD.ORG Fri May 2 18:50:35 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 C39C237B401 for ; Fri, 2 May 2003 18:50:35 -0700 (PDT) Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 253B043FD7 for ; Fri, 2 May 2003 18:50:35 -0700 (PDT) (envelope-from edhall@screech.weirdnoise.com) Received: from screech.weirdnoise.com (adsl-67-124-49-57.dsl.snfc21.pacbell.net [67.124.49.57]) h431oVPi027777; Fri, 2 May 2003 20:50:32 -0500 (CDT) Received: from screech.weirdnoise.com (localhost [127.0.0.1]) h431n92e039390; Fri, 2 May 2003 18:49:09 -0700 (PDT) (envelope-from edhall@screech.weirdnoise.com) Message-Id: <200305030149.h431n92e039390@screech.weirdnoise.com> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Andy Farkas In-Reply-To: Message from Andy Farkas <20030503095717.G67119-100000@hewey.af.speednet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 02 May 2003 18:49:09 -0700 From: Ed Hall 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:50:36 -0000 On Sat, 3 May 2003 09:58:11 +1000Andy Farkas wrote: > On Fri, 2 May 2003, Jerry McAllister wrote: > > > It is easy and convenient to use /dev/zero to write out a number of > > zero bytes to somewhere - as in: > > > > dd if=/dev/zero of=zerofile bs=512 count=1770000 > > or > > dd if=/dev/zero of=/dev/da1 bs=512 count=1770000 > > > > 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? > > > > Thanks for any [positive] suggestions. > > > > ////jerry > > Play around with jot(1). > Specifically, jot -c -s '' -n {size} {byte} - 0 >file will output {size} bytes of value {byte} (both values specified in decimal) into "file". -Ed