LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Command execution for particular period time (https://www.linuxquestions.org/questions/linux-server-73/command-execution-for-particular-period-time-4175487577/)

natarajan 12-11-2013 03:20 AM

Command execution for particular period time
 
I want to execute a command for a particular peroid of time. If it takes more than desired time then the command should be killled..

In rhel 6 timeout is there.but in rhel 5.4 any option is there..Please revert

colucix 12-11-2013 03:44 AM

In RHEL 5 there is a sample script /usr/share/doc/bash-3.2/scripts/timeout. You can use it or try to write down your own script to suit your needs. In alternative you can try to install the latest coreutils (maybe under /usr/local or even better in a non-standard location, in order to not interfere with the version installed on your system).


All times are GMT -5. The time now is 09:39 PM.