Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Slightly related: what many people don't know is that on OS X and BSDs, commands often react to SIGINFO (Ctrl-t), giving progress information. E.g. from the cp man page:

     If cp receives a SIGINFO (see the status argument for stty(1)) signal,
     the current input and output file and the percentage complete will be
     written to the standard output.


Very cool. Is there a reason why Linux tools don't react to SIGINFO, other than just "not implemented"?


As far as I'm aware, Linux tools do react to various signals, just not SIGINFO because it comes from BSD and Linux just doesn't use that particular signal.

You can check dd progress by sending USR1, for example.


I just wish there was a control sequence keystroke like Ctrl+I to get programs to do that.


dd has a similar feature, but with SIGUSR (kill -USR1), and it works on Linux too.


How do you fire that signal from the console ?


  pkill -USR1 dd
You'll need to use ps to get the pid if you've got multiple dd instances running, and you'll of course need to run that as root if your dd instance is running as root.


By using

    kill -s <Signal> <Process ID>


Personally, I think the experience of typing ctrl+t is better than using pkill. Just 2 keyboard taps and you're done.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: