How do I kill the last spawned background task in linux?
Example:
doSomething
doAnotherThing
doB &
doC
doD
#kill doB
????
How do I kill the last spawned background task in linux?
Example:
doSomething
doAnotherThing
doB &
doC
doD
#kill doB
????
You need its pid... use "ps -A" to find it.
Just use the killall command:
killall taskname
for more info and more advanced options, type "man killall".