Questions tagged [locate]

`locate` is a command-line tool for local file search using a database.

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Installing mlocate on mac OS 10.7 [closed]

I'm a beginner in using Linux. I'm trying to use the command "locate". Once I use this command, I get an error that says the locate database should be created. I used the command below to create that ...
1
vote
2answers
244 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/ -...
6
votes
2answers
17k 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 ...
1
vote
3answers
54k views

“./configure” command does not work

I need to compile a package but the ./configure command does not work? I'm getting the following error: -bash ./configure : No such file or directory Where is that script? I used the locate ...
0
votes
1answer
489 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?
138
votes
4answers
61k 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?
8
votes
1answer
5k 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".
4
votes
2answers
899 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 $ ...
7
votes
2answers
4k 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?
10
votes
3answers
2k views

How to `locate` multiple files and open them in vim?

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 ...
8
votes
2answers
2k 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
208 views

How to find files in Linux using “locate”? [closed]

I would like to use this command to find some files.
10
votes
6answers
9k 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 ...
5
votes
4answers
713 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
794 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 {} \...
41
votes
1answer
46k 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 on ...
10
votes
4answers
34k views

How to find a file in the filesystem from the command line?

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 command line, rather than using a GUI utility. In Windows, I'd run the ...
8
votes
1answer
2k 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 ...

1 2
3