Can someone give me tips on using the 'locate' command - with examples?
Hi.
Can someone give me tips on using the 'locate' command - with examples? Thanks in advance. I know this so far: Code:
# -i means not case sensitive Code:
locate -i searchstring Code:
locate -i stuff.txt |
what's to explain? That's all I know about it, and the manpage is pretty self explanatory. You really need to ask specific questions, rather than expecting to be taught.
ignore the name mlocate, it's just a different implementation of the same service. M = merging with the updatedb tool. |
Quote:
|
locate myfile
locate anotherfile locate athirdfile ;-) |
Additional note;
'locate' can also be combined with 'grep' (ok, that should be obvious), to useful effect; So, eg, if what you know is that the file that you are looking for, you probably stored in your downloads directory and it probably was a pdf file locate downloads | grep -i pdf might get you closer. Still not close enough? Well, let's say it also concerned ubuntu, maybe locate downloads | grep -i pdf |grep -i ubuntu is the thing that gets you there. More than that ought to be an application of similar principles and possibly a careful reading of the man page. Anything really clever, and you'll probably need 'find' instead. |
All times are GMT -5. The time now is 10:24 PM. |