【linux】进程命令

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Time: 2018/8/16
# @Author: xfLi


#1、查看特定(python)进程
ps -aux | grep python

#2、显示现行终端机下的所有程序,包括其他用户的程序
ps a

#3、使用kill命令结束进程
kill -9 [PID号]

#4、killall 的使用
Usage: killall [OPTION]... [--] NAME...
       killall -l, --list
       killall -V, --version

  -e,--exact          require exact match for very long names
  -I,--ignore-case    case insensitive process name match
  -g,--process-group  kill process group instead of process
  -y,--younger-than   kill processes younger than TIME
  -o,--older-than     kill processes older than TIME
  -i,--interactive    ask for confirmation before killing
  -l,--list           list all known signal names
  -q,--quiet          don't print complaints
  -r,--regexp         interpret NAME as an extended regular expression
  -s,--signal SIGNAL  send this signal instead of SIGTERM
  -u,--user USER      kill only process(es) running as USER
  -v,--verbose        report if the signal was successfully sent
  -V,--version        display version information
  -w,--wait           wait for processes to die

killall -u lixiaofeng



猜你喜欢

转载自blog.csdn.net/qq_30159015/article/details/81978987