Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Mar 2013 08:52:01 +1100
From:      Daniel O'Callaghan <danny@clari.net.au>
To:        freebsd-questions@freebsd.org
Subject:   Re: Copying memstick image to a USB (flash/thumb) drive
Message-ID:  <51536A01.6000005@clari.net.au>
In-Reply-To: <6148.1364418621@server1.tristatelogic.com>
References:  <6148.1364418621@server1.tristatelogic.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28/03/2013 8:10 AM, Ronald F. Guilmette wrote:
> Question:
>
>     Why exactly is "conv=sync" is there?
I found this on http://www.mkssoftware.com/docs/man1/dd.1.asp

     If you specified conv=sync and this input block is smaller than the 
specified input block size, dd pads it to the specified size with null 
bytes. When you also specify a block or unblock conversion, dd uses 
spaces instead of null bytes.

So the last block of output gets padded with 0x00 at the end to fill the 
input block size (from bs=...)

> Question:
>
>      Why exactly is the "bs=10240" is there?  Wouldn't the default of 512
>      do just as well?
It would, but then you would have FILESIZE/512 reads and writes instead 
of FILESIZE/10240 reads and writes - 20 times more.
The end result is the same, but the large bs makes the operation go faster.
I routinely use bs=655360 simply because it is a big number divisible by 
512, which I can easily remember.  512000 would do just as well, though...

Danny




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51536A01.6000005>