Print

Print


What about just popping in your favorite music cd and pulling data from that?

Personally I'd use dd to get the right file size (if block size will
take you over, make it short and then append)

On 8/6/07, Edward Allcutt <[log in to unmask]> wrote:
> 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]>
>
>


-- 
Raymond Page