0%

Timeout command on Mac OS X?

You can use

1
brew install coreutils

And then whenever you need timeout, use

1
gtimeout

..instead. To explain why here’s a snippet from the Homebrew Caveats section:

Caveats

All commands have been installed with the prefix ‘g’.

If you really need to use these commands with their normal names, you can add a “gnubin” directory to your PATH from your bashrc like:

1
>PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"

Additionally, you can access their man pages with normal names if you add the “gnuman” directory to your MANPATH from your bashrc as well:

1
>MANPATH="/usr/local/opt/coreutils/libexec/gnuman:$MANPATH"