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?
Solution 1:
If you're using OS X, you can press CTRL-T and it will give you a progress update.
Solution 2:
You can use any command line technique genially available to any *nix user. There are loads of examples:
- Ask Ubuntu
- http://pfynotes.blogspot.com/2011/05/monitoring-progress-of-dd-on-osx.html
- 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