Select Page

If you want to backup a disk or just copy disk to new source dd is the command to do this.
PV(Pipe View) is a good tool to show progress of transfer, but to use PV we might need a size so the % is correct.

To find size to a cd/dvd-rom
Replace X with actual disk number/letter:

OSX:

diskutil info /dev/diskX

There will be a block with “Disk Size:” get the size in Bytes, should be inside ()

*nix:

fdisk -l /dev/sdX

There is a block with “Disk /dev/sdX” get the disksize in bytes

Now lets duplicate

now we have the source bytes size that we can now use with pv to get a complete percent.

Replace X with source diskX og sdX, change SIZE to bytes you just found, and Y to the destination disk

dd if=/dev/X | pv -s SIZE | dd of=/dev/Y