 |
 |
Basic terminal question.
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
I took a sudo ping -f for testing purposes on my home network. Anyway to quit the process I accidentally pushed ctrl+z (i think) instead of ctrl+c, so the process suspended instead of quitting. Can any one please tell me how I can continue the process? I tried to kill it, but it didn't respond to sudo kill <process>. I am on OS X 10.2.6.
Thanks. 
|

Sniffer gone old-school sig
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Paris, France
Status:
Offline
|
|
have you tried "sudo kill -9 <process id>" ?
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: May 2003
Location: Santa Barbara
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Hey, that worked nicely. Thanks.
I got the process killed finally.
But BTW how do you make use the suspend (ctrl+z) function and make the processes continue afterworths? Thanks. 
|

Sniffer gone old-school sig
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by bracken:
fg
Thanks, thought it wasn't easy figure out what you meant.
From man fg:
Code:
run-fg-editor (M-^Z)
Saves the current input line and looks for a
stopped job with a name equal to the last compo-
nent of the file name part of the EDITOR or VISUAL
environment variables, or, if neither is set, `ed'
or `vi'. If such a job is found, it is restarted
as if `fg %job' had been typed. This is used to
toggle back and forth between an editor and the
shell easily. Some people bind this command to
`^Z' so they can do this even more easily.
But I think I got a picture. 
|

Sniffer gone old-school sig
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
Originally posted by sniffer:
Thanks, thought it wasn't easy figure out what you meant.
I just type "jobs" and then type % and the number of the suspended/backgrounded job I want to bring to the foreground.
Code:
[Alan-Orths-Computer:~] aorth% jobs
[1] Suspended top
[2] - Suspended top
[3] + Suspended top -u
[Alan-Orths-Computer:~] aorth% %1
Then you can quit them normally. 
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Nov 2000
Location: Norway (I eat whales)
Status:
Offline
|
|
Originally posted by [APi]TheMan:
I just type "jobs" and then type % and the number of the suspended/backgrounded job I want to bring to the foreground.
Code:
[Alan-Orths-Computer:~] aorth% jobs
[1] Suspended top
[2] - Suspended top
[3] + Suspended top -u
[Alan-Orths-Computer:~] aorth% %1
Then you can quit them normally.
Great tip! Big thanks!  And easier to use than fg too if you have more than one application on suspend IMO. 
|

Sniffer gone old-school sig
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status:
Offline
|
|
Originally posted by sniffer:
Great tip! Big thanks! And easier to use than fg too if you have more than one application on suspend IMO.
You can also do things like... if you suspended a process with Ctrl-Z but want it to continue in the background and not have to restart it with fg or kill %1 (or whatever)... just type
bg %1
and the job you suspended will be backgrounded. This is also handy if you started a process and it takes longer than you expected to complete, or if you just forgot to do:
somecommand &
You can suspend it (Ctrl-Z) then backgound it (bg %1).
|
|
-DU-...etc...
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|