Kill snoops running in background


 
Thread Tools Search this Thread
Operating Systems Solaris Kill snoops running in background
# 1  
Old 03-12-2010
Kill snoops running in background

Hi,

I want to run 2 snoop commands in the background and would like to be able to kill them when I want to. What is the best way to do that at the command line?

if I do a fg at the terminal, will that bring only the snoop that I got running myself so I stop them with a CTRL_C or will that bring other possible processes running in the background?
# 2  
Old 03-12-2010
You can see what background jobs are running, using:

Code:
jobs

And you can kill them with:
Code:
kill %1
kill %2
etc.

Or bring them to the foreground, or background with:
Code:
fg %1
bg %1
etc.

fg will only bring jobs you started in the current shell to the foreground, not any other process.

If you want to kill something else you should use the ps and grep commands to find the PID, and then kill that.
# 3  
Old 03-14-2010
If you have no other snoop running you want to keep alive, a simple way to kill all of the running ones would be:
Code:
pkill snoop

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Running process in the background

Hi, I have this simple c program that creates duplicate process with fork(): #include <sys/types.h> main() { if (fork() == 0) while(1); else while(1); } I tried running it in the background gcc -o test first.c test & And I got this list of running process: (4 Replies)
Discussion started by: uniran
4 Replies

2. Shell Programming and Scripting

Running scripts in background

Hi, below is my master script wihch inturn runs 2 scripts in background #master_script.sh ./subscript1.sh & ./subscript2.sh & executed the master_script.sh from unix command prompt $ ./master_script.sh it is executing the subscripts and they are completing fine, however master_script.sh is... (2 Replies)
Discussion started by: JSKOBS
2 Replies

3. Shell Programming and Scripting

Running in background

Hello, I was trying to make some processes to run at background and went to a problem. First I tried just to loop in one line something like this: for i in {1..10}; do echo 'hello world' &; done; but it pops a syntax error, so I tried several ways to fix it but wasn't able to understand... (2 Replies)
Discussion started by: Rash
2 Replies

4. UNIX for Dummies Questions & Answers

kill a command I am running / then put it to background

I have a command running in the foreground (and so my term window is locked up) and I want to kill it, then resume it in the background and go home. It is creating a zip file, and the file will be written to the current directory - no std in / std out issues. How do I do this? Kill it with a... (3 Replies)
Discussion started by: hindesite
3 Replies

5. Linux

How to kill background process?

Hi I have one file one.sh. In one.sh file their are 5 perl script 1.pl, 2.pl, 3.pl,4.pl, 5.pl. I ran the one.sh file in background and now I want to kill the one.sh file after 5 min. but its not killing the processs. Please let me know how to kill the background process. (2 Replies)
Discussion started by: lakshmikant
2 Replies

6. Shell Programming and Scripting

kill PID running in background in for loop

Guys, can you help me in killing the process which is running in back ground under for loop I am not able to find the PID using ps -afx|grep <word in command I entered> (1 Reply)
Discussion started by: mohan_xunil
1 Replies

7. Solaris

About running processes in background

Hi, I need to establish a procedure that will start an application in background each time my remote Solaris server is (re)started. This would be a kind of daemon. I am no sysadmin expert, so I am looking for pointers. How should I proceed? What are the main steps? Thanks, JVerstry (9 Replies)
Discussion started by: JVerstry
9 Replies

8. Shell Programming and Scripting

How to kill background process

Hi, I am new to scripting and learning. please share your knowledge with me. I have a scenario, that i need to trace whether the background script is still running or not? if it was running i need to kill it. i am using the below scripts , but it is not working i dont know why :confused:.... (4 Replies)
Discussion started by: G.K.K
4 Replies

9. Shell Programming and Scripting

running in background

i have a script called server.sh. how to run this script in backgroung using nohup command (5 Replies)
Discussion started by: ali560045
5 Replies

10. UNIX for Dummies Questions & Answers

running process in background

I'm trying to install a solaris 9 patch cluster and when I try to use & to run in background it won't allow me to enter in my sudo password so it fails the install and sudo auth. Does Solaris not have screen like linux? If & will work what am I doing wrong? sudo ./install_cluster -q & is... (3 Replies)
Discussion started by: kingdbag
3 Replies
Login or Register to Ask a Question