Skip to content

Instantly share code, notes, and snippets.

@HeLiBloks
Last active May 4, 2016 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HeLiBloks/b0cc203f10665d89034b to your computer and use it in GitHub Desktop.
Save HeLiBloks/b0cc203f10665d89034b to your computer and use it in GitHub Desktop.
Useful squid commands
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