timeout
SafeRun with a time limit
timeout 30 <command>
Kills a command after a deadline — make scripts safe against hangs in remote queries and flaky tools.
Examples
timeout 10 curl -s https://api.example.com/healthHealth check that gives up at 10 s
Syntax
timeout [-s signal] <duration> <command>
Before you run it
Only kills the wrapped command.
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store