LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-12-2009, 01:17 PM   #1
alan43
LQ Newbie
 
Registered: Jan 2009
Posts: 5

Rep: Reputation: 0
bash - how to terminate a process after certain time


Hello,

I want to run a program and after for example 3 minutes, if the program is still running, then terminate the process.

How could I write a shell script to achieve this? Thank you very much
 
Old 03-12-2009, 03:35 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,027

Rep: Reputation: 69
you could use the at command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bash] Waiting for a process to terminate or stopping it after some time hamtavs Linux - General 2 12-12-2008 06:25 PM
how ctrl+c works to terminate a process rithik_ghoshal Linux - General 2 11-02-2008 09:01 AM
how to terminate dispatch.fcgi process properly sathiyamoorthy Debian 0 02-27-2008 12:20 AM
ctrl-c to terminate a process does not work geek1234 Linux - Newbie 1 12-26-2007 03:34 PM
time a process within bash script aubrey-calm2 Linux - General 2 06-15-2007 02:39 PM


All times are GMT -5. The time now is 10:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration