Options (4)
-s, --signalbooleanSend a signal to the command after the time limit expires (`TERM` by default, `kill -l` to list all signals)
Example:
timeout {{[-s|--signal]}} {{INT|HUP|KILL|...}} {{5s}} {{sleep 10}}-v, --verbosebooleanSend verbose output to `stderr` showing signal sent upon timeout
Example:
timeout {{[-v|--verbose]}} {{0.5s|1m|1h|1d|...}} {{command}}-p, --preserve-statusbooleanPreserve the exit status of the command regardless of timing out
Example:
timeout {{[-p|--preserve-status]}} {{1s|1m|1h|1d|...}} {{command}}-k, --kill-afterbooleanSend a forceful `KILL` signal after certain duration if the command ignores initial signal upon timeout
Example:
timeout {{[-k|--kill-after]}} {{5m}} {{30s}} {{command}}Examples (5)
Send a signal to the command after the time limit expires (`TERM` by default, `kill -l` to list all signals)
Send verbose output to `stderr` showing signal sent upon timeout
Preserve the exit status of the command regardless of timing out
made by @shridhargupta | data from tldr-pages