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

learn more… | top users | synonyms

1
vote
2answers
33 views

locate with color

I used locate binary many time to search something on my 1TB HDD. Most of the time, I got many result and I have to read each line to get what exactly I'm looking for. It would be great if the ...
0
votes
0answers
13 views

Using regex in locate [duplicate]

I would like to search for both words pdf and hack in all filenames and their paths. The order of the two words doesn't matter. I use the command locate with a regex pattern: locate --regex ...
0
votes
4answers
216 views

Alternative for “locate” on debian

I often use "locate" command on CentOs to find files. What's the alternative for this command on Debian ?
1
vote
2answers
47 views

How to locate a file in a directory

How can I locate a file using locate in CentOS under a specific directory from terminal? Locate search the whole database!
3
votes
1answer
59 views

How to update linux “locate” cache

How can i update the cache / index of locate? I installed new packages and the files are clearly not yet indexed. So which command do I have to ommit, in order for the indexer to trigger. I'm ...
5
votes
4answers
438 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 ...
1
vote
4answers
97 views

regex matching with “locate”

I'm trying to use the locate command to find files in my home folder, however whenever I try and run this I get no results: locate -i -l 4 --regexp '^\/home\/jack\/[A-Za-z0-9\/\ ]*(My.)*$' I've ...
3
votes
1answer
49 views

GTK Frontend for locate

I am a heavy user of the locate tool, which is part of the findutils package. It's fine to use it on command line, but sometimes I would also like to search for a file (as fast as with locate) within ...
4
votes
4answers
223 views

Locating files and displaying their owner

I have to search for a specific file type on a storage unit and also want to know their owners. With locate '*.txt' >> result.txt I find all files I'm looking for but I'm missing the owner this ...
2
votes
1answer
215 views

why updatedb command takes too much time?

I have read that to run locate command on CYGWIN first I need to run the following command. updatedb --localpaths=c:/ what this command exactly do as I run this on CYGWIN and it is taking too much ...
2
votes
2answers
42 views

How to display size of each file next to it after executing the “locate” command?

Is there anyway to display the size of each file next to it after executing the "locate" command?
1
vote
2answers
54 views

Keep only first match from locate output

I need to locate a library on my system and it's name is expected to be found a couple of times. I want to keep only the first occurrence. So far I've tried some methods for splitting strings by ...
27
votes
3answers
3k 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?
2
votes
1answer
48 views

is there a web app for returning results to a search on an indexed database?

I would very much like to allow users in a small office environment harness the power of slocate indexed database on the file server. Currently when users are looking for a file in our fileserver, ...
2
votes
1answer
389 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".
2
votes
3answers
390 views

How to monitor directory/file changes to rebuild index?

Just moved to Ubuntu 12.04 from Windows 7. Under Win 7 I use "Everything" to search files and directories, it can build the index database and update it once any file or directory changes. I'm very ...
4
votes
2answers
354 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 $ ...
0
votes
1answer
986 views

updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db'

I go to use the updatedb command to update the index and I get updatedb: can not open a temporary file for `/var/lib/mlocate/mlocate.db' fyi The locate command is working, e.g. $ locate Index.xml ...
0
votes
0answers
158 views

Installing mlocate on mac OS 10.7

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
95 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
1k 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
115 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?
4
votes
4answers
171 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 ...
5
votes
2answers
565 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
366 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
428 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
122 views

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

I would like to use this command to find some files.
4
votes
1answer
158 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 {} ...
8
votes
1answer
2k 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 ...
7
votes
4answers
8k 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 ...
4
votes
1answer
966 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 ...