Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 was looking for a specific file using whereis from the command line.

I got a rather useless result, but I then found the exact file I was looking for by manually searching.

I did not make a mistake in the command line. Why didn't whereis turn up all my files? Is there another method?

share|improve this question
find / | grep filename – RobotHumans Dec 28 '12 at 4:11
fair point, but updatedb takes time – RobotHumans Dec 28 '12 at 23:58
Er, I'm pretty sure he meant that normally you'd type that as "find -name 'filename'" – Erhannis Jan 16 '13 at 2:46
Is there another method? - Yes! which - if you know your file some where in $PATH – leanid.chaika Jul 2 '15 at 20:11
up vote 6 down vote accepted

whereis doesn't locate files, because whereis command is not intended to be used for that.

From whereis manpage

whereis - locate the binary, source, and manual page files for a command

whereis locates source/binary and manuals sections for specified files. The supplied names are first stripped of leading pathname components and any (single) trailing extension of the form .ext, for example, .c. Prefixes of s. resulting from use of source code control are also dealt with. whereis then attempts to locate the desired program in a list of standard Linux places.

For more information type man whereis in your terminal to refer the man page. For finding a file you have to use commands like grep, find, locate, etc...

share|improve this answer
@Web-E, Thanks for adding that link. – saji89 Dec 28 '12 at 4:34

What you're probably looking for is locate.

The locate man page:

Ubuntu's Community Help Wiki has an entry for finding files. Check it out here:

share|improve this answer
+1 for understanding what he was really asking. :) – don.joey Dec 28 '12 at 9:51

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.