Just a list of the common commands that I use on cmd console
Copy a file
copy <source_file> <destination_file>
Robust copy – file and folders
ROBOCOPY <source> <destination> /V
Delete file
del <file_name>
Delete recursive a folder
rd /s /q <folder>
Netstat – Connections check
netstat -ano
# tcp protocol - port filtering
netstat -ano -p tcp | findstr <port>
Process kill using PID number
taskkill /PID <pid_number>
# force
taskkill /PID <pid_number> /F
# using exe
taskkill /f /im <name>.exe /t
Tail
# powershell
Get-Content ./log.log -Wait -Tail 10
# or
cat ./log.log -Wait -Tail 10
0 Comments