1. C:\Users\asn\Desktop>taskkill /?
  2.  
  3. TASKKILL [/S system [/U username [/P [password]]]]
  4. { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]
  5.  
  6. Description:
  7. This tool is used to terminate tasks by process id (PID) or image name.
  8.  
  9. Parameter List:
  10. /S system Specifies the remote system to connect to.
  11.  
  12. /U [domain\]user Specifies the user context under which the command should execute. 指定命令执行的用户上下文
  13.  
  14. /P [password] Specifies the password for the given user context. Prompts for input if omitted. 为指定的用户上下午指定密码
  15.  
  16. /FI filter Applies a filter to select a set of tasks.
  17. Allows "*" to be used. ex. imagename eq acme*
  18.  
  19. /PID processid Specifies the PID of the process to be terminated. 指定将被终止进程的PID, 使用tasklist获取PID
  20. Use TaskList to get the PID.
  21.  
  22. /IM imagename Specifies the image name of the process to be terminated. 指定将被终止的进程映像名
  23. Wildcard '*' can be used to specify all tasks or image names.
  24.  
  25. /T Terminates the specified process and any child processes which were started by it.
  26. 终止指定的进程和其所有子进程
  27.  
  28. /F Specifies to forcefully terminate the process(es). 强制终止进程
  29.  
  30. /? Displays this help message.
  31.  
  32. Filters:
  33. Filter Name Valid Operators Valid Value(s)
  34. ----------- --------------- -------------------------
  35. STATUS eq, ne RUNNING | NOT RESPONDING | UNKNOWN
  36. IMAGENAME eq, ne Image name
  37. PID eq, ne, gt, lt, ge, le PID value
  38. SESSION eq, ne, gt, lt, ge, le Session number.
  39. CPUTIME eq, ne, gt, lt, ge, le CPU time in the format of hh:mm:ss.
  40. hh - hours, mm - minutes, ss - seconds
  41. MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
  42. USERNAME eq, ne User name in [domain\]user
  43. format
  44. MODULES eq, ne DLL name
  45. SERVICES eq, ne Service name
  46. WINDOWTITLE eq, ne Window title
  47.  
  48. NOTE
  49. ----
  50. 1) Wildcard '*' for /IM switch is accepted only when a filter is applied.
  51. 2) Termination of remote processes will always be done forcefully (/F).
  52. 3) "WINDOWTITLE" and "STATUS" filters are not considered when a remote
  53. machine is specified.
  54.  
  55. Examples:
  56. TASKKILL /IM notepad.exe ## 终止进程映像名为 notepad.exe 的进程
  57. TASKKILL /PID 1230 /PID 1241 /PID 1253 /T

  58.   TASKKILL /F /IM cmd.exe /T ## 强制终止进程映像名为cmd.exe进程,并终止从其启动的所有子进程
    例如,终止所有的java.exe进程: taskkill /f /im java.exe /t
  59.  
  60. TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*" ## 终止进程PID > 1000 且 window title 不等于 untitle* 的所有进程
  61.  
  62. TASKKILL /F /FI "USERNAME eq NT AUTHORITY\SYSTEM" /IM notepad.exe
  63.  
  64. TASKKILL /S system /U domain\username /FI "USERNAME ne NT*" /IM *
  65. TASKKILL /S system /U username /P password /FI "IMAGENAME eq note*"

findstr命令

  1. C:\Users\asn\Desktop>findstr /?
  2. Searches for strings in files.
  3.  
  4. FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P]
  5. [/F:file] [/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]
  6. strings [[drive:][path]filename[ ...]]
  7.  
  8. /B Matches pattern if at the beginning of a line.
  9. /E Matches pattern if at the end of a line.
  10.  
  11. /L Uses search strings literally.
  12.  
  13. /R Uses search strings as regular expressions.
  14.  
  15. /S Searches for matching files in the current directory and all subdirectories.
  16. 在当前目录和其子目录搜素匹配的文件
  17.  
  18. /I Specifies that the search is not to be case-sensitive. 默认搜素大小写敏感,指定大小写不敏感
  19.  
  20. /X Prints lines that match exactly. 打印出匹配的行
  21. /V Prints only lines that do not contain a match.
  22.  
  23. /N Prints the line number before each line that matches. 在每个匹配行前,打印行号
  24.  
  25. /M Prints only the filename if a file contains a match. 如果文件包含匹配,仅打印文件名
  26.  
  27. /O Prints character offset before each matching line. 在每个匹配行前,打印字符偏移
  28.  
  29. /P Skip files with non-printable characters. 忽略带有不可打印字符的文件
  30.  
  31. /OFF[LINE] Do not skip files with offline attribute set. 不要忽略设置了offline属性的文件
  32.  
  33. /A:attr Specifies color attribute with two hex digits. See "color /?" 使用2个十六进制数指定color属性
  34.  
  35. /F:file Reads file list from the specified file(/ stands for console). 从指定的文件中读取文件列表
  36.  
  37. /C:string Uses specified string as a literal search string. 使用指定的字符串作为一个字面搜索串
  38.  
  39. /G:file Gets search strings from the specified file(/ stands for console). 从指定的文件中获取搜索字符串
  40.  
  41. /D:dir Search a semicolon delimited list of directories 搜索一个逗号分隔的目录
  42.  
  43. strings Text to be searched for. 待搜索的文本
  44.  
  45. [drive:][path]filename
  46. Specifies a file or files to search. 指定一个文件、一些文件用于搜索
  47.  
  48. Use spaces to separate multiple search strings unless the argument is prefixed with /C.
  49. For example,
  50. 'FINDSTR "hello there" x.y' searches for "hello" or "there" in file x.y. ## FINDSTR "hello there" x.y 搜索hello或there
  51. 'FINDSTR /C:"hello there" x.y' searches for "hello there" in file x.y. ## FINDSTR /C:"hello there" x.y 把"hello there"当做一个整体在x.y文件中搜索
  52.  
  53. Regular expression quick reference:
  54. . Wildcard: any character
  55. * Repeat: zero or more occurrences of previous character or class
  56. ^ Line position: beginning of line
  57. $ Line position: end of line
  58. [class] Character class: any one character in set
  59. [^class] Inverse class: any one character not in set
  60. [x-y] Range: any characters within the specified range
  61. \x Escape: literal use of metacharacter x
  62. \<xyz Word position: beginning of word
  63. xyz\> Word position: end of word
  64.  
  65. For full information on FINDSTR regular expressions refer to the online Command Reference.

dos taskkill 命令的更多相关文章

  1. tasklist、taskkill命令使用

    tasklist.taskkill命令使用 在Windows XP中新增了两个命令行工具“tasklist.taskkill”.通过“Ctrl+Alt+Del”组合键,打开“任务管理器”就可以查看到本 ...

  2. C++使用taskkill 命令强制结束进程

    一:查看 taskkill 命令和参数的方法 window系统下,快捷键win + R 打开运行 ,输入cmd回车,在 cmd 里面输入: taskkill /?  二:语法: taskkill [/ ...

  3. DOS批处理命令判断操作系统版本、执行各版本对应语句

    DOS批处理命令判断操作系统版本.执行各版本对应语句   昨天在家里试用  netsh interface ip set address 这些命令更改上网IP.DNS.网关等,今天将那些代码拿来办公室 ...

  4. 操作系统-实验一、DOS使用命令实验

    实验一.DOS使用命令实验 一.实验目的      DOS是市场上早期获得巨大成功的桌面操作系统,现在很多同学都不太熟悉.本实验的目的就是让同学们读者从操作系统理论的观点来重新认识它们,了解和掌握DO ...

  5. DOS批处理命令递归删除给定的文件(夹),兼VC工程清理小工具

    使用dos批处理命令递归删除指定的文件(夹): (下面内容针对清理VC工程!自己按说明任意修改) 2014-06-10修改:删除前增加了[y,n]询问: echo off rem 递归删除当前文件下指 ...

  6. dos choice 命令

    dos choice 命令 choice /c YNC /m "Are you sure?" if %errorlevel%==1 goto Y if %errorlevel%== ...

  7. [No0000A5]批处理常用命令大全&&21个DOS常用命令

    1.Echo 命令打开回显或关闭请求回显功能,或显示消息.如果没有任何参数,echo 命令将显示当前回显设置.语法echo [{on|off}] [message]Sample: echo off e ...

  8. 了解一些dos常用命令

    备注:[] ——可选项   <>——必填项 DOS 特殊命令应用技巧: 向上箭头“↑”和向下箭头“↓”——回看上一次执行的命令 "Ctrl+C"组合——中断操作 在命令 ...

  9. taskkill命令应用

    taskkill命令用来在控制台下杀死进程 举例: 杀死PID为4276的进程 E:\android-sdk-windows\tools>taskkill /PID 4276 错误: 无法终止 ...

随机推荐

  1. asp.net技术(公共方法)

    #region 获取 本周.本月.本季度.本年 的开始时间或结束时间 /// <summary> /// 获取开始时间 /// </summary> /// <param ...

  2. CEF 框架使用集锦

    CEF 框架使用集锦: 参考:〓https://github.com/NetDimension/NanUI/wiki/%E5%BC%80%E5%A7%8B%E4%BD%BF%E7%94%A8NanUI ...

  3. 找不到windows.h源文件

    一.找不到源文件window.h 今天在网上下了个程序,在公司用VS2015能打开,在家用VS2017却打不开,提示找不到源文件window.h,因为引用了这个头文件,但是却找不到 解决方案: 右侧解 ...

  4. 强力Django+杀手级xadmin开发在线教育网站

    强力Django+杀手级xadmin开发在线教育网站采用 Python3.7全新开发 整个课程都看完了,这个课程的分享可以往下看,下面有链接,之前做java开发也做了一些年头,也分享下自己看这个视频的 ...

  5. shell 中数组学习

         因为应用shell的时间不是太长.对于数组在实际项目中没有接触过.今天在需要把相似于:a=1,2,3,4这种东西转换. 之前用的方法是用awk,分别取出.所以今天想是否有更好更简洁的方法-- ...

  6. python中函数和方法区别,以及如何给python类动态绑定方法和属性(涉及types.MethodType()和__slots__)

    网上有很多同义但不同方式的说法,下面的这个说法比较让你容易理解和接受 与类和实例无绑定关系的function都属于函数(function): 与类和实例有绑定关系的function都属于方法(meth ...

  7. Markdown Linux

    如何在Linux下使用Markdown进行文档工作 学习于: http://www.ituring.com.cn/article/10044 Markdown 官网: http://daringfir ...

  8. IntelliJ Idea 复制粘贴的问题

    分析 尝试从外部复制内容向Idea工作空间内粘贴文件时,有一定的几率会发生复制粘贴失败的问题:复制了新的内容,粘贴的却还是早些时候复制的旧的内容. 我使用的IDEA是最新版(2016.1.3),操作系 ...

  9. PHPCMS快速建站系列之常用标签

    <span class="Nmore"><a href="/index.php?m=content&c=index&a=lists&am ...

  10. More Effective C++: 05技术(25-28)

    25:将constructor 和 non-member functions 虚化 所谓 virtual constructor是某种函数,视其输入可产生不同类型的对象.比如下面的代码: class ...