Re: 1.1.8 ignores my stoplist?

From: Oded Comay <comay@dont-contact.us>
Date: Mon, 17 Mar 1997 22:28:57 +0200 (IST)

Duane Wessels writes:

> ...
> To take them out:
>
> bin/squid -ks # shutdown
> cd cache
> grep -v 'mydomain[12].de' < log > newlog
> mv newlog log
> squid & # restart
>
>(nice administrative interface, eh?)

Indeed! But will it really remove the corresponding files, or just avoid
the HITs? I would think something along the following lines would do both
for a single cache_dir:

     bin/squid -ks # shutdown
     cd cache
     grep 'mydomain[12].de' > list
     grep -v 'mydomain[12].de' < log > newlog
     mv newlog log
     ../bin/squid & # restart
     squidrm list

With the squidrm script similar to:

     #!/usr/local/bin/perl
     $L1= 16; # Level 1 directories
     $L2= 256; # Level 2 directories

     while (<>) {
       $f= hex($_);
       $path= sprintf("%02X/%02X/%08X", $f % $L1, ($f / $L1) % $L2, $f);
       # unlink $path <-- uncomment to actually remove files.
     }

Disclaimer: Never tried the above. Use at your own risk.

>Duane W.

Oded.
Received on Mon Mar 17 1997 - 12:46:31 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:42 MST