timeout - GNU Coreutils Compatible timeout Command
Image by T5, source: https://www.pixiv.net/artworks/108988374
A standalone implementation of the timeout command.
Purpose
macOS does not include the GNU Coreutils timeout command by default. While you can install the full coreutils package via Homebrew, this introduces many unnecessary commands and potential path conflicts.
This project provides a standalone, lightweight timeout command implementation that allows you to use timeout functionality without installing the entire GNU Coreutils suite.
Installation
Via homebrew
brew install aisk/homebrew-tap/timeout
From source
make sudo cp timeout /usr/local/bin/
Usage Examples
# Run command with 5 second timeout timeout 5s long-running-command # 2 minute timeout timeout 2m backup-script.sh
Building
make # Compile make clean # Clean build artifacts make format # Format code