The {{Pkg|dd}} command copies and converts raw data at a low level. The block size option (i.e. {{ic|<nowiki>bs=</nowiki>}} defines the number of bytes involved in a single read or write operation. There is a great deal of confusion about the optimal value for this option.<sup>[http://serverfault.com/questions/4906/using-dd-for-disk-cloning]</sup>

+

If you have a [[Wikipedia:Advanced Format|Advanced Format]] hard drive it is recommended that you specify a block size larger than the default 512 bytes. To speed up the overwriting process choose a block size matching your drive's physical geometry by appending the block size option to the dd command (i.e. {{ic|<nowiki>bs=4096</nowiki>}}).

If you have a [[Wikipedia:Advanced Format|Advanced Format]] hard drive it is recommended that you specify a block size larger than the default 512 bytes. To speed up the overwriting process choose a block size matching your drive's physical geometry by appending the block size option to the dd command (i.e. {{ic|<nowiki>bs=4096</nowiki>}}).

−

To quickly find the block size of the device issue the following command:

+

== Print block size ==

+

To print the block size of the device issue the following command:

# dumpe2fs -h /dev/sdX | grep 'Block size:'

# dumpe2fs -h /dev/sdX | grep 'Block size:'

For more information read [http://www.linfo.org/get_block_size.html How to Find the Block Size] on The Linux Information Project and the [http://www.gnu.org/software/coreutils/manual/html_node/Block-size.html#Block-size Block size] section in the core GNU utilites manual.

For more information read [http://www.linfo.org/get_block_size.html How to Find the Block Size] on The Linux Information Project and the [http://www.gnu.org/software/coreutils/manual/html_node/Block-size.html#Block-size Block size] section in the core GNU utilites manual.

−

== Examples ==

+

== Disparate examples ==

This page lists examples of the {{Pkg|dd}} block size flag (i.e. {{ic|<nowiki>bs=</nowiki>}}) on English language pages. The following examples all come from the first page of a [https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=bs%3D&go=Go search for "bs="].

This page lists examples of the {{Pkg|dd}} block size flag (i.e. {{ic|<nowiki>bs=</nowiki>}}) on English language pages. The following examples all come from the first page of a [https://wiki.archlinux.org/index.php?title=Special%3ASearch&search=bs%3D&go=Go search for "bs="].

Revision as of 22:11, 24 September 2012

The dd command copies and converts raw data at a low level. The block size option (i.e. bs= defines the number of bytes involved in a single read or write operation. There is a great deal of confusion about the optimal value for this option.[1]

If you have a Advanced Format hard drive it is recommended that you specify a block size larger than the default 512 bytes. To speed up the overwriting process choose a block size matching your drive's physical geometry by appending the block size option to the dd command (i.e. bs=4096).