News for hackers. Stuff that matters.
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by danieldk on Saturday July 12, 2014 @07:28AM (#8024285)
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.
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by ak217 on Saturday July 12, 2014 @04:59PM (#8025771)
Very cool. Is there a reason why Linux tools don't react to SIGINFO, other than just "not implemented"?
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by na85 on Saturday July 12, 2014 @07:47PM (#8026138)
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.

Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by ak217 on Sunday July 13, 2014 @12:29AM (#8026650)
I just wish there was a control sequence keystroke like Ctrl+I to get programs to do that.
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by ramidarigaz on Saturday July 12, 2014 @12:19PM (#8024936)
dd has a similar feature, but with SIGUSR (kill -USR1), and it works on Linux too.
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by ysangkok on Saturday July 12, 2014 @01:49PM (#8025238)
How do you fire that signal from the console ?
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by koenigdavidmj on Saturday July 12, 2014 @03:53PM (#8025622)

  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.
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by spoiler on Saturday July 12, 2014 @02:17PM (#8025325)
By using

    kill -s <Signal> <Process ID>
Re:Show HN: Linux tool to show progress for cp, rm, dd, etc. by akshatpradhan on Saturday July 12, 2014 @08:34PM (#8026217)
Personally, I think the experience of typing ctrl+t is better than using pkill. Just 2 keyboard taps and you're done.