幸福飞过海 - 2015年1月 https://fengqi.me/2015/01/ zh-CN 风起的网络记事本 Fri, 23 Jan 2015 07:30:00 +0000 Fri, 23 Jan 2015 07:30:00 +0000 [总结]利用 Privoxy 让命令行下的 wget 和 curl 等命令实现自动代理 https://fengqi.me/unix/328.html https://fengqi.me/unix/328.html Fri, 23 Jan 2015 07:30:00 +0000 风起 curl 和 wget 都可以通过附带参数来使用代理
curl -x http://127.0.0.1:8087 github.com
wget -e "http_proxy=127.0.0.1:8087" github.com

临时用用还好,但是经常使用也就麻烦了,可以通过配置文件简化

shell> cat ~/.wgetrc
https_proxy = http://127.0.0.1:8087
http_proxy = http://127.0.0.1:8087
ftp_proxy = http://127.0.0.1:8087

use_proxy = on
continue = on
check_certificate = off

shell> cat ~/.curlrc
-L
proxy = 127.0.0.1:8087

参数解释:

[...]

]]>
2 https://fengqi.me/unix/328.html#comments https://fengqi.me/feed/2015/01/
[转载]linux定时任务如何每隔0.5秒执行一次呢? https://fengqi.me/unix/325.html https://fengqi.me/unix/325.html Tue, 06 Jan 2015 10:14:11 +0000 风起 参考:linux定时任务如何每隔0.5秒执行一次呢?

* * * * * for i in `seq 120`; do awesome_scripts& sleep 0.5; done

由crontab每分钟调度,每次唤起,循环执行120次,间隔0.5秒.

PS: 很有意思的变通啊.

]]>
0 https://fengqi.me/unix/325.html#comments https://fengqi.me/feed/2015/01/