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

  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 Thread    
Thread Tools Search this Thread Display Modes
Old 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


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
Old 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
Old 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:

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

kill OID : kill your unnecessary process

Old 11-23-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is online now Forum Staff  
Join Date: Jul 2006
Last Activity: 3 March 2015, 1:42 PM EST
Location: Berlin, Germany
Posts: 5,455
Thanks: 59
Thanked 236 Times in 229 Posts
just do a "fg" to bring your process back and stop it with ctrl+c.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:42 PM
Running script in background shahnazurs UNIX for Advanced & Expert Users 3 06-04-2009 02:26 AM
Running the Script in Background. prabhutkl UNIX for Dummies Questions & Answers 2 05-13-2009 01:44 AM
How to stop a script running in remote server from local script mannepalli Shell Programming and Scripting 1 03-04-2009 08:18 PM
How to find the jobs running in background and stop srinivas_paluku Shell Programming and Scripting 7 01-28-2008 08:41 PM

All times are GMT -4. The time now is 02:46 PM.