remove urls by date

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

remove urls by date

Post 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.




User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

remove urls by date

Post 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/ .




Post Reply