Timeout command on Mac OS X?

Viewed 74411

Is there an alternative for the timeout command on Mac OSx. The basic requirement is I am able to run a command for a specified amount of time.

e.g:

timeout 10 ping google.com

This program runs ping for 10s on Linux.

6 Answers

As kvz stated simply use homebrew:

brew install coreutils

Now the timeout command is already ready to use - no aliases are required (and no gtimeout required, although also available).

Related