Skip to content

Windows Commands

https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands

Compare coreutils/util-linux with Windows Commands

Common CLI tools

LinuxWindows
forfilesfind
cattype
whichwhere
rmdel
rmdirrmdir /S

Network related tools

LinuxWindows
ifconfigipconfig
netstatnetstat
telnetnetstat
pingping

find a file by pattern

Linux find . -name *.exe Windows forfiles /S /M *.exe /C "cmd /c echo @path"

ref: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/forfiles

Case: find process by listen port and kill it

查找监听指定端口进程ID, 如 9527 端口 netstat -ano | find "9527" | find "LISTEN" 根据 PID 查看进程名、内存占用 tasklist /fi "PID eq 9527"

杀死指定进程 ID 进程,如 1234 taskkill /PID 1234 /F

Released under the CC-BY-NC-4.0