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

There is a file at /user/share/jogl.jar.

I am using locate jogl.jar

but it doesn't work. Why?

share|improve this question
up vote 1 down vote accepted

From the man page:

   locate  reads  one or more databases prepared by updatedb(8) and writes
   file names matching at least one of the PATTERNs  to  standard  output,
   one per line.

Run updatedb as root and try again. It should work.

Alternatively you can use find or find | grep, which does not uses a db (and thus is considerably slower).

share|improve this answer
Thanks,it worked. – rebuked Jul 17 '13 at 13:53

What do you mean by "it doesn't work" ? Two main issues come to mind, if you're not familiar with locate, both related to the fact that locate relies on a database and not directly on the file system.

  1. It doesn't display any result: in this case, you might need update locate's database by simply running updatedb from a terminal

  2. It returns way too many results: once again, locate uses a database, not the current directory (contrary to several other common unix commands), so if you try to locate somestuff from your home directory in order to find all the somestuff that it might contain, it won't work. You'll have to run it with the full path instead: locate ~/*somestuff

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.