2009-05-23から1日間の記事一覧

grep --nullでファイル名の後にNULL文字を出す

findとxargs組み合わせるときに find . -type f -print0 | xargs -0 hogeするみたいに、grep -lでファイル名を出力するときにも出来るんかなと思って調べた。--nullつけたらいいらしい。 grep --null -l 'hoge' *.html | xargs -0 hoge

wgetで結果を標準出力に出す

出力先を指定する-Oオプションに-を指定するんだってさ。なんかわかりにくくねー? wget http://www.example.com/ -O - man wget If - is used as file, documents will be printed to standard output, disabling link conversion. はじめこれがわからなか…

WinDump - windowsでtcpdump

http://www.winpcap.org/windump/default.htm WinDump is the Windows version of tcpdump, the command line network analyzer for UNIX. WinDump is fully compatible with tcpdump and can be used to watch, diagnose and save to disk network traffic …

mod_proxy経由でhttpsのサイトにアクセスする

httpは行けるのに、httpsはなんでかForbiddenになる。。。と思っていたらmod_proxy_connectもいるのかー。 http://httpd.apache.org/docs/2.2/ja/mod/mod_proxy.html#allowconnect AllowCONNECT はプロキシの CONNECT メソッドが接続を許可するポート番号の…

forwardでmod_proxyする時にremoteのproxy serverを指定する

多段プロキシにするときとか。簡単だな。 # ProxyRemote match remote-server # remote-server = scheme://hostname[:port] ProxyRemote * http://proxy.example.com:8080/ http://httpd.apache.org/docs/2.2/ja/mod/mod_proxy.html#proxyremote scheme は実…