On Unix-like operating systems, the dd command copies a file, converting the format of the data in the process, according to the operands specified.
$dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync
$dd if=/dev/sdx1 of=/dev/sdy1 bs=64K conv=noerror,sync
$dd if=/dev/sdX of=/path_to_an_image.img bs=64K conv=noerror,sync
$dd if=/path_to_an_image.img of=/dev/sdX bs=64K conv=noerror,sync
#partition
$dd if=/dev/sdx1 of=/dev/sdy1 bs=64K conv=noerror,sync
#disk
$dd if=/dev/sdX of=/dev/sdY bs=64K conv=noerror,sync
You need to ensure the partition/disk can receive the datas - you will get errors, but the copy is (normally) ok.