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

I am using UnxUtils on Windows and it comes with the find tool. I am using it to search for files and directories. If I wish to search for a file name which contains the word 'Identity', I use the following (for a case insensitive search)

find <location> -type f -iname "*Identity*"

and the following for searching directory names

find <location> -type d -iname "*Identity*"

I wish to search for both files and directories using a single command (to replace windows search). Is this possible using find ? Is there any native Windows tool which I can use instead to do a search on the command line ? The Windows commands FIND and FINDSTR are like the Unix grep and do not really help.


find <location> -iname "*Identity*" -ls

Searches for all files and folders in the given location (recursively). The -iname flag for a case insensitive search and the -ls flag to give an ls like output listing enabling us to know the file types.

share|improve this question
up vote 2 down vote accepted

Just remove the type specification.

find <location> -iname "*Identity*"
share|improve this answer
Thanks ! Is there any way to indicate that they are directories in the result ? – Stormshadow Jul 27 '10 at 13:34
Looking at the man page, I noticed I can use the -ls flag for this purpose. – Stormshadow Jul 27 '10 at 13:44

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.