`locate` is a command-line tool for local file search using a database.
1
vote
2answers
68 views
Why don't find and locate search /bin?
What gives? Normal find and locate commands don't turn up the verify program that lives at /bin/verify. In fact, it seems they don't turn up anything that lives in /bin
[jake@jace]/bin% "find" /bin/ ...
1
vote
2answers
166 views
Why does pipe not work with cat and locate?
I am trying to perform this:
locate pg_type.h | cat
But this command simply does nothing different than locate pg_type.h
What should I change ? I want to perform cat pg_type.h wherever pg_type.h ...
0
votes
1answer
50 views
Change where mlocate stores the database?
Looks like it's not configurable through /etc/updatedb.conf, and not mentioned in its manual as well.
So can I change that?
13
votes
3answers
636 views
locate vs find: usage, pros and cons of each other
In Linux and Unix systems there are two common search commands: locate and find.
What are the pros and cons of each? When one have benefits over the other?
1
vote
1answer
79 views
'locate' for case-insensitive words?
I wonder how to use the command locate to search for words that are not case sensitive? Such as modify locate normal to search for results that have "Normal" and "normal". Thanks!
4
votes
2answers
192 views
No locate.db even after running updatedb
Any clue what's up with this?
djc@miles rebar $ sudo updatedb
djc@miles rebar $ locate .dialyzer_plt
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
djc@miles rebar $ ...
5
votes
2answers
208 views
Make `locate` able to search files on external HDD
If I understand correctly, the database locate relies on is just for files on partitions of internal HDDs. I wonder if it is possible to use locate on external HDDs?
9
votes
2answers
266 views
Trying to “locate” and then open a file
Suppose that I have a file named filename123.txt and it is the single file that is named so, and I can locate it with the command locate filename123. And it returns only this file.
Now I want to open ...
3
votes
2answers
214 views
Progress bar in updatedb
Is it possible to get a reliable progress bar (or just a reliable information how long it will take) when doing updatedb?
-3
votes
1answer
98 views
How to find files in Linux using “locate”? [closed]
I would like to use this command to find some files.
3
votes
3answers
123 views
How can I use locate only for a directory
This finds a large number of files that are under various subdirectories of "Dropnot"
$ locate Dropnot
Can I find just the directory location with locate? (which directory "Dropnot" is in)
So if ...
4
votes
4answers
100 views
Restrict search of locate to specific directories
Is there a way to restrict locate output to specific directories on Mac OS X Snow Leopard? I read about using regex on a Ubuntu forum. However, on my mac locate does not accept -r option. I also ...
4
votes
1answer
122 views
How can I act on the results of the “locate” command?
I'm trying to find where check_dns is defined in nagios' commands.cfg file, although there are quite a few files.
I know I could run something like find / -name "command.cfg" -exec grep check_dns {} ...
3
votes
1answer
879 views
How do I enable locate and queue the database to be built?
On a new Ubuntu 10.4 instance, I tried to use the locate command only to receive the error
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory
from using this command ...
5
votes
4answers
3k views
How to find a file in the filesystem from the command line?
I'm fairly new to Linux, and I've now found myself in a situation where I'd like to find where a file (with a partially-known filename) is in the file system. I'd like to know how to do this from the ...
3
votes
1answer
513 views
How to exclude directories with blanks via locate's PRUNEPATHS?
I would like to exclude some Windows folders on an NTFS mount from being indexed by locate. I'm familiar with the PRUNEPATHS syntax in /etc/updatedb.conf. It is a white-space separated list of ...