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
| Linux | Windows |
|---|---|
| forfiles | find |
| cat | type |
| which | where |
| rm | del |
| rmdir | rmdir /S |
Network related tools
| Linux | Windows |
|---|---|
| ifconfig | ipconfig |
| netstat | netstat |
| telnet | netstat |
| ping | ping |
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
