[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT = just a quicky

On Friday, February 1, 2002, at 06:39  PM, Damir Horvat wrote:

On Fri, 1 Feb 2002 15:22:51 +0800
"Jason Lim" <maillist@jasonlim.com> wrote:


Just wanted to know... how do I make a file with all 1s or 0s or
something with a certain size (eg. 100Mb)?

I was thinking 'dd something' but there is probably a better way?

why not dd?

dd if=/dev/zero of=/tmp/yourfile bs=1m count=100

Also, piping through tr could be handy.

dd if=/dev/zero bs=1m count=100 |tr "\0" "1" > /tmp/yourfile

David Stanaway
Personal: david@stanaway.net
Work: david@netventures.com.au

Reply to: