Searches for a text string in a file or files.
FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] “string” [[drive:][path]filename[ ...]]
/V Displays all lines NOT containing the specified string. /C Displays only the count of lines containing the string. /N Displays line numbers with the displayed lines. /I Ignores the case of characters when searching for . . . → Read More: Howto: To search a folder for files that contain a given search string
List local/remote socket and PID for all TCP connections in “Established” state:
netstat -ano | find /i “established”
List local/remote socket for all TCP connections in “Established” state (sometimes you get more than above):
netstat -an | find /i “established”
List connections over time (netstat_check_connections.bat):
@echo off for /L %%X in (1,1,4) do (netstat -b . . . → Read More: Howto: See if a local port is listening from command prompt
I cam across two amazing article the other day detailing how to do some great stuff from the windows command line.
synjunkie knows his shit:
Command-Line-Ninjitsu Command-Line Kung Fu
I stumbled upon it because I was about to format a server but wanted to retain this information:
All local groups/users and their respective permissions for . . . → Read More: Howto: Back up Server 2003 Users Groups Shares Permissions Program Names Network Settings