The officially official Devuan Forum!

You are not logged in.

#1 2021-04-06 22:08:02

Altoid
Member
Registered: 2017-05-07
Posts: 761  

[SOLVED] Updatedb and locate in non-system drives

Hello:

Since I discovered it long ago, locate has been one of my favourite tools.

But (as far as I know) it only works on the system drive.
ie: where / lives.

Is there a way to be able to use this tool in other drives?
I find myself searching to files/documents in other drives and have a hard time.

Thanks in advance,

A.

Offline

#2 2021-04-06 23:27:53

GlennW
Member
Registered: 2019-07-18
Posts: 114  

Re: [SOLVED] Updatedb and locate in non-system drives

I use it everywhere.

Especially /home/glenn/local/... 7 partitions in there

But mostly from root (su) konsole.

oh, it does work for user too.

locate konsole | grep .deb | grep /local/archive/
/home/glenn/local/archive/src/apt/debs/amd64/konsolekalendar_4%3a18.08.3-1_amd64.deb
/home/glenn/local/archive/src/apt/debs/i386/pool/DEBIAN/main/k/konsole
/home/glenn/local/archive/src/apt/debs/i386/pool/DEBIAN/main/k/konsole/konsole-kpart_18.04.0-1_i386.deb
/home/glenn/local/archive/src/apt/debs/i386/pool/DEBIAN/main/k/konsole/konsole_18.04.0-1_i386.deb
/home/glenn/local/archive/src/apt/debs/pool/DEBIAN/main/k/konsole
/home/glenn/local/archive/src/apt/debs/pool/DEBIAN/main/k/konsole/konsole-kpart_18.04.0-1_amd64.deb
/home/glenn/local/archive/src/apt/debs/pool/DEBIAN/main/k/konsole/konsole_18.04.0-1_amd64.deb
/home/glenn/local/archive/src/apt/debs-ascii2.1/amd64/konsole-kpart_4%3a18.04.0-1_amd64.deb
/home/glenn/local/archive/src/apt/debs-ascii2.1/amd64/konsolekalendar_4%3a16.04.3-4~deb9u1_amd64.deb
/home/glenn/local/archive/src/apt/debs-ascii2.1/pool/DEBIAN/main/k/konsole
/home/glenn/local/archive/src/apt/debs-ascii2.1/pool/DEBIAN/main/k/konsole/konsole-kpart_16.12.0-4_amd64.deb
/home/glenn/local/archive/src/apt/debs-ascii2.1/pool/DEBIAN/main/k/konsole/konsole_16.12.0-4_amd64.deb
glenn@GamesBox ~ $ 

I generally use it as root when installing softwares...

Does it depend on the baloo and kde5-plasma search settings in "system settings"/Search/file search?

actually, my settings search all except /usr and /var... and one backup partition in ~/local/free

Last edited by GlennW (2021-04-06 23:29:15)

Offline

#3 2021-04-07 00:20:38

Altoid
Member
Registered: 2017-05-07
Posts: 761  

Re: [SOLVED] Updatedb and locate in non-system drives

Hello:

GlennW wrote:

... use it everywhere.
Especially /home/glenn/local/... 7 partitions in there

Yes.
I do too.
But ...

Altoid wrote:

Is there a way to be able to use this tool in other drives?

ie: main drive is /dev/sda but I want to use it on /dev/sde1 which is another disk drive.

Thanks for your input.

Cheers,

A.

Offline

#4 2021-04-07 14:00:35

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 1,597  
Website

Re: [SOLVED] Updatedb and locate in non-system drives

Altoid wrote:

Since I discovered it long ago, locate has been one of my favourite tools.

You should use mlocate instead, it's better. Or try plocate from beowulf-backports, which is better and faster.

I don't use *locate myself but a quick search brings up https://unix.stackexchange.com/question … ternal-hdd ← does that help?


Black Lives Matter

Offline

#5 2021-04-07 16:26:32

Altoid
Member
Registered: 2017-05-07
Posts: 761  

Re: [SOLVED] Updatedb and locate in non-system drives

Hello:

Head_on_a_Stick wrote:

... use mlocate instead, it's better.
... plocate from beowulf-backports, which is better and faster.
... brings up https://unix.stackexchange.com/question … ternal-hdd
... does that help?

Yes, I'll have a look at the alternatives to *locate + the link and see what I can get.
Thanks a lot for your input.  8^)

Best,

A.

Offline

#6 2021-04-08 10:58:05

Altoid
Member
Registered: 2017-05-07
Posts: 761  

Re: [SOLVED] Updatedb and locate in non-system drives

Hello:

Head_on_a_Stick wrote:

... does that help?

Indeed ...
I think I had seen that thread (?) but somehow did not register this post:  https://unix.stackexchange.com/users/11318/daisy:

daisy wrote:

The config file is here: /etc/updatedb.conf, so if you didn't add anything, just mount your HDD, and do updatedb, then you would be able to search for files on external HDD partitions.

Maybe because it only had seven five while first three answers had seven? 8^7

The thing is that there it was and at some time (cannot recall having done it) I had edited /etc/updatedb.conf.
I now know because I commented it: # removed /media 20191224, a very useful thing to do.

Must have done it to keep updatedb from indexing pluggable USBs, not realising that I was keeping out my file storage.
Once again, thanks for your input.

Best,

A.

Offline

#7 2021-04-08 23:08:33

GlennW
Member
Registered: 2019-07-18
Posts: 114  

Re: [SOLVED] Updatedb and locate in non-system drives

oh, i use mlocate.

thank you for making me aware there is more to locate, i had used(?) installed slocate on another distro (Mandriva) long ago.

mlocate (locate command) finds things on my other harddrives as well.

mount | grep /home/
/dev/sde2 on /home/glenn/local/archive type ext4 (rw,relatime)
/dev/sdb3 on /home/glenn/local/data type ext4 (rw,relatime)
/dev/sdb6 on /home/glenn/local/free type ext4 (rw,relatime)
/dev/sdd1 on /home/glenn/local/media type ext4 (rw,relatime)
/dev/sde1 on /home/glenn/local/mt-93gb type ext4 (rw,relatime)
/dev/sdb2 on /home/glenn/local/other type ext4 (rw,relatime)
/dev/sdb4 on /home/glenn/local/spare type ext4 (rw,relatime)
/dev/sde5 on /home/glenn/local/stuff type ext4 (rw,relatime)
/dev/sde4 on /home/glenn/local/videos type ext4 (rw,relatime)

there is a movie with "TedBundy" in the name...

locate TedBundy
/home/glenn/local/data/Videos/Extremely.Wicked,.Shockingly.Evil,.And.Vile.TedBundy.mp4

thanks for the headsup!

Offline

Board footer