Updatedb for findutils-locate fail?

Hi, anybody ever used findutils-locate under LEDE/OpenWRT?
I installed the opkg package, but failed to updatedb...& got message below,

updatedb
find: unrecognized: -fstype
BusyBox v1.26.2 () multi-call binary.

Usage: find [-HL] [PATH]... [OP....... 

what's the problem here? Lede? busybox? wrong-package?

My device is an old MyBookLive Single as a simple net storage.
I need locate to search files, or do you know other tools to implement quick search function?

I find a go version tool at github.com/junegunn/fzf which needed to recompiled for my MBL cpu.
Another GUI version tool for linux desktop at https://github.com/DoTheEvo/ANGRYsearch

But here comes another question, can welocate be worked with (m)locate, maybe I should try to compile mlocate for LEDE. Any suggestion?


fzf is not a db based tool, bug a good quick crawling tool
angry_database.db is sqlite3, which is possible to read via UI web using PHP or Python or Lua

try install mlocate_0.26.orig.tar,
fail to lauch: relocating symbols
problem is: glibc - musl
next?

findutils-locate has updatedb, which defual db path is /usr/local/var/locate.db?
but it seems not work?

find on a file system of typically under 128 MB (and often 16 MB) is very fast.

If not fast enough, output it to a flat file and use fgrep

jeff@office:~$ sudo time find / > /dev/null
real    0m 0.56s
user    0m 0.37s
sys     0m 0.15s

Yes, find / fzf works for quick in time searching
But what I looking for is a db-indexed search tool, because it is for nas-mybooklive with openwrt installed. The data files are over 500GB.

Then I install openwrt opkg findutils-locate, which came with updatadb command,
but it seems not working to updatadb? or need config and add crontab? GNU help page did not help me ...

Then I try install mlocate from source code, which fail to load because of need glibc rather than embeded libc of openwrt

And I am looking AngrySearch src in python. it was designed for GUI, but I think sqlite3 db can be worked in openwrt with python installed.

maybe what I need is PhpFileNavigator,
or sqlite3 like angry_search implement with python.

install/Compile C program in OpenWRT is just not convenience

other choice:
C :seafile-ce do not have search fuction in CE version
PHP: FileRun / Nextcloud is too heavy.


alternative solution :

  • filebrowser/fzf - for in-time search
  • docFecter - for indexed search

This is still an issue in 2022. I just ran into it on 22.03.2. Alas I have a solution. The reason updatedb does not work is because it calls find, which is not the GNU version of find but the busybox neutered version. The fix is really simple.... you have to install both findutils-locate as well as findutils-find.

findutils-find replaces the busybox find with the normal GNU find that has the -fstype switch

The real fix should be that findutils-locate should have findutils-find as a dependency.

2 Likes

Thank you so much for this. You saved a lot of wasted time. And Yes I agree it should be listed as a dependency

1 Like