Locate is not avaiable on all platforms, but where it is, you can use this to find files on your system. It doesn't have the flexibility or power of "find", but because it uses a precreated index, it is much faster.
You can give wildcards to locate:
locate '*.html'
If you don't use any wild card characters, locate assumes wild cards: "locate html" is taken as "locate '*html*'
Locate's index is built by a script that needs to run frequently (usually in cron).
Got something to add? Send me email.
More Articles by Tony Lawrence © 2009-11-07 Tony Lawrence
UNIX does not allow path names to be prefixed by a drive name or number; that would be precisely the kind of device dependence that operating systems ought to eliminate. (Andrew S. Tanenbaum)
Printer Friendly Version
locate Copyright © November 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version