locate j*.vim doesn't work?

I've read the locate man page and searched this site, but I don't see how to do this:I'm looking for all *.vim files starting with j. How can I use locate to achieve this?[docker@docker1 ~]$ locate java.vim/usr/share/vim/vim74/ftplugin/java.vim/usr/share/vim/vim74/indent/java.vim/usr/share/vim/vim74/syntax/java.vim[docker@docker1 ~]$ locate "j*.vim"[docker@docker1 ~]$...Read more

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 locate can output the matched pattern with color ( just like grep --color)Is there any way to do so for locate command ?...Read more

Locate specific folders

I want to locate all folders on my server that end with 'wordpress-seo'.I tried find command but it takes too long.sudo find /home/w/s -type d -name 'wordpress-seo'Now I am trying Locate command but it returns all paths that have wordpress-seo.a/wp-content/plugins/wordpress-seoa/wp-content/plugins/wordpress-seo/languages/......I want to exclude wordpress-seo/* files and folders. I just want folder names. i.e.a/wp-content/plugins/wordpress-seob/wp-content/plugins/wordpress-seoTried regex without any luck. locate -r '/\w+wordpress\-seo/b'ORlocat...Read more

Difference between locate and mlocate

I wanted to install the command locate, which is available via sudo apt-get installmlocate. However, I first ran sudo apt-get installlocate which seems to have installed something else.Typing the command locate <package> however seems to call upon mlocate.What is the package locate, and can (should) it be safely removed?...Read more

How to locate a path?

Is it possible to locate a path in the file system like what can be done for file names? For example I want to find all paths in system that include 'foo/bar', which may have the following result: /home/myname/test/foo/bar/hello /var/www/site/foo/bar...Read more

locate stop repeating when a directory contains a name

Sometimes when using locate, my search string will (either incidentally or intentionally) match a portion of a directory. This causes everything below that point in the directory to be printed. For example:$ locate lib/home/myname/libImWorkingOn/libImWorkingOn.so/lib//lib/modules//lib/firmware/.... etcThis quickly gets out of hand and makes it difficult to search.Is there a way to prevent this? For example, have it print:$locate lib/home/myname/libImWorkingOn/libImWorkingOn.so/lib/And nothing more?Additionally, is it possible to look for a dire...Read more

locate - 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 database, but I still get the same error:sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plistI tried so many things including installing locate, but the commands work in Ubuntu seem not to work in mac os. Does anybody know what the issue is?Thanks in advance,...Read more

How to use locate with a world-unreadable home directory

man locate says: The locate database is typically built by user ``nobody'' and the locate.updatedb(8) utility skips directories which are not readable for user ``nobody'', group ``nobody'', or world. For example, if your HOME directory is not world-readable, none of your files are in the database.Since it's better for security to have a non-world-readable home directory, how do I make my home directory searchable (for me only)?Obviously, I can just work around it by adding find ~ -type f > .locate in crontab and then do grep <search> ...Read more