Is there a way to output the status of dd (on OS X) during the copy process?

I am using dd to copy iso images to a thumb drive. Is there a way to output the status of dd during the copy process?

2 Answers

If you're using OS X, you can press CTRL-T and it will give you a progress update.

2

You can use any command line technique genially available to any *nix user. There are loads of examples:

  1. Ask Ubuntu
  2. command line fu

They all basically lump into one of two categories: send a kill signal (like CTRL-T) or pipe the output through a viewer like pv. I would only recommend pv only if you already use MacPorts or HomeBrew. Simplest example:

dd if=file.iso | pv | dd of=/dev/sda3

If you have more than 1 file to transfer & also want % complete and and ETA, then you have to provide pv the size of the stream it's watching. You can provide the size of a directory tree as

 `SIZE=$(du -sb . | awk '{print $1}')` 

or an entire file system as

 `SIZE=$(df -B1 /dev/sda1 | tail -n1 | tr -s ' ' | cut -d' ' -f2)` 

and then pass the size in to pv as:

dd if=file.iso | pv -s $SIZE | dd of=/dev/sda3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like