Watch the progress of 'dd'

pkill -USR1 ^dd$
The 'dd' command doesn't provide a progress when writing data. So, sending the "USR1" signal to the process will spit out its progress as it writes data. This command is superior to others on the site, as it doesn't require you to previously know the PID of the dd command.
Sample Output
1192775+0 records in
1192774+0 records out
1221400576 bytes (1.2 GB) copied, 407.301 seconds, 3.0 MB/s

3
By: atoponce
2010-05-14 16:25:01

2 Alternatives + Submit Alt

What Others Think

You say its superior but you might not realize that if you're running this as root and there are other users on the system also running dd (I'll admit its not likely), then you're also going to make their dd processes print out their status, which they might not want. The truly superior thing would be if there was a key sequence similar to Ctrl-C that would send a USR1 to the process in the fg.
deltaray · 435 weeks and 5 days ago
true, but what's the likelihood of that happening? really? the only time you use 'dd' is for administrative purposes, like creating swap files, or overwriting data. any other use of dd means you're likely using the wrong utility. :)
atoponce · 435 weeks and 5 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: