mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-16 10:50:58 +01:00
16 lines
306 B
Bash
Executable File
16 lines
306 B
Bash
Executable File
#!/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 "^(.+?) (\/.*)$";
|