timeout

Run a command with a time limit.

Install

All systems
curl cmd.cat/timeout.sh
Debian Debian
apt-get install coreutils
Ubuntu
apt-get install coreutils
Alpine
apk add coreutils
Arch Arch Linux
pacman -S coreutils
image/svg+xml Kali Linux
apt-get install coreutils
CentOS
yum install coreutils
Fedora
dnf install coreutils
OS X
brew install coreutils
Raspbian
apt-get install coreutils
Docker
docker run cmd.cat/timeout timeout powered by Commando

Run a command with a time limit.

  • Run `sleep 10` and terminate it, if it runs for more than 3 seconds:
    timeout 3s sleep 10
  • Specify the signal to be sent to the command after the time limit expires. (By default, TERM is sent):
    timeout --signal INT 5s sleep 10

© tl;dr; authors and contributors