void

          批量清除Squid緩存的小工具

          很實用的一個清除squid緩存的小工具:
          http://www.wa.apana.org.au/~dean/squidpurge/

          wget http://www.wa.apana.org.au/~dean/sources/purge-20040201-src.tar.gz
          tar zxvf purge-20040201-src.tar.gz
          cd purge
          make
          [root@cache purge]# ./purge -help
          ### Use at your own risk! No guarantees whatsoever. You were warned. ###

          $Id: purge.cc,v 1.17 2000/09/21 10:59:53 cached Exp $
          Usage: purge   [-a] [-c cf] [-d l] [-(f|F) fn | -(e|E) re] [-p h[:p]]
                          [-P #] [-s] [-v] [-C dir [-H]] [-n]

          -a     display a little rotating thingy to indicate that I am alive (tty only).
          -c c   squid.conf location, default "/usr/local/squid/etc/squid.conf".
          -C dir base directory for content extraction (copy-out mode).
          -d l   debug level, an OR of different debug options.
          -e re single regular expression per -e instance (use quotes!).
          -E re single case sensitive regular expression like -e.
          -f fn name of textfile containing one regular expression per line.
          -F fn name of textfile like -f containing case sensitive REs.
          -H     prepend HTTP reply header to destination files in copy-out mode.
          -n     do not fork() when using more than one cache_dir.
          -p h:p cache runs on host h and optional port p, default is localhost:3128.
          -P #   if 0, just print matches; otherwise OR the following purge modes:
                     0x01 really send PURGE to the cache.
                     0x02 remove all caches files reported as 404 (not found).
                     0x04 remove all weird (inaccessible or too small) cache files.
                  0 and 1 are recommended - slow rebuild your cache with other modes.
          -s     show all options after option parsing, but before really starting.
          -v     show more information about the file, e.g. MD5, timestamps and flags.

          1.清除URL中包含jackbillow.com的所有緩存
          ./purge -p 127.0.0.1:80 -P 1 -se 'jackbillow.com'

          2.清除 URL 以“.mp3”結尾的緩存文件,例如:http://www.jackbillow.com/abc/test.mp3
          ./purge -p 127.0.0.1:80 -P 1 -se '\.mp3$'

          posted on 2009-06-26 10:17 void 閱讀(629) 評論(0)  編輯  收藏 所屬分類: Squid

          主站蜘蛛池模板: 涿州市| 嵊泗县| 商丘市| 固安县| 西充县| 安陆市| 景东| 辽中县| 石河子市| 石狮市| 宾阳县| 会泽县| 定兴县| 呼玛县| 沁阳市| 邵阳市| 浦北县| 监利县| 应城市| 滨州市| 桐庐县| 介休市| 云林县| 电白县| 诸城市| 大安市| 遂宁市| 阿巴嘎旗| 策勒县| 英山县| 托克逊县| 邻水| 新疆| 郓城县| 河津市| 厦门市| 蓝山县| 化州市| 德令哈市| 浦城县| 高青县|