commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
This version was mentioned in the comments. Credits go to flatcap.
There are 2 alternatives - vote for the best!
Running this code will execute dd in the background, and you'll grab the process ID with '$!' and assign it to the 'pid' variable. Now, you can watch the progress with the following:
while true; do kill -USR1 $pid && sleep 1 && clear; done
The important thing to grasp here isn't the filename or location of your input or output, or even the block size for that matter, but the fact that you can keep an eye on 'dd' as it's running to see where you are at during its execution.
Only slightly different than previous commands. The benefit is that your "watch" should die when the dd command has completed. (Of course this would depend on /proc being available)
The previously-posted one-liner didn't work for me for whatever reason, so I ended up doing this instead.
run this in another terminal, were xxxx is the process ID of the running dd process.
the progress will report on the original terminal that you ran dd on
Pressing ctrl-t will display the progress
If you can do better, submit your command here.
You must be signed in to comment.