From Electron Cloud
Line 1: | Line 1: | ||
− | As explained [http://blog.christophersmart.com/2009/11/28/checking-the-progress-of-dd/ here] you can use <tt>pv</tt> to display a progress bar for any data transfer via pipe between processes. So to use dd in the usual way to copy an entire partition or disk, but with a progress bar, write this script as /usr/local/bin/ddp: | + | As explained [http://blog.christophersmart.com/2009/11/28/checking-the-progress-of-dd/ here] you can use <tt>pv</tt> to display a progress bar for any data transfer via pipe between processes. So to use <tt>dd</tt> in the usual way to copy an entire partition or disk, but with a progress bar, write this script as /usr/local/bin/ddp: |
#!/bin/sh | #!/bin/sh |
Latest revision as of 05:09, 12 April 2012
As explained here you can use pv to display a progress bar for any data transfer via pipe between processes. So to use dd in the usual way to copy an entire partition or disk, but with a progress bar, write this script as /usr/local/bin/ddp:
#!/bin/sh # usage: ddp source dest cat ${1} | pv -brtp -s `du -b ${1}` | dd of=${2} bs=4096
Then you can do something like
ddp /path/to/fs.img /dev/sdf1
which is a bit nicer than having to remember the if= and of= parameters and the blocksize, and you get a progress bar to boot.