#!/bin/sh # # simple locate alike # written as an example how to # use dbtool. # # locate searches the database # for a file which matches a # certain string. The parameter # to locate can be a fully perl- # compliant regular expression. # db="/var/db/locate.db" regex=$1 if test -n "$regex"; then dbtool -d $db -S -k $regex -w -R else echo "Usage: locate " fi