locate: First you need to run updatedb. Note that updatedb can only see those files the user who runs it has permissions to do so. Thus, if you run it as root, you open up a security hole: Anybody could see the filenames of other users. Descriptive filenames in public can reveal private information). Many systems are set to run this as a cron job in the wee hours of the morning as user nobody, who only has limited rights. So, as long as you have left your computer on, your locate-database is updated daily (Or better: nightly). Some systems also run updatedb after startup if the computer has not been on at the scheduled time. This disk-activity without visible cause often irritates users. There is more to know about
locate and updatedb