maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   File tools: updatedb locate (https://talk.maemo.org/showthread.php?t=40647)

dchky 2010-08-14 14:57

Re: File tools: updatedb locate
 
Because 'locate' has been around since long before those Unix hippies even began to start thinking about growing their hair out in to a long 'stick it to the man' pony tail. : )

I kid! - sorry if I offended anyone.

I guess for me it's familiarity, and (perhaps an incorrect) assumption that tracker was for indexing multimedia, not 'everything' starting at /

rcull 2010-08-14 20:50

Re: File tools: updatedb locate
 
You can quite easily roll your own.

updatedb as a shell script:-

Code:

find / -print > /home/user/MyDocs/updatedb

locate :-

Code:

grep "$*" /home/user/MyDocs/updatedb

ArnimS 2011-02-28 22:38

Re: Bug fix
 
Quote:

Originally Posted by dchky (Post 755826)
For anyone wanting to actually be able to use updatedb from the locate package, there's a tiny problem with the updatedb script.

You'll need to edit /usr/bin/gnu/updatedb

Line 208 ----> : ${find:=${BINDIR}/find}

Change this to ----> : ${find:=${BINDIR}/gfind}

Once done, gupdatedb and glocate will work as expected.

Hope this helps someone : )

I don't see how it could, as there is no 'gfind' installed, but there is a 'find' so the existing script works correctly without this change.

However that locate package *does* need fixing.
i used
mv /usr/bin/gnu/* /usr/bin

zimon 2011-02-28 23:01

Re: File tools: updatedb locate
 
Quote:

Originally Posted by Patola (Post 786337)
Why would you install updatedb/slocate? You would have two tools that do the same thing. Tracker already indexes all the files. "tracker-files -s Files | grep -i string" locates what you want (I don't know why tracker-search does not work though).

tracker-files doesn't seem to find what I want:

Code:

Nokia-N900:~# tracker-files -s Files | grep frcode   

NOTE: Limit was reached, there are more items in the database not listed here
Nokia-N900:~# tracker-files -l 4096 -s Files | grep frcode
Nokia-N900:~# locate frcode
/home/opt/maemo/usr/lib/locate-gnu/frcode
/opt/maemo/usr/lib/locate-gnu/frcode
/usr/lib/locate-gnu/frcode



All times are GMT. The time now is 04:06.

vBulletin® Version 3.8.8