News for hackers. Stuff that matters.
Re:dd – Destroyer of Disks (2008) by amelius on Tuesday December 01, 2015 @09:56AM (#10655710)
> Unfortunately, there is no command-line option to have `dd` print progress

How difficult could it be to write a dd command from scratch that does include progress-reporting? I mean, dd is simply reading blocks of data from one file descriptor and writing them to another.

Re:dd – Destroyer of Disks (2008) by itchyouch on Tuesday December 01, 2015 @10:01AM (#10655751)
`pv` (pipeviewer) is usually very useful for tracking progress.

dd if=/dev/zero count=10 bs=1M | pv > file.bin

The other way to see progress on `dd` is to issue a signal 3 (USR1, iirc) to the dd process. kill -3 <dd pid>

Re:dd – Destroyer of Disks (2008) by malcolmputer on Tuesday December 01, 2015 @10:45AM (#10656167)
> The other way to see progress on `dd` is to issue a signal 3 (USR1, iirc) to the dd process. kill -3 <dd pid>

Be careful with this on some distributions and compilations of DD. Purely anecdotal evidence, but in college I had a friend imaging a very large (5400RPM) drive and about 10 hours into the process he lamented that he wished he could see how far along it was.

I popped open a terminal, ps -A |grep dd, kill -USR1 $PID, and it just exited.

He was rather pissed that I lost him 10 hours.

Re:dd – Destroyer of Disks (2008) by jeffcox on Tuesday December 01, 2015 @10:23AM (#10655958)
The aptly named "Progress" also works on dd.

https://github.com/Xfennec/progress

Re:dd – Destroyer of Disks (2008) by dmytrish on Tuesday December 01, 2015 @11:35AM (#10656665)
Actually, you can send signal USR1 to a GNU `dd` process to see the progress:

    $ pgrep dd
    22230
    $ kill -USR1 22230
- and `dd` prints its progress.
Re:dd – Destroyer of Disks (2008) by stewbrew on Tuesday December 01, 2015 @11:46AM (#10656778)
I guess you could pkill directly.

Anyway, this "trick" is mentioned on the man page, which isn't that long. No additional tool required.

Re:dd – Destroyer of Disks (2008) by kenko on Tuesday December 01, 2015 @12:35PM (#10657235)
Huh, on my laptop (running OSX) it's SIGINFO. Read the man pages!
Re:dd – Destroyer of Disks (2008) by TazeTSchnitzel on Tuesday December 01, 2015 @08:15PM (#10660202)
If you're on OS X, it's SIGINFO instead. SIGUSR1 will kill it D:

(This has caught me out before. Oh how I wish these things were standardised...)

Re:dd – Destroyer of Disks (2008) by dmytrish on Wednesday December 02, 2015 @12:19PM (#10664264)
It seems to be a difference between GNU and BSD variants of `dd`.
Re:dd – Destroyer of Disks (2008) by TazeTSchnitzel on Wednesday December 02, 2015 @07:14PM (#10666877)
Yeah, OS X doesn't use the GNU one. It's irritating that there's a difference.
Re:dd – Destroyer of Disks (2008) by mvo on Tuesday December 01, 2015 @10:09AM (#10655830)
Re:dd – Destroyer of Disks (2008) by rca on Tuesday December 01, 2015 @12:08PM (#10656992)
the dd on my machine (from the gnu coreutils 8.24) does just that with the 'status=progress' option.

dd if=/dev/zero of=/dev/null status=progress 4814691328 bytes (4,8 GB) copied, 4,000000 s, 1,2 GB

It's only the size copied and the speed but it's usually enough.

Re:dd – Destroyer of Disks (2008) by BuildTheRobots on Tuesday December 01, 2015 @01:06PM (#10657455)
I tend to run `watch kill -USR1 $(pidof dd)` in a second terminal. Watch executes your command repeatidly (by default every two seconds) so you then get regular dd status updates.
Re:dd – Destroyer of Disks (2008) by relaxitup on Tuesday December 01, 2015 @03:43PM (#10658591)
ddrescue has built in progress reporting, plus you don't have to be bothered with if= and of=

https://www.gnu.org/software/ddrescue/