How to stop the script which is running in background | Unix Linux Forums | Shell Programming and Scripting

  Unix/Linux Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

How to stop the script which is running in background

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 11-22-2008
Prateek007 Prateek007 is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 23 June 2014, 1:57 PM EDT
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Data How to stop the script which is running in background

Hi

I have a script, which i ran in background, can someone please help in stopping this.

i gave this command:

ksh abc.ksh &

this script sends me a mail every 30 seconds. i have deleted the script but still i am getting the mails. can some one please help me stopping dese.

thanks in advance
Sponsored Links
    #2  
Old Unix and Linux 11-23-2008
replytoshishir replytoshishir is offline
Registered User
 
Join Date: May 2006
Last Activity: 23 November 2012, 1:20 AM EST
Location: Bangalore
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
try this
history | sed 's/[0-9][0-9]*//'


thnx Shishir
Sponsored Links
    #3  
Old Unix and Linux 11-23-2008
summer_cherry summer_cherry is offline Forum Advisor  
Registered User
 
Join Date: Jun 2007
Last Activity: 27 November 2014, 1:23 AM EST
Location: Beijing China
Posts: 1,294
Thanks: 0
Thanked 24 Times in 24 Posts
you may try below:

Code:
ps -ef | grep -i XXXX:  to find your background running process

kill OID : kill your unnecessary process

    #4  
Old Unix and Linux 11-23-2008
DukeNuke2's Unix or Linux Image
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
 
Join Date: Jul 2006
Last Activity: 31 March 2015, 5:10 PM EDT
Location: Berlin, Germany
Posts: 5,465
Thanks: 59
Thanked 238 Times in 231 Posts
just do a "fg" to bring your process back and stop it with ctrl+c.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
running the script in background maitree Shell Programming and Scripting 3 04-18-2011 12:42 PM
Running script in background shahnazurs UNIX for Advanced & Expert Users 3 06-04-2009 01:26 AM
Running the Script in Background. prabhutkl UNIX for Dummies Questions & Answers 2 05-13-2009 12:44 AM
How to stop a script running in remote server from local script mannepalli Shell Programming and Scripting 1 03-04-2009 07:18 PM
How to find the jobs running in background and stop srinivas_paluku Shell Programming and Scripting 7 01-28-2008 07:41 PM



All times are GMT -4. The time now is 09:08 PM.