Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

How to stop the script which is running in background

Shell Programming and Scripting

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


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 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
Old Unix and Linux 11-23-2008
summer_cherry summer_cherry is offline Forum Advisor  
Registered User
Join Date: Jun 2007
Last Activity: 11 November 2016, 3:44 AM EST
Location: Beijing China
Posts: 1,305
Thanks: 0
Thanked 26 Times in 26 Posts
you may try below:

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

kill OID : kill your unnecessary process

Old Unix and Linux 11-23-2008
DukeNuke2's Unix or Linux Image
DukeNuke2 DukeNuke2 is offline Forum Staff  
Join Date: Jul 2006
Last Activity: 23 September 2017, 7:32 PM EDT
Location: Berlin, Germany
Posts: 5,698
Thanks: 73
Thanked 302 Times in 288 Posts
just do a "fg" to bring your process back and stop it with ctrl+c.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 03:24 PM.