From: John Kelly on
On Wed, 11 Aug 2010 18:02:55 +0200, Janis Papanagnou
<janis_papanagnou(a)hotmail.com> wrote:

>On 11/08/10 17:51, John Kelly wrote:
>> On Wed, 11 Aug 2010 15:46:35 +0000, John Kelly <jak(a)isp2dial.com> wrote:
>>
>>> /dev/urandom is better than /dev/random for junk data. Or maybe even
>>> /dev/zero piped to hexdump. You can use a format with hexdump to
>>> eliminate spaces in the output. I did not see a way to do that with od.
>>
>> Whoops. hexdump can read /dev/zero directly, no pipe needed:
>>
>> hj:~# hexdump -n 4 -v -e '/1 "%.2x"' /dev/zero
>> 00000000
>>
>> Just change the "-n 4" to the number of bytes you want.
>
>Okay. Then I'd use a shell builtin...
>
> printf "%0*d", 78, 0
>
>...will print 78 zeroes.

I wonder if that will scale to large numbers.



--
Web mail, POP3, and SMTP
http://www.beewyz.com/freeaccounts.php

From: Janis Papanagnou on
On 11/08/10 18:07, John Kelly wrote:
> On Wed, 11 Aug 2010 18:02:55 +0200, Janis Papanagnou
> <janis_papanagnou(a)hotmail.com> wrote:
>
>> On 11/08/10 17:51, John Kelly wrote:
>>> On Wed, 11 Aug 2010 15:46:35 +0000, John Kelly <jak(a)isp2dial.com> wrote:
>>>
>>>> /dev/urandom is better than /dev/random for junk data. Or maybe even
>>>> /dev/zero piped to hexdump. You can use a format with hexdump to
>>>> eliminate spaces in the output. I did not see a way to do that with od.
>>>
>>> Whoops. hexdump can read /dev/zero directly, no pipe needed:
>>>
>>> hj:~# hexdump -n 4 -v -e '/1 "%.2x"' /dev/zero
>>> 00000000
>>>
>>> Just change the "-n 4" to the number of bytes you want.
>>
>> Okay. Then I'd use a shell builtin...
>>
>> printf "%0*d", 78, 0
>>
>> ...will print 78 zeroes.
>
> I wonder if that will scale to large numbers.

The OP asked for 5 MB and the ksh-builtin printf supports more than 1 GB
of 0-paddings, likely due to the internal restriction on how large an
integral number can be; so I presume it supports up to and not more than
2^31-1 digits that way.

Janis

>
>
>

From: srikanth on
On Aug 11, 11:21 pm, Janis Papanagnou <janis_papanag...(a)hotmail.com>
wrote:
> On 11/08/10 18:07, John Kelly wrote:
>
>
>
> > On Wed, 11 Aug 2010 18:02:55 +0200, Janis Papanagnou
> > <janis_papanag...(a)hotmail.com> wrote:
>
> >> On 11/08/10 17:51, John Kelly wrote:
> >>> On Wed, 11 Aug 2010 15:46:35 +0000, John Kelly <j...(a)isp2dial.com> wrote:
>
> >>>> /dev/urandom is better than /dev/random for junk data.  Or maybe even
> >>>> /dev/zero piped to hexdump.  You can use a format with hexdump to
> >>>> eliminate spaces in the output.  I did not see a way to do that with od.
>
> >>> Whoops.  hexdump can read /dev/zero directly, no pipe needed:
>
> >>> hj:~# hexdump -n 4 -v -e '/1 "%.2x"' /dev/zero
> >>> 00000000
>
> >>> Just change the "-n 4" to the number of bytes you want.
>
> >> Okay. Then I'd use a shell builtin...
>
> >>  printf "%0*d", 78, 0
>
> >> ...will print 78 zeroes.
>
> > I wonder if that will scale to large numbers.
>
> The OP asked for 5 MB and the ksh-builtin printf supports more than 1 GB
> of 0-paddings, likely due to the internal restriction on how large an
> integral number can be; so I presume it supports up to and not more than
> 2^31-1 digits that way.
>
> Janis
>
>

even /dev/random is showing junk data. How can i generate a file with
data where human can readable.
From: Bill Marcum on
On 2010-08-13, srikanth <srikanth007m(a)gmail.com> wrote:
>>
>
> even /dev/random is showing junk data. How can i generate a file with
> data where human can readable.

od </dev/random

--
Vacuums are nothings. We only mention them to let them know we know
they're there.