Tagged Questions
4
votes
3answers
61 views
Terminating a bash shell script running in the background
I often use bash shell scripts to run simple commands for many different files. For example, suppose that I have the following bash shell script, called script.sh, that runs the program/command foo ...
0
votes
2answers
68 views
`ps | grep | kill` aborts my script prematurely [duplicate]
I have a Linux computer that I remotely SSH into using plink on a Windows XP machine. I have the Plink program set to execute commands in a script using automated login:
plink -ssh [domain name] -l ...
6
votes
1answer
259 views
Why does “kill -9 0” end my console session?
I just wonder why kill -9 0 ends my tty console session?
What exactly is PID 0, it is not listed on a ps aux?
1
vote
3answers
194 views
I want to kill all processes that result from the following command
The following command will display all the PID's running for vmstat1:
ps -ef | grep "vmstat 1" | awk '{ print $2 }'
My question is, how do I kill them all, if there's like 20 of them at once?
5
votes
4answers
1k views
Finding the ID of a process and killing it
When ever I need to kill a background process I do ps -e | grep <process_name>
Which prints something like this 1766 ? 00:00:13 conky , Then I use the process ID to kill it like so kill 1766 .
...
2
votes
3answers
2k views
Alternative to `pkill` or `pgrep -f` on cygwin?
Suppose I have starting my process like:
java -DSOME_STRING -jar foo.jar
Then on linux, I can use the following to find or kill this process:
pgrep -f SOME_STRING
pkill -f SOME_STRING
However ...
5
votes
2answers
2k views
killall gives me `no process found ` but ps
Could somebody explain to me the difference between kill and killall? Why doesn't killall see what ps shows?
# ps aux |grep db2
root 1123 0.0 0.8 841300 33956 pts/1 Sl 11:48 0:00 ...