Keith,

Neat work! I never looked at any of the Berkeley documentation, so you
just taught me more than I already knew!

Question: How do domains.list and urls.list differ from domains and
urls?

Rick

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Keith Hudson
Sent: Wednesday, November 14, 2001 8:04 PM
To: [EMAIL PROTECTED]
Subject: Database to flat list conversion




There may be a much better way. But.....

In case anyone wants to here is how I do a conversion to a flat text
file from my database files. Assuming BerklyDB is installed in
/usr/local/BerkeleyDB/

cd to the directory where your db files are

then

/usr/local/BerkeleyDB/bin/db_dump -p urls.db | sort | uniq > urls.list

this will create a file called urls.list which only needs the first line
"\00" removed

the same command sequence applied will work for the domains.db as well
but will leave a "." before each domain name so I alter the command this
way

/usr/local/BerkeleyDB/bin/db_dump -p domains.db | cut -d.
-f2,3,4,5,6,7,8,9 | sort | uniq > domains.list

this will create a file called domains.list which only needs the first
line "\00" removed


When I get a blocked domain that I don't want blocked I can do a

cat domains.list | grep some-domain > domains.diff

Note This will overwrite any domains.diff that you currently have

edit the domains.diff to only the names I want to unblock and add the
appropriate -

squidGuard -u


When I get a blocked url that I don't want blocked I can do a

cat urls.list | grep some-url > urls.diff

Note This will overwrite any urls.diff that you currently have

edit the urls.diff to only the names I want to unblock and add the
appropriate -

then I do a squidGuard -u


Have Fun

Keith



Reply via email to