Equivalent of Unix find command on Windows
What is the equivalent of the Unix find command on Windows?
I see that the find.exe
on Windows is more like a grep
. I am especially interested in the equivalent of
find . -name [filename]
Solution 1:
dir <drive: [drive:]> /s | findstr /i <pattern>
- alternative -
dir /s <drive:>\<pattern>
example
dir c: d: /s | findstr /i example.txt
- alternative -
dir /s c:\example.txt
Solution 2:
With no additional cmdlets installed, you can simply use Get-ChildItem
:
Get-ChildItem -Filter *.zip -Recurse $pwd