Ralph Shumaker wrote:
Barry Gershenfeld wrote:
I have copied smaller drives using dd and writing the results to an interim file. I also did it in pieces, since dd is silent during the process and I wanted to track its progress. Because dd lets you copy a selected section, this works, and also the following trick:

I seem to remember many moons ago Carl presenting a way to get dd to give updates as it worked. I've long forgotten the details and I may even be wrong on who it was that posted it. Carl?

You can send a signal to dd so that it will report its progress. From the man page:

Sending  a  USR1  signal  to  a running ‘dd’ process makes it print I/O
statistics to standard error and then resume copying.

   $ dd if=/dev/zero of=/dev/null& pid=$!
   $ kill -USR1 $pid; sleep 1; kill $pid

     18335302+0 records in 18335302+0 records  out  9387674624  bytes
     (9.4 GB) copied, 34.6279 seconds, 271 MB/s


You could write a script to do a variation on the above to report progress say every 10 seconds similar to netstat.

Gus

--
KPLUG-Newbie@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to