使用kill干掉进程
- root@server9:/data/Collector# nohup sh startDownloadMain.sh &
- [1] 9065
- root@server9:/data/Collector# -bash: root@server9:/data/Collector#: No such file or directory
- [1] 9044
- root@server9:/data/Collector# nohup: ignoring input and appending output to `nohup.out'
- root@server9:/data/Collector# ps a
- PID TTY STAT TIME COMMAND
- 882 tty4 Ss+ 0:00 /sbin/getty -8 38400 tty4
- 888 tty5 Ss+ 0:00 /sbin/getty -8 38400 tty5
- 900 tty2 Ss+ 0:00 /sbin/getty -8 38400 tty2
- 901 tty3 Ss+ 0:00 /sbin/getty -8 38400 tty3
- 903 tty6 Ss+ 0:00 /sbin/getty -8 38400 tty6
- 949 tty1 Ss+ 0:00 /sbin/getty -8 38400 tty1
- 7304 pts/0 Ss+ 0:00 -bash
- 8378 pts/1 Ss 0:00 -bash
- 9044 pts/1 S 0:00 sh startDownloadMain.sh
- 9045 pts/1 Sl 0:00 java -jar DownloadMain.jar
- 9060 pts/1 R+ 0:00 ps a
- root@server9:/data/Collector# kill 9044
- root@server9:/data/Collector# kill 9045
- [1]+ Terminated nohup sh startDownloadMain.sh