Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

timeout --> command not found in linux server

I am using linux server from cPanel. Now I need to use one of the linux command to run. And the command is 'timeout'. My command is something as below

$timeout 2s ./myexecutable < input > output

This is just running ok in my linux machine. But I want to run it in server(linux). But it is not running out there. I saw error log using 2>$1 . and it says command not found.

So how do I specify the path. That means how can I know the exact path to run it.

I am very new to this type of server stuff, so please don't be rude :D.. whatever you know please help me to get out of it. thank you

like image 915
user2958359 Avatar asked Aug 04 '26 21:08

user2958359


1 Answers

On Mac, you can use gtimeout from the coreutils package. To install it, run

brew install coreutils

If you need the command to be called "timeout" then you can alias it.

alias timeout="gtimeout"
like image 145
Jesse Shieh Avatar answered Aug 07 '26 12:08

Jesse Shieh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!