LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 12: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, 02:35 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

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


Reply



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 05:25 PM
how ctrl+c works to terminate a process rithik_ghoshal Linux - General 2 11-02-2008 08:01 AM
how to terminate dispatch.fcgi process properly sathiyamoorthy Debian 0 02-26-2008 11:20 PM
ctrl-c to terminate a process does not work geek1234 Linux - Newbie 1 12-26-2007 02:34 PM
time a process within bash script aubrey-calm2 Linux - General 2 06-15-2007 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 PM.

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
Open Source Consulting | Domain Registration