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 find that somehow the Downloads directory in /home/user/ is deleted. on using locate Downloads, it shows the existence of directory without any existence of files within.

now when I manually create directory named Downloads, locate Downloads shows the directory as well as the files the original folder had.

also there is no hidden Downloads folder nor can I access the folder or its files

this behavior is quite unexpected.

share|improve this question

locate command does not use the filesystem directly, it uses a database which is updated periodically by a background process:

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. ...

By default, locate does not check whether files found in database still exist. locate can never report files created after the most recent update of the relevant database.

So I guess this is an artifact of the actual filesystem state and what locate thinks of the filesystem being out of sync.

To search the filesystem directly you can use find command.

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.