File this one with “things i constantly use but refuse to memorize so I always have to google it”…
The following command is a simple demonstration of the power of piping data from one output to another programs input. Netstat will list all of the processes using network connects. Find will “filter” out only the ports in a Listening state.
netstat -an | find /i "listening"
Text based formats FTW.
Related posts:
Comments 2
I have the same problem. I made a little function in my zshrc I use for this, because it also changes from system to system.
http://dpaste.com/211572/plain/
Posted 25 Jun 2010 at 6:35 pm ¶Awesome tip Greg, thanks.
Now i just need to find something that will stop me from typing “ls” when I really mean “dir”, and vice versa!
Posted 05 Jul 2010 at 9:26 pm ¶Post a Comment