PDA

View Full Version : Why "locate" finds leftover Clamav, Nautilus doesn't


Judge Dee
June 19th, 2009, 02:16 PM
I uninstalled Clamav using Synaptic, and "locate clam" in a terminal found a lot of leftover files. Using Nautilus as root, I located most of them, but not all. The "rm" command also doesn't locate them. Why does "locate" continue to list these files?
edit: Ubuntu 9.04

Regards,

Pedro
June 19th, 2009, 02:33 PM
Run updatedb as root. In Ubuntu that's sudo updatedb.

Judge Dee
June 19th, 2009, 03:40 PM
Pedro, it cleared the references.
My thanks. :)
What is the reason?

LowWaterMark
June 19th, 2009, 03:48 PM
locate uses a stored database of file system contents for the purpose of providing very fast responses to requests. It doesn't scan the directories real-time when you issue a locate command. The updatedb command refreshes that database. So, when you add or remove any file(s), locate will not reflect those change(s) until the next updatedb is executed.

Servers usually have a cron job, running perhaps once daily, to execute the updatedb automatically.

Judge Dee
June 19th, 2009, 03:51 PM
Another mystery - for me - cleared up. Thanks, LWM.

Regards,

Pedro
June 19th, 2009, 06:27 PM
Sorry if i sounded rather cryptic, i was kind of rushing it. (not you, just the computer!)

Anyway LWM explained it better than i would.
You can also read the manual pages on locate and updatedb with man updatedb and man locate where their purpose and usage are explained (q to exit).

Judge Dee
June 19th, 2009, 11:18 PM
-{ Quote: "Sorry if i sounded rather cryptic," }-

Hey, no problem, Pedro. You solved the main issue for me.
Thanks for the manuals. Going to read them now.

Regards,