对于MacOS(Mavericks),我正在制作一个
shell脚本,以便随着时间的推移收集传输统计信息,用于命令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.
因此,就像在Linux中,我试过:
kill -INFO <pid_of_dd>
这似乎对我有用:
原文链接:/bash/384047.html$dd if=/dev/zero of=/dev/null bs=1k & [1] 33990 $kill -INFO 33990 4787784+0 records in 4787784+0 records out 4902690816 bytes transferred in 4.260769 secs (1150658706 bytes/sec) $kill -INFO 33990 8357846+0 records in 8357846+0 records out 8558434304 bytes transferred in 7.428820 secs (1152058392 bytes/sec) $kill 33990 $ps PID TTY TIME CMD 1342 ttys000 0:00.02 -bash 2290 ttys001 0:00.17 -bash [1]+ Terminated: 15 dd if=/dev/zero of=/dev/null bs=1k $