Piping the output of a command line utility to the find command is a way to easily narrow down the results that are returned.
Here’s an example of piping the output of the netstat command to find only the ports that your server is listening on:
1 | netstat -an -p TCP | find /I "listening" |
You can pipe the output multiple times to narrow down your search results:
The find command can also be used to search text files:
Here’s the syntax of the find command:
µ
Hi there I found your page by mistake when i was searching Yahoo for this issue, I have to point out your site is quite very helpful I also love the design, its awesome!
Hi Mike,
Thanks for being an excellent documentation writer. Examples and pictures I say, that’s what helps me out.
Good job!
Would like to point out that find is not a powershell command, but rather a command line utility. Notice the title of the window reads Command prompt.
This works in PowerShell just fine…
It “works” in PowerShell just fine because it’s executing ‘C:\Windows\System32\find.exe’, not because it’s executing a PowerShell cmdlet.