Timeout command on Mac OS X?

后端 未结 5 1964
长发绾君心
长发绾君心 2020-12-13 05:29

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:

         


        
5条回答
  •  感情败类
    2020-12-13 06:12

    You can do ping -t 10 google.com >nul

    the >nul gets rid of the output. So instead of showing 64 BYTES FROM 123.45.67.8 BLAH BLAH BLAH it'll just show a blank newline until it times out. -t flag can be changed to any number.

提交回复
热议问题