1

This is with OSX. When I run this in a terminal

scottcarlson$ sudo dd if=Downloads/CentOS-7-x86_64-Everything-1511.iso of=/dev/disk2 2> Desktop/out.txt

and then this in another

tail -f Desktop/out.txt

it only updates the log when I press Ctlt in the first terminal with the dd. Is this because of the nature of dd?

I don't know exactly how it writes to devices, but could it be too demanding for the process to take a break and write to the log?

jasonwryan
  • 73,126

3 Answers3

1

What you're seeing with ctlt is a summary of the running process information, not dd's output.

dd does not output any progress information, unlike what you seem to expect.

If you want to see the actual progress from another terminal window, look at the output file size changing. In this case you're writing to a raw disk, so patience is probably your best friend here.

1

It only updates the log when I press Ctlt in the first terminal with the dd. Is this because of the nature of dd?

Yes. It is in the nature of dd to output its current status when it receives a given signal. Under most OSes, this signal is SIGUSR1, a standard signal but on OS X, it uses for the same a non standard signal named SIGINFO. Moreover, OS X has a tty driver setting that allows to send that specific signal with a key combination, CtrlT, just like CtrlC sends SIGQUIT on all OSes.

I don't know exactly how it writes to devices, but could it be too demanding for the process to take a break and write to the log?

You are precisely asking it to do that with the shortcut. Should you want to have regular automatic updates, nothing forbids you to do a simple shell loop like that one:

while kill -INFO $(pgrep dd); do sleep 5; done

This assumes pgrep is available on OS X. Otherwise, pick the pid of your dd command and use it as kill second argument.

jlliagre
  • 61,204
0

On OS-X, if you run stty -a you'll see that ^T is the key combination for status

% stty -a | grep '\^T'
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;

From man dd

 If dd receives a SIGINFO (see the status argument for stty(1)) signal,
 the current input and output block counts will be written to the standard
 error output in the same format as the standard completion message.  If

The two together mean that while dd is running, hitting ^T will cause a summary display to be written.