mlocate

mlocate

Install mlocate

[~] # opkg list mlocate   
mlocate - 0.26-1 - Quickly find files on the filesystem based on their name mlocate is a new
 implementation of locate, a tool to find files anywhere in the filesystem
 based on their name, using a fixed pattern or a regular expression. Unlike
 other tools like find(1), locate uses a previously created database to perform
 the search, allowing queries to execute much faster. This database is updated
 periodically from cron.
[~] # opkg install mlocate
Installing mlocate (0.26-1) to root...
Downloading http://bin.entware.net/armv7sf-k3.2/mlocate_0.26-1_armv7-3.2.ipk
Configuring mlocate.

Fix permissions

grep -s mlocate /etc/group || addgroup mlocate
chgrp mlocate /opt/var/mlocate
chmod g=rx,o= /opt/var/mlocate
chgrp mlocate /opt/bin/locate
chmod g+s,go-w /opt/bin/locate
touch /opt/var/mlocate/mlocate.db
chgrp mlocate /opt/var/mlocate/mlocate.db

Update the DB

updatedb
  • mlocate.txt
  • Last modified: 2020/09/12 12:28
  • by admin
  • Currently locked by: 172.18.0.1