Page 1 of 1

remove urls by date

Posted: Tue Feb 16, 1999 11:26 am
by Thunderstone


I can't quite figure out the sql syntax for a query on the Visited
date field. The idea is to remove urls that are older than X days
old, or simply those visited prior to a certain fixed date.

I am guessing something along these lines:

gw -d- -s "delete from html where Visited < NOT SURE HERE"
gw -d- -s "delete from refs where Visited < NOT SURE HERE"

Thanks for the help.





remove urls by date

Posted: Tue Feb 16, 1999 12:33 pm
by Thunderstone


To clean html try:

gw -d- -s "delete from html where Visited < '-30 days'">
gw -d- -s "delete from html where Visited < '-1 week'">
gw -d- -s "delete from html where Visited < '1998-05-13 14:01:16'">

There is no Visited field in refs. To delete the correct ones from refs
you will have to collect the Urls deleted from html and
"delete from refs where Url=$Url"
That can be easily accomplished in web script.
See http://www.thunderstone.com/vortexman/ .