#!/bin/sh # # simple locate alike # written as an example how to # use dbtool. # # updatedb creates the database # which is then used by locate # to search for a certain string. # db="/var/db/locate.db"; echo -n > $db find / -ls | egrep -v "^\/proc|dev|tmp" | dbtool -d $db -i -f -R -t "^(.+?) (\/.*)$";