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:

Re: Better way to do it:

From:

Edward Allcutt <[log in to unmask]>

Reply-To:

Platform Independent Linux List! <[log in to unmask]>

Date:

Mon, 6 Aug 2007 22:54:57 -0400

Content-Type:

multipart/signed

Parts/Attachments:

Parts/Attachments

text/plain (29 lines) , signature.asc (29 lines)

On Mon, 2007-08-06 at 08:51 -0400, Allen S. Rout wrote:
> 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.

Well, if you really don't care about the contents of the files:

touch a b

then compile and run this:

#include <unistd.h>
#include <sys/types.h>

int main() {
   truncate("a", 1042808832);
   truncate("b", 1042808832);

   return 0;
}


-- 
Edward Allcutt <[log in to unmask]>

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives