Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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]
share|improve this question
Is something wrong with my answer? Can I improve it? Do you still need help? – JohannesM Jun 22 '12 at 16:55
Sorry, I had lost sight of this thread a while ago. Thanks for your answer and apologies for not accepting it sooner. – ARV Jun 25 '12 at 9:44
up vote 11 down vote accepted
dir <drive: [drive:]> /s | findstr /i <pattern>

- alternative -

dir /s <drive:>\<pattern>


dir c: d: /s | findstr /i example.txt

- alternative -

dir /s c:\example.txt
share|improve this answer
dir c: /s example.txt works, too. – DevSolar Jun 25 '12 at 11:55
@DevSolar can you recheck your command? I've tested it on Windows 5.1 Build 2600 SP3, and your command just gives me the list of files in the directory c: – JohannesM Jun 25 '12 at 12:07
Uh... sorry. Serves me right to type from memory. dir /s C:\example.txt it is. – DevSolar Jun 25 '12 at 12:14
for the most similar results I use \b for brief (output only paths); find <folder> -name <pattern> -> dir /s /b <folder><pattern>. E.g. find /tmp -name *.txt -> dir \s \b C:\temp\*.txt. However dir always returns a list of absolute paths, whereas find always gives paths prefixed with <folder> – Hashbrown May 26 '15 at 3:51

The Find-ChildItem Cmdlet in Windows Powershell is an equivalent of Unix/Linux find command

Some of Find-ChildItem Options

  1. Find-ChildItem -Type f -Name ".*.exe"
  2. Find-ChildItem -Type f -Name "\.c$" -Exec "Get-Content {} | Measure-Object -Line -Character -Word"
  3. Find-ChildItem -Type f -Empty
  4. Find-ChildItem -Type f -Empty -OutObject
  5. Find-ChildItem -Type f -Empty -Delete
  6. Find-ChildItem -Type f -Size +9M -Delete
  7. Find-ChildItem -Type d
  8. Find-ChildItem -Type f -Size +50m -WTime +5 -MaxDepth 1 -Delete

Disclosure: I am the developer of Find-ChildItem cmdlet

share|improve this answer
Thank you. This is definitely more in mind of what I'd be looking for in answering this question. – supercheetah Feb 2 '15 at 16:37

With no additional cmdlets installed, you can simply use Get-ChildItem:

Get-ChildItem -Filter *.zip -Recurse $pwd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.