You are not logged in.

#1 2012-03-11 19:56:19

lgeek
Member
From: Europe, Portugal
Registered: 2012-03-09
Posts: 70

[SOLVED]locate

When I was using Ubuntu, often I use locate to find files on disk, Now on Arch when I do locate says "command not found".
Do I need to install some package?

Last edited by lgeek (2012-03-11 20:19:14)

Offline

#2 2012-03-11 19:59:35

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,652

Re: [SOLVED]locate

core/findutils

Pacman could have helped you with that...

ewaller@odin:~ 1001 %pacman -Ss locate
core/findutils 4.4.2-4 (base) [installed]
    GNU utilities to locate files
core/mlocate 0.25-1 [installed]
    Faster merging drop-in for slocate
extra/perl-file-sharedir 1.03-2
    Locate per-dist and per-module shared files
ewaller@odin:~ 1002 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2012-03-11 20:01:25

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

https://wiki.archlinux.org/index.php/FA … is_X_in.3F
pkgfile is generally a better tool for this job than 'pacman -Ss' as the latter searches only package names and descriptions.

Edit:

ewaller wrote:

core/findutils

Nope, findutils has 'find', mlocate has 'locate'.

Last edited by karol (2012-03-11 20:05:01)

Offline

#4 2012-03-11 20:04:02

lgeek
Member
From: Europe, Portugal
Registered: 2012-03-09
Posts: 70

Re: [SOLVED]locate

I have findutils installed.  And locate doesn't work...
Do I need to install any other package?

Offline

#5 2012-03-11 20:04:02

RichAustin
Member
From: Wakefield, Yorkshire, England
Registered: 2011-07-27
Posts: 186

Re: [SOLVED]locate

There is a very useful command called "whereis". You use it like this:

[richard@localhost ~]$ whereis firefox
firefox: /usr/bin/firefox /usr/lib/firefox

The help for it looks like this:

[richard@localhost ~]$ whereis -h

Usage:
 whereis [options] file

Options:
 -f <file>  define search scope
 -b         search only binaries
 -B <dirs>  define binaries lookup path
 -m         search only manual paths
 -M <dirs>  define man lookup path
 -s         search only sources path
 -S <dirs>  define sources lookup path
 -u         search from unusual enties
 -V         output version information and exit
 -h         display this help and exit

See how to use file and dirs arguments from whereis(1) manual.

Last edited by RichAustin (2012-03-11 20:05:10)

Offline

#6 2012-03-11 20:04:54

lgeek
Member
From: Europe, Portugal
Registered: 2012-03-09
Posts: 70

Re: [SOLVED]locate

Thanks for the information big_smile

Offline

#7 2012-03-11 20:06:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

RichAustin wrote:

There is a very useful command called "whereis".]

You have to have the package (e.g. mlocate) installed, otherwise 'whereis' won't help you at all.

Offline

#8 2012-03-11 20:07:39

RichAustin
Member
From: Wakefield, Yorkshire, England
Registered: 2011-07-27
Posts: 186

Re: [SOLVED]locate

karol wrote:
RichAustin wrote:

There is a very useful command called "whereis".]

You have to have the package (e.g. mlocate) installed, otherwise 'whereis' won't help you at all.


I must admit karol I didn't know that.

Offline

#9 2012-03-11 20:11:12

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]locate


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2012-03-11 20:14:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

Mr.Elendig wrote:

Is kittyfile web-only or does it have a local / offline version? 'nosr kittyfile' didn't reveal anything ;P

Offline

#11 2012-03-11 20:15:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]locate

use nosr for searching offline, kittyfile is just a horribly badly written naive webapp to search the same filedb. ( I wrote it in like 15 mins just to play with cherrypy tongue)

Last edited by Mr.Elendig (2012-03-11 20:16:14)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2012-03-11 20:18:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

Mr.Elendig wrote:

kittyfile is just a horribly badly written naive webapp to search the same filedb

Ah, OK thanks ... and sorry. I think I broke teh kitty - it's' not working for me anymore sad



@lgeek
Please remember to mark the thread as solved: https://bbs.archlinux.org/viewtopic.php?id=130309

Offline

#13 2012-03-11 20:23:08

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]locate

karol wrote:
Mr.Elendig wrote:

kittyfile is just a horribly badly written naive webapp to search the same filedb

Ah, OK thanks ... and sorry. I think I broke teh kitty - it's' not working for me anymore sad

Nha, it was just doing a db update, it is done now.

Last edited by Mr.Elendig (2012-03-11 20:23:35)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#14 2012-03-11 20:25:41

lgeek
Member
From: Europe, Portugal
Registered: 2012-03-09
Posts: 70

Re: [SOLVED]locate

I had to do that.. But after all it worked

Offline

#15 2012-03-11 20:27:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

kittyfile seems to have the same limitation as http://arm.konnichi.com/find/index.php? … n%2Flocate - only absolute filenames are currently supported.

Offline

#16 2012-03-11 20:37:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]locate

karol wrote:

kittyfile seems to have the same limitation as http://arm.konnichi.com/find/index.php? … n%2Flocate - only absolute filenames are currently supported.

wrong, read up on regex/globbing
eg */bin/locate  and *pacman etc works fine smile


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#17 2012-03-11 20:50:03

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED]locate

'*pacman' works indeed. This kitty is full of surprises :-)

Offline

#18 2012-05-02 02:28:34

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [SOLVED]locate

So 'mlocate' is not installed by default anymore?  I thought on my initial install that it was.  Installed via core install media this time and didn't think to check for it.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#19 2012-05-02 10:27:42

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED]locate

Gen2ly wrote:

So 'mlocate' is not installed by default anymore?  I thought on my initial install that it was.  Installed via core install media this time and didn't think to check for it.

Since 3 years ago or something.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#20 2023-05-10 19:30:47

syryndypyty
Member
Registered: 2022-11-22
Posts: 13

Re: [SOLVED]locate

This

sudo pacman -S mlocate
sudo updatedb
locate whatever

Offline

#21 2023-05-10 19:38:08

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED]locate

Closing this ancient thread.

Offline

Board footer

Powered by FluxBB