Re: Recommended method for creating file of zeros?

From: Kevin Hunter <hunteke(at)earlham(dot)edu>
To: "Jason L(dot) Buberel" <jason(at)buberel(dot)org>
Cc: PostgreSQL General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recommended method for creating file of zeros?
Date: 2007-10-14 07:46:57
Message-ID: 4711C971.6070007@earlham.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trevor Talbot 2007-10-14 08:56:24 Re: atomic commit; begin for long running transactions , in combination with savepoint.
Previous Message Jason L. Buberel 2007-10-14 06:17:34 Recommended method for creating file of zeros?