Re: Recommended method for creating file of zeros? - Mailing list pgsql-general

From Kevin Hunter
Subject Re: Recommended method for creating file of zeros?
Date
Msg-id 4711C971.6070007@earlham.edu
Whole thread Raw
In response to Recommended method for creating file of zeros?  ("Jason L. Buberel" <jason@buberel.org>)
Responses Re: Recommended method for creating file of zeros?  ("Jason L. Buberel" <jason@buberel.org>)
List pgsql-general
At 2:17a -0400 on 14 Oct 2007, Jason L. Buberel wrote:
> create file '00A4' and fill it with 256k zeros. Is there a quick and
> easy linux-way of creating such a beast?

The tool is 'dd' and /dev.  /dev/zero in this case.  The summary of what
you asked:

$ dd if=/dev/zero of=./zblah count=1 bs=256k
1+0 records in
1+0 records out
262144 bytes (262 kB) copied, 0.00130993 seconds, 200 MB/s

$ dd if=/dev/zero of=./zblah count=1 bs=256000
1+0 records in
1+0 records out
256000 bytes (256 kB) copied, 0.00136915 seconds, 187 MB/s

HTH,

Kevin

pgsql-general by date:

Previous
From: "Jason L. Buberel"
Date:
Subject: Recommended method for creating file of zeros?
Next
From: "Trevor Talbot"
Date:
Subject: Re: atomic commit;begin for long running transactions , in combination with savepoint.