The title basically says it all. tee has an option --ignore-interrupts:

-i, --ignore-interrupts   ignore interrupt signals

Can anyone explain/give an example in which situation this is important? Thanks!


When called with -i, tee ignores the interrupt signal (SIGINT), which is normally issued by your terminal when hitting Ctrl+C.

  • 2
    And in which situation this is important? – hakre Jul 4 '14 at 13:01
  • 9
    If you're using tee in a command line pipe like some long running command | tee output, this might be helpful if you want to kill the input provider with Ctrl+C, but want tee to exit gracefully (by reading EOF from the pipe). – Andreas Wiese Jul 4 '14 at 13:46
  • Ah, very useful and a nice description, I was a little irritated. Now I'll add it to some of my scripts. Thanks! – hakre Jul 4 '14 at 15:12
  • 1
    @AndreasWiese: You should add your comment to your answer. – Zaz Feb 6 '17 at 20:16

If tee is used with -i, --ignore-interrupts options, It wont accept any interrupt signals like CNTRL+C ^C or Kill signals Except signal KILL or Signal Terminate.

  • 1
    That's not quite right; tee does exactly what the option states and only ignores SIGINT. All other signals are delivered as without -i. – Andreas Wiese Apr 4 '14 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.