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

learn more… | top users | synonyms

60
votes
4answers
20k 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?
3
votes
1answer
257 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 ...
5
votes
2answers
877 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?
2
votes
4answers
2k 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 ...
2
votes
2answers
1k views

How to add specific directories to “updatedb” (locate) search path?

I keep my digital music and digital photos in directories in a Windows partition, mounted at /media/win_c on my dual-boot box. I'd like to include those directories—but only those directories—in the ...
1
vote
2answers
37 views

Cannot delete file, but can delete parent directory

So basically, I'm trying to delete the files: /var/lib/mysql/db/nomNomina2.* and when I look for them with locate, I get the following output: /var/lib/mysql/db/nomNomina2.MYD ...
0
votes
4answers
103 views

Search for and remove files safely

I would like to search for all the nohup.out in my mounted filesystems, and delete them. There are some directories and files whose filenames contain space, so I think of xargs -0. To be safe, I ...