DOS Taskkill command

Source: Internet
Author: User

C:\users\asn\desktop>taskkill/? TASKKILL [/S system [/u username [/p [password]]] {[/FI filter] [/pid ProcessID |/im imagename]} [/T] [/f]desc Ription:this tool is used to terminate the tasks by Process ID (PID) or image name.    Parameter List:/S system Specifies the remote system to connect to. /u [domain\]user Specifies the user context under which the command should execute. Specifies the user context for the command execution/p [password] specifies the password for the given user context. Prompts for input if omitted.                           Specifies the password for the specified user on the afternoon/fi filter applies a filter to select a set of tasks. Allows "*" to be used. Ex. imagename eq acme*/pid processid Specifies the PID of the process to be terminated.    Specifies the PID that will be terminated, using TaskList to obtain the PID use TaskList to get the PID. /im imagename Specifies the image name of the process to be terminated. Specifies the process image name to be terminated Wildcard ' * ' Can be usEd to specify all tasks or image names.                           /T terminates the specified process and any child processes which were started by it. Terminates the specified process and all its child processes/F Specifies to forcefully terminate the process (es).                     Force terminate process/? Displays this help message. Filters:filter Name Valid Operators Valid Value (s)-------------------------------------- -------------STATUS eq, ne RUNNING | Not Responding | UNKNOWN IMAGENAME eq, ne Image name pid eq, NE, GT, lt, GE, le PID value sess    ION eq, NE, GT, lt, GE, le Session number.                                            CPUTime eq, NE, GT, lt, GE, le CPU time in the format of HH:MM:SS. Hh-hours, mm-minutes, ss-seconds memusage eq, NE, GT, lt, ge, le Memory usage in KB USERNAME eq, NE User name in [Domain\]user                                           Format MODULES eq, ne DLL name SERVICES eq,  NE Service name windowtitle eq, ne Window title NOTE----1) Wildcard    ' * ' for/im switch is accepted-a filter is applied.    2) Termination of remote processes would always be done forcefully (/f). 3) "WindowTitle" and "STATUS" filters is considered when a remote machine is specified.     Examples:taskkill/im Notepad.exe # # terminates process image named Notepad.exe process taskkill/pid 1230/pid 1241/pid 1253/t
   taskkill/f/im cmd.exe/t # # Forcibly terminates the process image named Cmd.exe process and terminates all child processes initiated from it
For example, terminate all Java.exe processes: taskkill/f/im java.exe/t
taskkill/f/fi "pid GE 1000"/fi "windowtitle ne untitle*" # # Terminate process PID > and window title does not equal all processes of untitle* taskkill/f/fi "USERNAME eq NT authority\system"/im notepad.exe taskkill/s system/u domain\username/fi "USERN AME NE nt* "/im * taskkill/s system/u username/p password/fi" IMAGENAME eq note* "

findstr command

C:\USERS\ASN\DESKTOP&GT;FINDSTR/? Searches for strings in files. FINDSTR [/b] [/E] [/L] [/R] [/S] [/i] [/x] [/v] [/n] [/M] [/O] [/p] [/f:file] [/c:string] [/g:file] [/d:dir list] [/a:color Attributes]  [/off[line]] strings [[drive:][path]filename[...]  /b Matches pattern if at the beginning of a line.     /e Matches pattern if at the end of a line.    /l Uses search strings literally.    /R Uses Search strings as regular expressions.             /S searches for matching files in the current directory and all subdirectories. In the current directory and its subdirectories, search for the files that match the/I specifies that the search was not to be case-sensitive. Default search case sensitive, specify case insensitive/x Prints lines that match exactly.    Print out the matching lines/V Prints only lines that does not contain a match. /n Prints the line number before each line that matches. Before each matching line, print the line number/M Prints only the filename if a file contains a match. If the file contains a match, print only the file name/o Prints character offset before each matching line. Before each matching line, print the character offset/p Skip files with non-printable characters. Ignore files with non-printable characters/off[line] Do not skip files with offline attribute set. Do not ignore files that have the Offline property set/a:attr Specifies color attribute with the hex digits.  See "Color/?" Use 2 hexadecimal numbers to specify a color property/f:file Reads file list from the specified file (/stands for console).  Reads a list of files from the specified file/c:string Uses specified string as a literal search string. Uses the specified string as a literal search string/g:file Gets search strings from the specified file (/stands for console). Gets the search string from the specified file/d:dir searches a semicolon delimited list of directories searches a comma-delimited directory strings Text to be Searche D for. text to be searched [drive:][path]filename Specifies a file or files to search.  Specify a file, some files to search using spaces to separate multiple search strings unless the argument are prefixed with/c.   For example, the ' FINDSTR ' Hello there "x.y ' searches for" hello "or" there "in file x.y.      # # FINDSTR "Hello there" x.ySearch for Hello or there ' findstr/c: "Hello there" x.y ' searches for "Hello there" in file x.y.        # # findstr/c: "Hello there" x.y to "hello there" as a whole in x.y file search Regular Expression Quick reference:.  Wildcard:any character * Repeat:zero or more occurrences of previous character or class ^ line position: Beginning of line $ line position:end of line [class] Character Class:any one Character in set [^class] INVe RSE Class:any one character not in set [X-y] range:any characters within the specified Range \x escape:liter Al use of metacharacter x \<XYZword position:beginning of Word xyz\>Word Position:end of wordfor full information on FINDSTR regular expressions refer to the online Command referenc E.

DOS Taskkill command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.