locate is the main command in the mlocate package. It is used to search for files, by default by a substring of their full path, based on a database populated by the updatedb command.
Questions tagged [locate]
263 questions
5
votes
2 answers
Locating fonts on Linux (in C++)
I want to be able to get the absolute path to a ttf font file on Linux when given a font name (if it exists). Is there a command or API that will return that information?
For example, given "arial.ttf" I want to find the absolute path (e.g.…

Kazade
- 1,297
- 2
- 15
- 25
5
votes
2 answers
locate command - find only where whole word matches
In a terminal window how can I use the command locate to only return results where the whole word is present.
For example, I was looking for all files related to GO lang. However, typing locate go returns everything from actual GO files to something…

jzg.dev
- 123
- 1
- 13
5
votes
4 answers
Delphi - restore actual row in DBGrid
D6 prof.
Formerly we used DBISAM and DBISAMTable. That handle the RecNo, and it is working good with modifications (Delete, edit, etc).
Now we replaced with ElevateDB, that don't handle RecNo, and many times we use Queries, not Tables.
Query must…

durumdara
- 3,411
- 4
- 43
- 71
5
votes
3 answers
Unable to locate element for LABEL with the XPath expression
I am trying the below xpath for Label, but I'm not able to locate the element.
driver.findElement(By.xpath("//div[label[contains(text(),'Patient's Name']]")).isEnabled();
XPath: .//*[@id='update_patient_profile']/div/div[1]/label ---Taken from…

pratik
- 59
- 2
- 3
- 11
4
votes
1 answer
How do I resolve "Could not locate Gemfile" when trying to initialise a react native project?
When running the command npx react-native init myProject --version 0.63.0 it gives back the error:
✖ Installing Bundler
error Could not locate Gemfile
I am using react-native 0.63 as I am on Mac OS 10.13.6. Xcode 12 is required for react-native…

jfog
- 81
- 6
4
votes
2 answers
How should I use getResource() in Java?
This question is asked in numerous places, with myriad small variations. (Such as Java - getClassLoader().getResource() driving me bonkers among others.) I still can't make it work.
Here's a code snippet:
String clipName = "Chook.wav";
…

Chap
- 3,649
- 2
- 46
- 84
4
votes
2 answers
Is there a way to open/read a database file created by updatedb with python?
I'm just curious if anyone has done this before. I'd like to use the database file generated by updatedb as sort of a "cache" for a searching mechanism, but without having to make any external calls to 'locate'.

musashiXXX
- 4,192
- 4
- 22
- 24
4
votes
1 answer
Cygwin Emacs, Windows Everything and ^M
Within a Cygwin Emacs, how is it possible to use Helm (and the fantastic es command-line tool from Everything) to locate files on Windows?
I've the thing running easily, except that there are ^M after every file name from the es output.
Adding
("es"…

user3341592
- 1,419
- 1
- 17
- 36
4
votes
2 answers
How to assign to a bash variable the first result of locate?
I can allocate a path to a certain variable from bash:
VAR1=/home/alvas/something
I can find it automatically:
$ cd
$ locate -b "something" .
/home/alvas/something
/home/alvas/someotherpath/something
But how do I assign the first result from…

alvas
- 115,346
- 109
- 446
- 738
4
votes
3 answers
MySQL Substring in selection only when a character is present
A have a table that is populated by an automated process that contains several thousand company names from a third party feed. Most of the company names are just the name, but some have a hyphen after the company name. I am trying to do a select…

Wige
- 3,788
- 8
- 37
- 58
3
votes
1 answer
Position element in ordered list in logarithmic time Python
I have a sorted list and i need to position an element within that list such that the previous element is <= and the next element in the list is > (the list is a list of floating point numbers)
I shall need to return the position of the element that…

Marvin Android
- 31
- 1
3
votes
0 answers
UIWebView locating text by touch
Would like to capture a touch on a UIWebView, map that to the relevant HTML text and insert a hyperlink into the HTML at that point.
Found a very nice reference to cleanly capture touches on UIWebView…

Frank Natoli
- 153
- 1
- 1
- 12
3
votes
2 answers
Locate excel 2007 Pivot table
Can someone tell me how I can find all the pivot tables in a workbook (or sheet)? In some cases a pivot table might be hidden or hard to find in a very large excel sheet. If i could at least get the cell address or range of where the pivot table(s)…

Juan Velez
- 741
- 5
- 15
- 29
3
votes
2 answers
What command should I use in finding the latest version of libgtk in linux
I need to install libgtk in Ubuntu linux.
I tried to use "sudo apt-get install libgtk", but the answer is that libgtk can't be found in the libgtk package.
How can I use a Linux command to find the latest version of libgtk?

angela
- 31
- 1
- 2
3
votes
4 answers
Extract text from column in select of MySql query
I have a table named sentEmails where the body column contains the body text of an email.
In the body text, there is a substring like:
some link: Random link…

Wesley Smith
- 19,401
- 22
- 85
- 133