Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

up vote 6 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

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 at 16:37

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.