Table of Contents
Taskkill命令详解
Home Database Mysql Tutorial windows下批量杀死进程_MySQL

windows下批量杀死进程_MySQL

May 31, 2016 am 08:48 AM

有时候由于病毒或其他原因,启动了一系列的进程,并且有时杀了这个,又多了那个。使用命令taskkill可将这些进程一下子全部杀光:

C:/Users/NR>taskkill /F /im frontpg.exe
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 3732。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 24544。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 3612。
错误: 无法终止进程 "FRONTPG.EXE",其 PID 为 8268。
原因: 操作不被支持。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 7532。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14184。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 18384。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 16888。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 3280。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 18660。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 26440。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 20764。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 15572。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 4292。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 19844。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 25036。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 13736。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 15024。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14948。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 23048。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 9864。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 22948。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14872。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 7708。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 21956。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 21884。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 6212。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 6948。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 17016。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 9436。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 15808。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14692。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 10044。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 13520。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 11508。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 17388。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 23544。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 13896。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14728。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 2996。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 4536。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 18868。
成功: 已终止进程 "FRONTPG.EXE",其 PID 为 14124。

参数说明:

/F 强制终止

/IM 进程映像名

frontpg.exe 进程名

参考:

Taskkill命令详解

“Tasklist”命令是一个用来显示运行在本地或远程计算机上的所有进程的命令行工具,带有多个执行参数。

作用:
结束一个或多个任务或进程。可以根据进程 ID 或图像名来结束进程。

语法格式:
TASKLIST [/S system [/U username [/P [password]]]]
[/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]

参数列表:
/S system 指定连接到的远程系统。
/U [domain/]user 指定使用哪个用户执行这个命令。
/P [password] 为指定的用户指定密码。
/M [module] 列出调用指定的 DLL 模块的所有进程。
如果没有指定模块名,显示每个进程加载的所有模块。
/SVC 显示每个进程中的服务。
/V 指定要显示详述信息。
/FI filter 显示一系列符合筛选器指定的进程。

-eq, -ne: equal, not equal.
-gt, -lt: greater, less than.
-ge, -le: greater or equal, less than or equal.
/FO format 指定输出格式,有效值: "TABLE"、"LIST"、"CSV"。
/NH 指定栏标头不应该在输出中显示。
只对 "TABLE" 和 "CSV" 格式有效。
--------------------------------------
Tasklist实战:

1.查看本机进程(在一些特殊情况,比如任务管理器被禁用的时候,特别有效)
运行“cmd”,在提示符窗口中输入:“tasklist”命令,这样就显示本机的所有进程。本机的显示结果由五部分组成:图像名(进程名)、PID、会话名、会话#、内存使用。

2.查看系统进程提供的服务
tasklist命令不但可以查看系统进程,而且还可以查看每个进程提供的服务。
在命令提示符下输入:"tasklist /svc",这样就列出了每个进程所调用的服务,怎么样,每个svchost.exe进程还正常吧,呵呵

3.查看调用DLL模块文件的进程列表
例如,我们要查看本地系统中哪些进程调用了“shell32.dll” DLL模块文件。
tasklist /m shell32.dll
这时系统将显示调用了shell32.dll文件的所有进程列表。

4.使用筛选器查找指定的进程
命令提示符下输入:TASKLIST /FI "USERNAME ne NT AUTHORITY/SYSTEM" /FI "STATUS eq running"
这样就列出了系统中正在运行的非“SYSTEM“状态的所有进程。

更多................
tasklist /v /fi "PID gt 1000" /fo csv

tasklist /fi "USERNAME ne NT AUTHORITY/SYSTEM" /fi "STATUS eq running"

tasklist /v /fi "STATUS eq running"

tasklist /s srvmain /nh tasklist /s srvmain /svc /fi "Modules eq ntdll*"

tasklist /s srvmain /u maindom/hiropln /p p@ssW23 /nh



谈到“Tasklist”命令,我们就不得不提到“taskkill”命令,顾名思义,它是用来结束进程的。

Taskkill
结束一个或多个任务或进程。可以根据进程 ID 或图像名来结束进程。

语法:TASKKILL [/S system [/U username [/P [password]]]]
{ [/FI filter] [/PID processid | /IM imagename] } [/F] [/T]

参数
/s Computer
指定远程计算机名称或 IP 地址(不能使用反斜杠)。该默认值是本地计算机。

/u Domain/UserName
使用 UserName 或 Domain/UserName 指定的用户的帐户权限运行该命令。仅在指定 /s 后才能指定 /u。默认值是当前登录发布命令的计算机的用户具有的权限。

/p Password
指定在 /u 参数中指定的用户帐户的密码。

/fi Filter
指定将要终止或不终止的进程的类型。可以指定多个筛选器。使用通配符 (*) 指定所有任务或图像名称。以下是有效的筛选器名称、运算符和值:

/pid ProcessID
指定将终止的进程的进程 ID。

/im ImageName
指定将终止的进程的图像名称。使用通配符 (*) 指定所有图像名称。

/f
指定将强制终止的进程。对于远程进程可忽略此参数,所有远程进程都将被强制终止。

/t
终止指定的进程与该进程启动的任何子进程。

/?
在命令提示符下显示帮助。

注释
? 指定远程系统时,不支持“WindowTitle”和“Status”筛选器。
? 只有与筛选器一起指定时,通配符 (*) 才能被接受。
? 无论是否指定 /f 参数,都会始终强制执行对远程进程的终止操作。
? 向 HOSTNAME 筛选器提供计算机名将导致关机和中止所有进程。
? 使用 tasklist 确定要终止的进程的进程 ID (PID)。
--------------------------------------
Taskkill实战
1.结束spoolsv.exe进程
2.结束一个进程的所有子进程

示例
下面的示例说明如何使用 taskkill 命令:

taskkill /pid 1230 /pid 1241 /pid 1253

taskkill /f /fi "USERNAME eq NT AUTHORITY/SYSTEM" /im notepad.exe

taskkill /s srvmain /f /im notepad.exe

taskkill /s srvmain /u maindom/hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im *

taskkill /s srvmain /u maindom/hiropln /fi "USERNAME ne NT*" /im *

taskkill /pid 2134 /t /fi "username eq administrator"

taskkill /f /fi "PID ge 1000" /im *
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1676
14
PHP Tutorial
1278
29
C# Tutorial
1257
24
MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Explain the role of InnoDB redo logs and undo logs. Explain the role of InnoDB redo logs and undo logs. Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

MySQL vs. Other Programming Languages: A Comparison MySQL vs. Other Programming Languages: A Comparison Apr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL vs. Other Databases: Comparing the Options MySQL vs. Other Databases: Comparing the Options Apr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

MySQL for Beginners: Getting Started with Database Management MySQL for Beginners: Getting Started with Database Management Apr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

Explain the InnoDB Buffer Pool and its importance for performance. Explain the InnoDB Buffer Pool and its importance for performance. Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL: Structured Data and Relational Databases MySQL: Structured Data and Relational Databases Apr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

Learning MySQL: A Step-by-Step Guide for New Users Learning MySQL: A Step-by-Step Guide for New Users Apr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

See all articles