Author Topic: Ever wanted a progress report from "dd" ?  (Read 3403 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Penguin

  • Administrator
  • Hero Member
  • *****
  • Posts: 1420
  • Karma: 10018
  • Gender: Male
    • View Profile
    • Linux in the UK
    • Awards
Ever wanted a progress report from "dd" ?
« on: March 01, 2011, 07:48:10 pm »
"dd" is a standard Unix tool for copying files around at block level. It's very handy when you're copying data to and from raw devices, or if you're working with CD ISO images etc.

However, it's generally a case of tell it what to do and wait .. and wait .. and then it'll finish, without giving much warning.
It's a bit of a pain if you don't really know how long it's going to take based on previous experience.

Enter 'pv'.

instead of;

dd if=input.img of=/dev/blockdev bs=1M

How about;

dd if=input.img bs=1M | pv -pter | dd of=/dev/blockdev

On Ubuntu;

sudo apt-get install pv

First .. then take a look at the man page .. very useful tool .. it also has a rate limiter so's you can avoid overloading your live server while copying!
« Last Edit: March 02, 2011, 08:59:58 am by Mad Penguin »

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal