Questions tagged [locate]

51 questions
299
votes
5 answers

What's the equivalent of Linux's updatedb command for the Mac?

If I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the corresponding updatedb for the mac?
Thierry Lam
  • 4,477
31
votes
13 answers

Unix-type "locate" on Windows?

Using the Windows CLI (cmd), how does one locate a file that he knows part of the name of? For instance, every single Windows workstation installs javac in a different location, how would one find it from the Windows CLI (cmd)? Googling I see…
dotancohen
  • 11,720
30
votes
8 answers

Faster alternatives to "find" and "locate"?

I will like to use "find" and locate" to search for source files in my project, but they take a long time to run. Are there faster alternatives to these programs I don't know about, or ways to speed up the performance of these programs?
benhsu
  • 661
27
votes
3 answers

Difference between locate and which in Linux

What is the difference between locate and which in Linux? Why when I use locate mentor does it list all the mentor but when I used which mentor it says "no mentor in..." - what does this mean?
Naddy
  • 271
20
votes
2 answers

A file shows in "locate" command but don't exist. Why?

I'm having a strange issue. I am currently fixing a flash install on Backtrack 5 (Based on Ubuntu). I really need to get flash to work, so I looked up on Google. On some board, one guy said that on this distribution (which is finally based on…
20
votes
1 answer

What makes 'locate' so fast compared with 'find'?

In my mind, both locate and find finds a file, but why does locate run so fast? According to its documentation, locate: DESCRIPTION locate reads one or more databases prepared by updatedb(8) and writes file names matching at >least one of the…
Tiina
  • 3,297
19
votes
5 answers

How to a open a file in vim using pipe

I get to use the locate command extremely often. So if I run the following command. locate updatedb | head -1 Then it gives me the O/p /usr/updatedb.conf I wonder if there is any such command that can let me open that file directly? I am hoping…
Krishna
  • 420
16
votes
11 answers

How to use locate to search for folders only

On a UNIX system, "locate" searches the database for files with chosen name or files within the folder with the chosen name. How can I use locate to output only folders, not files?
shrx
  • 474
15
votes
3 answers

How to use locate in cygwin?

I'm trying to use locate to find files, but I'm not getting anything back from the program. It can't even find files that are in the current directory. How do I make locate work?
Phenom
  • 6,767
14
votes
3 answers

How to use updatedb command as an ordinary user?

The locate command is very useful tool on Linux, but it seems only root can run updatedb command which is very unconvinent to use it. So how to make ordinary user to have the priviledge to run updatedb command? updatedb is the command use to update…
hugemeow
  • 2,329
12
votes
2 answers

Where is Microsoft Teams application located on my Windows 10 Computer?

From the 'tray icon' I chose to disable "start Teams on startup" but now I can't find the application. It's not in Programs Files > Microsoft [neither in Program Files (x86)]. It's not in App Data for the current user. It's not in the Start Menu…
11
votes
1 answer

`locate` wildcard strange behavior - why?

locate "*.png" returns all files ending with .png, as expected. locate "test.*" doesn't return anything, but there are files named test in my system. locate "*test" returns all files ending with test, as expected. locate "test*" doesn't return…
10
votes
3 answers

How to display file details (size, date, etc.) from Linux “locate” command?

The (slow) Linux “find” command has an option, “-ls”, to display size, date, etc. like the “ls -l” command. But the “locate” command doesn’t seem to have that. So how can I get the equivalent functionality with locate? I’ve used back-ticks to pass…
10
votes
3 answers

FreeBSD 9: How to locate an exact filename?

Trying to use locate command to find an exact match for the given pattern. However it results showing all matching files.. For example: I want to find a binary named: node But it gives me all matches containing this word: server2# locate…
9
votes
4 answers

Cannot manually update database for locate?

I've been trying to update the databases used by locate on my Macbook (10.6.3 Snow Leopard) but even following the commands shown in this thread hasn't gotten me anywhere. I just get an error from it - if I try to use it via sudo, I get some racket…
memilanuk
  • 410
1
2 3 4