Last active
May 4, 2016 09:38
-
-
Save HeLiBloks/b0cc203f10665d89034b to your computer and use it in GitHub Desktop.
Useful squid commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . | xargs head -n1 | strings | grep :// > squid-urls.txt #list of urls in squid cache | |
#purge pattern from cache | |
for x in `cat squid-urls.txt | grep foo`; do | |
squidclient -m PURGE $x ; | |
done | |
#format the dates | |
perl -p -e 's/^([0-9\.]*)/"[".localtime($1)."]"/e' *.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment