Writing over a drive using /dev/zero

Daniel Wayne Armstrong daniel-HRJVlgn2G/y5aS82P/H3Zg at public.gmane.org
Mon Nov 29 17:18:05 UTC 2010


On Mon, Nov 29, 2010 at 12:02 PM, Colin McGregor <colin.mc151-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Mon, Nov 29, 2010 at 11:55 AM, Daniel Wayne Armstrong
> <daniel-HRJVlgn2G/y5aS82P/H3Zg at public.gmane.org> wrote:
>> I wanted to estimate how much time it would take to write over a 1TB
>> external hard drive connected by USB using "dd" and /dev/zero ... so I
>> generated a sample 1GB file using:
>>
>> touch zero_erase && /usr/bin/time -av -o zero_erase dd if=/dev/zero
>> of=file1g_zero.tmp bs=1M count=1024
>
> Another thought, cache. The drive (and/or the driver) might report
> back that it had written the 1 GB file even if the physical writing
> was not yet complete.

Ahh... good point. Going back and running "sync" afterwards does add a
few seconds.
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list