Why "locate" finds leftover Clamav, Nautilus doesn't

Discussion in 'all things UNIX' started by Judge Dee, Jun 19, 2009.

Thread Status:
Not open for further replies.
  1. Judge Dee

    Judge Dee Guest

    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,
     
    Last edited by a moderator: Jun 19, 2009
  2. Pedro

    Pedro Registered Member

    Joined:
    Nov 2, 2006
    Posts:
    3,502
    Run updatedb as root. In Ubuntu that's sudo updatedb.
     
  3. Judge Dee

    Judge Dee Guest

    Pedro, it cleared the references.
    My thanks. :)
    What is the reason?
     
  4. LowWaterMark

    LowWaterMark Administrator

    Joined:
    Aug 10, 2002
    Posts:
    18,278
    Location:
    New England
    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.
     
  5. Judge Dee

    Judge Dee Guest

    Another mystery - for me - cleared up. Thanks, LWM.

    Regards,
     
  6. Pedro

    Pedro Registered Member

    Joined:
    Nov 2, 2006
    Posts:
    3,502
    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).
     
  7. Judge Dee

    Judge Dee Guest

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

    Regards,
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.