Questions tagged [locate]

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.

263 questions
261
votes
8 answers

Find all files with name containing string

I have been searching for a command that will return files from the current directory which contain a string in the filename. I have seen locate and find commands that can find files beginning with something first_word* or ending with something…
Dru
  • 9,632
  • 13
  • 49
  • 68
101
votes
5 answers

How can I find a file/directory that could be anywhere on linux command line?

Ideally, I would be able to use a program like find [file or directory name] to report the paths with matching filenames/directories. Unfortunately this seems to only check the current directory, not the entire folder. I've also tried locate and…
johncorser
  • 9,262
  • 17
  • 57
  • 102
17
votes
2 answers

Centos - "locate" command doesn't work

We have Centos 7. Trying to use the 'locate' command yields nothing, even if the searched file[s] actually exist. No error is printed. Also executed 'sudo updatedb' to update the 'locate' indexes. Any ideas? Thank you
user3139774
  • 1,295
  • 3
  • 13
  • 24
15
votes
5 answers

Where is vcbuild in VS2010?

I've upgraded to VS2010 and am looking for the vbuild executable. For VS2008, it was under: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages\vcbuild.exe Where is it for VS2010? It's not under: C:\Program Files (x86)\Microsoft…
Patrick Lorio
  • 5,520
  • 11
  • 45
  • 74
13
votes
2 answers

glib.h: No such file or directory

I tried installing gtk and glib using sudo apt-get install libglib2.0-dev and sudo apt-get install libgtk2.0-dev but locate glib.h does not return any path for glib results of locate glib.h are $ locate…
chinmay
  • 321
  • 1
  • 6
  • 19
13
votes
2 answers

How can I `find` files matching pattern within a directory matching another pattern from the command line?

Say I want to find all files in /Path named file_name*. Easy: $ find /Path -name "file_name*" /Path/foo1/file_name1.txt /Path/foo2/file_name2.txt /Path/bar3/file_name3.txt /Path/bar4/file_name4.txt What if I only want to search subdirectories like…
Ryan
  • 14,682
  • 32
  • 106
  • 179
10
votes
4 answers

Use command grep and locate

How I can make the grep command locate certain words in the files specified by the routes found by the locate command? locate my.cnf | grep user (I want that grep command search the word "user" on the files found for locate command)
Jhonathan
  • 1,611
  • 2
  • 13
  • 24
10
votes
5 answers

How come the unix locate command still shows files/folders that aren't there any more?

I recently moved my whole local web development area over to using MacPorts stuff, rather than using MAMP on my Mac. I've been getting into Python/Django and didn't really need MAMP any more. Thing is, I have uninstalled MAMP from the Applications…
littlejim84
  • 9,071
  • 15
  • 54
  • 77
9
votes
1 answer

Can't locate File/Glob.pm in @INC (@INC contains: D:/tools/lib .) at directory.pl line 2

I get this error when running my perl code Can't locate File/Glob.pm in @INC (@INC contains: D:/tools/lib .) at directory.pl line 2. line 2: @files=<*>; When i run the command, I get, Y:\perl\perl>perldoc -l…
freshWoWer
  • 61,969
  • 10
  • 36
  • 35
9
votes
4 answers

When and how can I locate an element by tag name using Selenium WebDriver? Please explain with an example

I have used most of the element locators while testing with Selenium, but very low frequently used the 'TagName' locator. Please give an example.
Santosh
  • 101
  • 1
  • 1
  • 3
7
votes
3 answers

Locate command can't find anything inside Documents folder on mac

As it says in the description. I first check our database is up to date mh547:bin crashandburn4$ sudo /usr/libexec/locate.updatedb Password: #password entered and function executed without errors I then try and search for something inside my…
Mike H-R
  • 7,726
  • 5
  • 43
  • 65
6
votes
1 answer

String to Date Format as DD/MM/YYY in Python - Portuguese

I would like to convert the string "23/02/2018" to a date format as 23-fev-2018. Most importanly is that, the month must be in portuguese language, refering to fevereiro. My issue is that usually the datetime.date prints like (YYYY,MM,DD): import…
6
votes
1 answer

bash locate command with pattern

I try to find a file with locate command. It behaves itself some strange with patterns, at least not like ls or find commands. I do the following: sh@sh:~$ locate rhythmdb /home/sh/.local/share/rhythmbox/rhythmdb.xml sh@sh:~$ locate…
Tebe
  • 3,176
  • 8
  • 40
  • 60
6
votes
4 answers

How can I force grep to only return files and ignore directories?

I'm trying to use grep to automatically locate the bibtex program in the user's bin folder. The problem is, it frequently returns a directory with the name bibtex, which means that the script fails to automatically run the command. How can I force…
icecreamhead
  • 111
  • 1
  • 12
5
votes
1 answer

using locate function on calculated field in delphi

How can we use locate function or a same operation function using a calculated field in delphi Tadotable? something like this SampleAdotable.locate('samplefield',text,[lopartialkey]); where samplefield is a calculated field in SampleAdotable.In…
nader
  • 71
  • 4
1
2 3
17 18