locate - Permission denied
I cant seem to use locate. I get this msg.
Code:
username@server [/]# locate mcrypt Thanks |
i assume you did you do what it says? ie run the specified command to create the initial search database
|
I need root access to run updatedb command ?
|
yes you do.. since it would attempt modifying files where your normal user account doesnt (or shouldnt!) have access to.
give it a shot. |
I did updatedb after I did su. Took time but worked. So how does this locate work ? Based on some cached results ? find doesnt seem to need and db - its just like windows dir.
|
locate searches through a database of file names (so it only knows of the things that exist as of the last update of the database); usually people have updatedb run automatically daily or something to update the databases. Searching through a text file is very quick, whereas traversing the entire directory tree (with find) is incredibly slow. I think Windows also has things where you can set a directory to be indexed periodically.
|
All times are GMT -5. The time now is 07:25 PM. |