LISTSERV mailing list manager LISTSERV 16.0

Help for LINUX-L Archives


LINUX-L Archives

LINUX-L Archives


LINUX-L@LISTS.UFL.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

LINUX-L Home

LINUX-L Home

LINUX-L  2007

LINUX-L 2007

Subject:

Better way to do it:

From:

"Allen S. Rout" <[log in to unmask]>

Reply-To:

Allen S. Rout

Date:

Mon, 6 Aug 2007 08:51:13 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (25 lines)

So, for debugging purposes (long story) I want to create a couple of
files which are precisely 

1042808832

bytes long.  We were musing about optimal ways to do this.  I finally
punted and wrote code:

perl -e 
 ' for ( $i=shift; $i>=0; $i-= 1024 ) {read(STDIN,$b,$i<1024?$i:1024); print STDOUT $b } '
 1042808832

note the conceit that I'm pretending to block it. :P

mkfile does not seem to permit the submission of some input stream, so
you get a file full of zeros.

Of course, doing this with /dev/random takes a while. :)


So, how would you-all solve that one?  I have this intuition that
there's a simpler way I just can't find.


- Allen S. Rout

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997

ATOM RSS1 RSS2



LISTS.UFL.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager