<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hexec的BLOG~~</title>
	<atom:link href="http://www.chenhuan.net/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chenhuan.net</link>
	<description>Windows能干而Linux干不了的事，那就是不需要干的事</description>
	<lastBuildDate>Thu, 12 Jan 2012 14:39:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.chenhuan.net/?pushpress=hub'/>
		<item>
		<title>博客恢复，空间迁移至香港主机</title>
		<link>http://www.chenhuan.net/blog-resume-hk.html</link>
		<comments>http://www.chenhuan.net/blog-resume-hk.html#comments</comments>
		<pubDate>Tue, 10 Jan 2012 13:17:36 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[公告]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=348</guid>
		<description><![CDATA[之前的主机欠费，考虑到那个主机速度也不佳，就一直没有续费，直到现在发现这个香港主机不错，就搬到这上面来啦

Related Posts0Recent Commentsstrider : 渔翁，貌似你的链接很多都死了，友情提醒下，微波信号君早已把域名换成了http://www.viech...

test : test

<span class="readmore"><a href="http://www.chenhuan.net/blog-resume-hk.html" title="博客恢复，空间迁移至香港主机">阅读全文——共52字</a></span>]]></description>
			<content:encoded><![CDATA[<p>之前的主机欠费，考虑到那个主机速度也不佳，就一直没有续费，直到现在发现这个香港主机不错，就搬到这上面来啦</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://www.pureage.info" >strider</a> : <a class="comment_content" href="http://www.chenhuan.net/blog-resume-hk.html#comment-5025" title="View the entire comment by strider" >渔翁，貌似你的链接很多都死了，友情提醒下，微波信号君早已把域名换成了http://www.viech...</a></li>
<li><a class="commentor" href="" >test</a> : <a class="comment_content" href="http://www.chenhuan.net/blog-resume-hk.html#comment-4961" title="View the entire comment by test" >test</a></li>
<li><a class="commentor" href="" >__詸°</a> : <a class="comment_content" href="http://www.chenhuan.net/blog-resume-hk.html#comment-4806" title="View the entire comment by __詸°" >test</a></li>
<li><a class="commentor" href="http://www.7twx.com" >七天大圣</a> : <a class="comment_content" href="http://www.chenhuan.net/blog-resume-hk.html#comment-3395" title="View the entire comment by 七天大圣" >不错不错。学习了</a></li>
<li><a class="commentor" href="" >免验证码备案</a> : <a class="comment_content" href="http://www.chenhuan.net/blog-resume-hk.html#comment-3296" title="View the entire comment by 免验证码备案" >1vl1rh http://www.chachabeian.com# http://www.chen...</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/blog-resume-hk.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>python+qt编写的802.1x拨号器</title>
		<link>http://www.chenhuan.net/python-802-1x.html</link>
		<comments>http://www.chenhuan.net/python-802-1x.html#comments</comments>
		<pubDate>Mon, 05 Sep 2011 12:36:20 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[CODE]]></category>
		<category><![CDATA[802.1x]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=342</guid>
		<description><![CDATA[适用于电子科大清水河校区的802.1x认证网络，也应该适用于其它使用MD5-Challenge方式进行EAP认证的802.1x网络

由于使用qt编写，因此需要先安装pyqt4，方能运行本程序

刷新IP部分使用了network manager的dbus接口，但是在某些发行版上可能并没有dbus或者networkmanager，这时本程序就无法自动获取ip地址，需要根据程序状态的提示，自行使用对应的dhcp命令手动刷新ip

<span class="readmore"><a href="http://www.chenhuan.net/python-802-1x.html" title="python+qt编写的802.1x拨号器">阅读全文——共228字</a></span>]]></description>
			<content:encoded><![CDATA[<p>适用于电子科大清水河校区的<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/802-1x" title="查看 802.1x 中的全部文章" target="_blank">802.1x</a></span>认证网络，也应该适用于其它使用MD5-Challenge方式进行EAP认证的<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/802-1x" title="查看 802.1x 中的全部文章" target="_blank">802.1x</a></span>网络</p>
<p>由于使用qt编写，因此需要先安装pyqt4，方能运行本程序</p>
<p>刷新IP部分使用了network manager的dbus接口，但是在某些发行版上可能并没有dbus或者networkmanager，这时本程序就无法自动获取ip地址，需要根据程序状态的提示，自行使用对应的dhcp命令手动刷新ip</p>
<p>点击<a href="http://www.chenhuan.net/wp-content/uploads/2011/09/py8021x.zip" target="_blank">此处</a>下载</p>
<p>欢迎来邮件讨论相关问题~~~</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="" >iPeaNy</a> : <a class="comment_content" href="http://www.chenhuan.net/python-802-1x.html#comment-5261" title="View the entire comment by iPeaNy" > <img src='http://www.chenhuan.net/wp-includes/images/oniontou/03.gif' alt='[s:22]' class='wp-smiley' /> 早怎么不知道啊...</a></li>
<li><a class="commentor" href="" >阿杰</a> : <a class="comment_content" href="http://www.chenhuan.net/python-802-1x.html#comment-1886" title="View the entire comment by 阿杰" >你好，博主，我需要Packet Tracer的easy VPN配置模拟的PKT文件，发现已经不能下载...</a></li>
<li><a class="commentor" href="http://www.programlife.net/" >代码疯子</a> : <a class="comment_content" href="http://www.chenhuan.net/python-802-1x.html#comment-1743" title="View the entire comment by 代码疯子" > <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' /> </a></li>
<li><a class="commentor" href="http://shieffan.me" >Shieffan</a> : <a class="comment_content" href="http://www.chenhuan.net/python-802-1x.html#comment-1731" title="View the entire comment by Shieffan" >欢歌威武霸气  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/python-802-1x.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fedora缺少libc.a静态库的解决方法</title>
		<link>http://www.chenhuan.net/fedora-no-libc-a.html</link>
		<comments>http://www.chenhuan.net/fedora-no-libc-a.html#comments</comments>
		<pubDate>Mon, 07 Mar 2011 11:51:46 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[glibc]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=332</guid>
		<description><![CDATA[Fedora中默认是没有包括C语言库的静态文件libc.a，导致使用静态链接时会报错

解决方法是安装glibc-static包

yum install glibc-static即可！

<span class="readmore"><a href="http://www.chenhuan.net/fedora-no-libc-a.html" title="Fedora缺少libc.a静态库的解决方法">阅读全文——共87字</a></span>]]></description>
			<content:encoded><![CDATA[<p> Fedora中默认是没有包括C语言库的静态文件libc.a，导致使用静态链接时会报错</p>
<p>解决方法是安装<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/glibc" title="查看 glibc 中的全部文章" target="_blank">glibc</a></span>-static包</p>
<p>yum install <span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/glibc" title="查看 glibc 中的全部文章" target="_blank">glibc</a></span>-static即可！</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://zuoshahao.com" >ricki</a> : <a class="comment_content" href="http://www.chenhuan.net/fedora-no-libc-a.html#comment-1942" title="View the entire comment by ricki" >我自己也装了 wordpress thread comment，发现首次评论会刷新整个页面</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/fedora-no-libc-a.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>使用loop设备巧妙创建限制大小的目录</title>
		<link>http://www.chenhuan.net/size-quota-directory.html</link>
		<comments>http://www.chenhuan.net/size-quota-directory.html#comments</comments>
		<pubDate>Tue, 11 Jan 2011 14:34:22 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[loop]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=326</guid>
		<description><![CDATA[有的时候我们有这样的需求，需要建立一个目录，但是要限定该目录的大小在一个指定值，比如1G

现有的办法中可以通过磁盘配额来实现，但是磁盘配额是限定用户的配额，只能间接的通过设定家目录的方法来达到限制目录大小，而且在有的场合并不适用，如用户固定，而目录较多

逛了一些论坛，看到有这样的办法，不得不说很是巧妙

<span class="readmore"><a href="http://www.chenhuan.net/size-quota-directory.html" title="使用loop设备巧妙创建限制大小的目录">阅读全文——共439字</a></span>]]></description>
			<content:encoded><![CDATA[<p>有的时候我们有这样的需求，需要建立一个目录，但是要限定该目录的大小在一个指定值，比如1G</p>
<p>现有的办法中可以通过磁盘配额来实现，但是磁盘配额是限定用户的配额，只能间接的通过设定家目录的方法来达到限制目录大小，而且在有的场合并不适用，如用户固定，而目录较多</p>
<p>逛了一些论坛，看到有这样的办法，不得不说很是巧妙<br />
<span id="more-326"></span><br />
首先通过<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/dd" title="查看 dd 中的全部文章" target="_blank">dd</a></span>命令产生一个指定大小的文件，如生成一个1G的img文件<br />
<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/dd" title="查看 dd 中的全部文章" target="_blank">dd</a></span> if=/dev/zero of=/home/test.img bs=1M count=1024</p>
<p>之后，通过该test.img文件，生成一个<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/loop" title="查看 loop 中的全部文章" target="_blank">loop</a></span>设备<br />
losetup /dev/<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/loop" title="查看 loop 中的全部文章" target="_blank">loop</a></span>1 /home/test.img</p>
<p>随后在该loop设备上创建文件系统，如创建ext4<br />
mkfs.ext4 /dev/loop1</p>
<p>现在，建立需要限制大小的目录，将/dev/loop1挂载到该目录，一个不能超过指定大小的目录就创建成功了！</p>
<p>但是，这样做，代价是损失了一些效率，因为原先直接在磁盘中读取变成了磁盘到loop再到磁盘的过程，效率肯定有所下降</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://www.jxfun.com" >淘乐</a> : <a class="comment_content" href="http://www.chenhuan.net/size-quota-directory.html#comment-1038" title="View the entire comment by 淘乐" >不错也～～～～</a></li>
<li><a class="commentor" href="http://www.dlbus.info" >dlbus</a> : <a class="comment_content" href="http://www.chenhuan.net/size-quota-directory.html#comment-1000" title="View the entire comment by dlbus" >Very Very Good!!</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/size-quota-directory.html#comment-987" title="View the entire comment by Hexec" >@hplonline, 我也不懂 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' /> 不知道咋了就发过来了 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' /> ...</a></li>
<li><a class="commentor" href="" >hplonline</a> : <a class="comment_content" href="http://www.chenhuan.net/size-quota-directory.html#comment-986" title="View the entire comment by hplonline" >@hplonline, 

不对，应该把allow pingback 关了 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/02.gif' alt='[s:12]' class='wp-smiley' /> 
...</a></li>
<li><a class="commentor" href="" >hplonline</a> : <a class="comment_content" href="http://www.chenhuan.net/size-quota-directory.html#comment-985" title="View the entire comment by hplonline" >@Hexec, 

 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/03.gif' alt='[s:22]' class='wp-smiley' /> 还记录前链，太猥琐了，

 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/02.gif' alt='[s:12]' class='wp-smiley' /> 没关refer...</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/size-quota-directory.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>新年快乐</title>
		<link>http://www.chenhuan.net/2011-new-year.html</link>
		<comments>http://www.chenhuan.net/2011-new-year.html#comments</comments>
		<pubDate>Fri, 31 Dec 2010 16:16:46 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[2011]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=324</guid>
		<description><![CDATA[元旦快乐！！！好久没写日志了，最近整理点东西写写。。。。

Related Posts0Recent Commentsdongyinmei : hahahhaha!!!!!

Hexec : @我不在撒哈拉，就在去塔克拉玛干的路上, 湖哥太威武了

<span class="readmore"><a href="http://www.chenhuan.net/2011-new-year.html" title="新年快乐">阅读全文——共28字</a></span>]]></description>
			<content:encoded><![CDATA[<p>元旦快乐！！！好久没写日志了，最近整理点东西写写。。。。</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="" >dongyinmei</a> : <a class="comment_content" href="http://www.chenhuan.net/2011-new-year.html#comment-1912" title="View the entire comment by dongyinmei" >hahahhaha!!!!!</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/2011-new-year.html#comment-948" title="View the entire comment by Hexec" >@我不在撒哈拉，就在去塔克拉玛干的路上, 湖哥太威武了</a></li>
<li><a class="commentor" href="" >我不在撒哈拉，就在去塔克拉玛干的路上</a> : <a class="comment_content" href="http://www.chenhuan.net/2011-new-year.html#comment-947" title="View the entire comment by 我不在撒哈拉，就在去塔克拉玛干的路上" >太水了。。。 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/08.gif' alt='[s:08]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/2011-new-year.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>用expect实现自动发送密码</title>
		<link>http://www.chenhuan.net/expect-shell.html</link>
		<comments>http://www.chenhuan.net/expect-shell.html#comments</comments>
		<pubDate>Fri, 10 Dec 2010 05:09:43 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[expect]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[spawn]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=317</guid>
		<description><![CDATA[经常遇到这种情况，如使用ssh,scp等一些命令时需要输入密码，但是如果这个命令是经常敲的（比如fanqiang），每次都输入密码确实很烦，对于ssh可以使用证书登录来解决，但是这个并不能适用于所有需要输密码的情形，所以可以通过以下的办法自动发送密码来实现免输密码登录（实际上还是输了密码，只不过不需要手动输入了）。



要做到这一点，使用的东西就是expect，和它下面的spawn

<span class="readmore"><a href="http://www.chenhuan.net/expect-shell.html" title="用expect实现自动发送密码">阅读全文——共669字</a></span>]]></description>
			<content:encoded><![CDATA[<p>经常遇到这种情况，如使用ssh,scp等一些命令时需要输入密码，但是如果这个命令是经常敲的（比如fanqiang），每次都输入密码确实很烦，对于ssh可以使用证书登录来解决，但是这个并不能适用于所有需要输密码的情形，所以可以通过以下的办法自动发送密码来实现免输密码登录（实际上还是输了密码，只不过不需要手动输入了）。<br />
<span id="more-317"></span><br />
要做到这一点，使用的东西就是<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/expect" title="查看 expect 中的全部文章" target="_blank">expect</a></span>，和它下面的<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/spawn" title="查看 spawn 中的全部文章" target="_blank">spawn</a></span><br />
在脚本中首先要加上#!/bin/<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/expect" title="查看 expect 中的全部文章" target="_blank">expect</a></span>，使用expect来运行脚本，之后在需要监视的命令前加上<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/spawn" title="查看 spawn 中的全部文章" target="_blank">spawn</a></span>，只有在<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/spawn" title="查看 spawn 中的全部文章" target="_blank">spawn</a></span>后执行的<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/shell" title="查看 shell 中的全部文章" target="_blank">shell</a></span>命令，才会被expect捕捉到。</p>
<p>随后通过expect “something”，来捕捉信息，如 expect “password:”，这样expect捕捉到命令行中有password:这样的字条串后，才可以使用send等命令发送密码或其它字符。</p>
<p>捕捉到待输入密码后，使用send “yourpassword\r”，将密码发送，最后要加上回车符\r。</p>
<p>这样虽然密码发送了，但是往往还达不到效果，因为spawn监视的命令行执行完的会发送一个eof，我们同样要捕捉这一个eof，来结束命令执行，最后要写上expect eof</p>
<p>这样，整个过程就可以说完成了，附上一个fanqiang用的expect脚本</p>
<pre class="brush: bash; title: ; notranslate">
#!/usr/bin/expect 

spawn ssh -qTfnN -D 7070 username@server
expect -exact &quot;password:&quot;
send &quot;yourpassword\r&quot;
expect eof
</pre>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="" >565635853</a> : <a class="comment_content" href="http://www.chenhuan.net/expect-shell.html#comment-3660" title="View the entire comment by 565635853" >请教一下，这是怎么回事呢
spawn ssh root@192.168.5.92
couldn'...</a></li>
<li><a class="commentor" href="" >不行</a> : <a class="comment_content" href="http://www.chenhuan.net/expect-shell.html#comment-1017" title="View the entire comment by 不行" >不行，密码一发ssh进程就挂了…… <img src='http://www.chenhuan.net/wp-includes/images/oniontou/15.gif' alt='[s:10]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/expect-shell.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>linux使用dd命令快速生成大文件</title>
		<link>http://www.chenhuan.net/dd-large-file.html</link>
		<comments>http://www.chenhuan.net/dd-large-file.html#comments</comments>
		<pubDate>Sat, 30 Oct 2010 15:58:53 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux.dd]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=314</guid>
		<description><![CDATA[dd命令可以轻易实现创建指定大小的文件，如

dd if=/dev/zero of=test bs=1M count=1000

会生成一个1000M的test文件，文件内容为全0（因从/dev/zero中读取，/dev/zero为0源）

<span class="readmore"><a href="http://www.chenhuan.net/dd-large-file.html" title="linux使用dd命令快速生成大文件">阅读全文——共383字</a></span>]]></description>
			<content:encoded><![CDATA[<p>dd命令可以轻易实现创建指定大小的文件，如</p>
<p>dd if=/dev/zero of=test bs=1M count=1000</p>
<p>会生成一个1000M的test文件，文件内容为全0（因从/dev/zero中读取，/dev/zero为0源）</p>
<p>但是这样为实际写入硬盘，文件产生速度取决于硬盘读写速度，如果欲产生超大文件，速度很慢</p>
<p>在某种场景下，我们只想让文件系统认为存在一个超大文件在此，但是并不实际写入硬盘<br />
<span id="more-314"></span><br />
则可以<br />
dd if=/dev/zero of=test bs=1M count=0 seek=100000</p>
<p>此时创建的文件在文件系统中的显示大小为100000MB，但是并不实际占用block，因此创建速度与内存速度相当</p>
<p>seek的作用是跳过输出文件中指定大小的部分，这就达到了创建大文件，但是并不实际写入的目的</p>
<p>当然，因为不实际写入硬盘，所以你在容量只有10G的硬盘上创建100G的此类文件都是可以的</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="" >cys.tony</a> : <a class="comment_content" href="http://www.chenhuan.net/dd-large-file.html#comment-1469" title="View the entire comment by cys.tony" >这。。。欢哥你好</a></li>
<li><a class="commentor" href="http://www.jpso.com" >jpso</a> : <a class="comment_content" href="http://www.chenhuan.net/dd-large-file.html#comment-894" title="View the entire comment by jpso" >谢谢，学习了 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/dd-large-file.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[转载]Gravatar Fixed 头像修正插件</title>
		<link>http://www.chenhuan.net/gravatar-fixed.html</link>
		<comments>http://www.chenhuan.net/gravatar-fixed.html#comments</comments>
		<pubDate>Wed, 20 Oct 2010 14:25:13 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[gravatar]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=310</guid>
		<description><![CDATA[两个月没更新了，上来就发现gravatar被墙导致头像无法显示。。。。故转此文章

Gravatar部分服务器在国内访问困难，原因是Gravatar所使用的edgecast CDN服务遇到了某些问题，据我所知，同样受到困扰的还包括wordpress存储静态文件的s.wordpress.org缓存服务器，以及 jQuery的code.jquery.com等。

不过Gravatar头像读取困难只出现在 wordpress 3.0 中，而之前的版本没有发现问题，原因在于 WordPress 3.0 通过读取缓存服务器的方式，减少了对www.gravatar.com 的直接请求：以往直接读取官方服务器，现在都被分流到 0.gravatar.com, 1.gravatar.com 等缓存服务器上了，遇上CDN故障，所以就出现了无法读取头像的问题。

<span class="readmore"><a href="http://www.chenhuan.net/gravatar-fixed.html" title="[转载]Gravatar Fixed 头像修正插件">阅读全文——共528字</a></span>]]></description>
			<content:encoded><![CDATA[<p>两个月没更新了，上来就发现<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/gravatar" title="查看 gravatar 中的全部文章" target="_blank">gravatar</a></span>被墙导致头像无法显示。。。。故转此文章</p>
<p>Gravatar部分服务器在国内访问困难，原因是Gravatar所使用的edgecast CDN服务遇到了某些问题，据我所知，同样受到困扰的还包括<span class='wp_keywordlink'><a href="http://www.wordpress.org" title="wordpress" target="_blank">wordpress</a></span>存储静态文件的s.<span class='wp_keywordlink'><a href="http://www.wordpress.org" title="wordpress" target="_blank">wordpress</a></span>.org缓存服务器，以及 jQuery的code.jquery.com等。</p>
<p>不过Gravatar头像读取困难只出现在 <span class='wp_keywordlink'><a href="http://www.wordpress.org" title="wordpress" target="_blank">wordpress</a></span> 3.0 中，而之前的版本没有发现问题，原因在于 <span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/wordpress" title="查看 WordPress 中的全部文章" target="_blank">WordPress</a></span> 3.0 通过读取缓存服务器的方式，减少了对www.<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/gravatar" title="查看 gravatar 中的全部文章" target="_blank">gravatar</a></span>.com 的直接请求：以往直接读取官方服务器，现在都被分流到 0.<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/gravatar" title="查看 gravatar 中的全部文章" target="_blank">gravatar</a></span>.com, 1.gravatar.com 等缓存服务器上了，遇上CDN故障，所以就出现了无法读取头像的问题。<br />
<span id="more-310"></span><br />
而Gravatar Fixed插件可以通过函数覆盖的方式，重新自定义Gravatar服务器，直接读取www.gravatar.com 的内容，保证正常访问。当然，假如Gravatar将来提供了国内的镜像（或者有热心网友自行搭建），也可以将地址修改为国内服务器，以提高速度。</p>
<p>原文见：<a href="http://wpceo.com/gravatar-fixed/">http://wpceo.com/gravatar-fixed/</a></p>
<h3>Related Posts</h3><ul><li><a href="http://www.chenhuan.net/wordpress-permalinks.html" title="修改了固定链接~ 2010.02.9">修改了固定链接~</a>(7)</li>
<li><a href="http://www.chenhuan.net/wpcumulus-cn.html" title="Wordpress中wp-cumulus插件中文化和字体字号更改 2009.12.31">Wordpress中wp-cumulus插件中文化和字体字号更改</a>(20)</li>
</ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://www.wang3feng.com" >王3峰</a> : <a class="comment_content" href="http://www.chenhuan.net/gravatar-fixed.html#comment-889" title="View the entire comment by 王3峰" >现在已经完全正常了。</a></li>
<li><a class="commentor" href="http://blog.freeflee.net" >unsigned</a> : <a class="comment_content" href="http://www.chenhuan.net/gravatar-fixed.html#comment-814" title="View the entire comment by unsigned" > <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' />   这两天又正常了  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/gravatar-fixed.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lighttpd的ipv6配置</title>
		<link>http://www.chenhuan.net/lightt-ipv6-support.html</link>
		<comments>http://www.chenhuan.net/lightt-ipv6-support.html#comments</comments>
		<pubDate>Mon, 16 Aug 2010 03:38:52 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=273</guid>
		<description><![CDATA[因为前几天我们所管理的一个服务器需要接入ipv6，上面的数个网站同时也要配置支持ipv6，因此需要对Lighttpd进行ipv6的配置。首先需要查看lighttpd在编译时有没有加入ipv6的支持，输入lighttpd -V，查看Features一栏中的ipv6 support是否为+号，如果没有编入ipv6支持，则需要重新编译lighttpd，对于我们所使用的gentoo系统来说，只需要给lighttpd加上ipv6的USE标记，重新编译即可，如果是自己手动编译，则需要在configure中加入参数&#8211;enable-ipv6来使得编译出的lighttpd支持ipv6。

<span class="readmore"><a href="http://www.chenhuan.net/lightt-ipv6-support.html" title="Lighttpd的ipv6配置">阅读全文——共635字</a></span>]]></description>
			<content:encoded><![CDATA[<p>因为前几天我们所管理的一个服务器需要接入<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/ipv6" title="查看 ipv6 中的全部文章" target="_blank">ipv6</a></span>，上面的数个网站同时也要配置支持<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/ipv6" title="查看 ipv6 中的全部文章" target="_blank">ipv6</a></span>，因此需要对Lighttpd进行ipv6的配置。首先需要查看<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/lighttpd" title="查看 lighttpd 中的全部文章" target="_blank">lighttpd</a></span>在编译时有没有加入ipv6的支持，输入<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/lighttpd" title="查看 lighttpd 中的全部文章" target="_blank">lighttpd</a></span> -V，查看Features一栏中的ipv6 support是否为+号，如果没有编入ipv6支持，则需要重新编译<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/lighttpd" title="查看 lighttpd 中的全部文章" target="_blank">lighttpd</a></span>，对于我们所使用的<span class='wp_keywordlink'><a href="http://www.gentoo.org/" title="gentoo" target="_blank">gentoo</a></span>系统来说，只需要给lighttpd加上ipv6的<span class='wp_keywordlink'><a href="http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml?part=2&chap=2" title="USE标记" target="_blank">USE标记</a></span>，重新编译即可，如果是自己手动编译，则需要在configure中加入参数&#8211;enable-ipv6来使得编译出的lighttpd支持ipv6。<br />
<span id="more-273"></span><br />
编译完成之后需要进行配置，首先查到的是在lighttpd.conf中加入server.use-ipv6 = “enable”，lighttpd即可监听在::80端口，但是在实际应用中发现，使用了这个参数后，lighttpd将会全局监听ipv6，而不再监听ipv4端口，这对于我们的网站来说是不适用的，如果是纯ipv6的网站，如东北六维空间这种可以这么做，但是对于我们需要同时支持ipv4与ipv6来说就不能使用了。</p>
<p>同时支持ipv4与ipv6的方法如下：对于ipv4相关的配置不作改动，在配置文件中加上<br />
$SERVER["socket"] == “[2001:da8.......]:80&#8243; {<br />
}<br />
这样一段，打开一个新的socket监听ipv6地址，ipv6的域名配置写在其中即可达到监听v6而不影响ipv4的目的</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/lightt-ipv6-support.html#comment-1203" title="View the entire comment by Hexec" >@Cold.Sorrow.L, 不支持。。。</a></li>
<li><a class="commentor" href="" >Cold.Sorrow.L</a> : <a class="comment_content" href="http://www.chenhuan.net/lightt-ipv6-support.html#comment-1200" title="View the entire comment by Cold.Sorrow.L" >欢哥威武....
这两天正研究IPV6呢...是不是我们的.5VPN服务器不支持IPV6丫....</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/lightt-ipv6-support.html#comment-1031" title="View the entire comment by Hexec" >@evihack, 出问题总应该有日志说是什么原因噻</a></li>
<li><a class="commentor" href="" >evihack</a> : <a class="comment_content" href="http://www.chenhuan.net/lightt-ipv6-support.html#comment-1023" title="View the entire comment by evihack" >不行找你的方法LIGHTTPD重启就是出问题无法启动了</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/lightt-ipv6-support.html#comment-650" title="View the entire comment by Hexec" >@tony, 脱神荡漾 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/11.gif' alt='[s:20]' class='wp-smiley' /> </a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/lightt-ipv6-support.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>gnome-keyring的烦恼</title>
		<link>http://www.chenhuan.net/gnome-keyrings-puzzled.html</link>
		<comments>http://www.chenhuan.net/gnome-keyrings-puzzled.html#comments</comments>
		<pubDate>Thu, 05 Aug 2010 07:15:59 +0000</pubDate>
		<dc:creator>Hexec</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[keyrings]]></category>
		<category><![CDATA[seahorse]]></category>

		<guid isPermaLink="false">http://www.chenhuan.net/?p=270</guid>
		<description><![CDATA[GNOME-keyring是用来保存在GNOME环境中所使用的各种密码。如果在某程序中需要输入密码，而我们想保存密码的话，如果保存密码的功能由各程序独自提供，那么会出现安全问题或者不可操作，安全问题是：如果程序使用明文保存密码，那密码很容易被窥伺，如果程序使用可逆加密算法来加密密码，但是由于Linux下程序大多是开源的，加密算法也可以知晓，那加密就没有了意义。 如果程序使用了MD5之类的单向加密算法来加密保存的密码，那又无法起到保存密码的作用了（因为密文不可逆，因此程序无法得知原来的密码）



<span class="readmore"><a href="http://www.chenhuan.net/gnome-keyrings-puzzled.html" title="gnome-keyring的烦恼">阅读全文——共1108字</a></span>]]></description>
			<content:encoded><![CDATA[<p><span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">GNOME</a></span>-keyring是用来保存在<span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">GNOME</a></span>环境中所使用的各种密码。如果在某程序中需要输入密码，而我们想保存密码的话，如果保存密码的功能由各程序独自提供，那么会出现安全问题或者不可操作，安全问题是：如果程序使用明文保存密码，那密码很容易被窥伺，如果程序使用可逆加密算法来加密密码，但是由于Linux下程序大多是开源的，加密算法也可以知晓，那加密就没有了意义。 如果程序使用了MD5之类的单向加密算法来加密保存的密码，那又无法起到保存密码的作用了（因为密文不可逆，因此程序无法得知原来的密码）<br />
<span id="more-270"></span><br />
<span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">GNOME</a></span>-keyring则是为了解决这种矛盾而产生的。它的原理是通过一个密钥环（keyring）将系统中各种密码，比如登录密码，网络连接密码等统统保存在该密钥环中，该密钥环可以由密码加密，也可以不加密明文存放，这样就达到了只用输入一个密码或者不输入密码，来管理所有保存在该密钥环中的密码了。</p>
<p>应该说<span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">gnome</a></span>-keyring的设计初衷是好的，但是在实际环境中这个东西与我们的需求有很多矛盾之处，如果密钥环使用密码加密，那么当我们需要输入密码时虽然不用输入已经保存的密码，但是仍然需要输入密钥环的密码，同样没有达到不输入密码的目的；如果密钥环不使用密码加密，那么保存在密钥环中的密码同样是明文存放，那又与程序自己管理有什么区别呢？？这无疑是一个悖论。。。</p>
<p>就在昨天，我在设置一个vpn的时候，手快了一下，在提示设置密钥环密码时设置了密码，之后连接vpn均需要输入密钥环的密码，非常烦恼，随后我删除了~/.<span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">gnome</a></span>2/<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/keyrings" title="查看 keyrings 中的全部文章" target="_blank">keyrings</a></span>目录，以期达到重置密钥环的目的，但是麻烦由此而来</p>
<p>删除了目录之后，重新设置网络连接，提示设置密钥环密码时使用空密码，原以为问题就此解决，但是再连接网络时，弹出对话框要求输入网络连接的密码，仿佛是密钥环没有起到任何作用，再次保存密钥环，之后再连接网络，同样，密钥环未起作用。</p>
<p>此时查看~/.<span class='wp_keywordlink'><a href="http://www.gnome.org/" title="GNOME" target="_blank">gnome</a></span>2/<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/keyrings" title="查看 keyrings 中的全部文章" target="_blank">keyrings</a></span>目录，发现其中有如下文件：默认密钥.keyring 默认密钥_1.keyring 默认密钥_2.keyring&#8230;&#8230;看起来每当我输入一次密码，就自动创建了一个密钥环，而该密钥环没有起到默认密码环的作用，所以再次输入密码，密钥环无效。这可能是由于我直接删除了<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/keyrings" title="查看 keyrings 中的全部文章" target="_blank">keyrings</a></span>目录，而该目录下可能有其它的一些配置文件引起的</p>
<p>后来安装了<span class='wp_keywordlink_affiliate'><a href="http://www.chenhuan.net/tag/seahorse" title="查看 seahorse 中的全部文章" target="_blank">seahorse</a></span>这个图形界面的密钥环管理软件，在其中重新新建密钥环，并设置其为默认，方解决问题，此时查看.gnome2/keyrings目录，发现多了一个文件default，其中记录着我设置的默认密钥环的名称，看来是由于误删了这个文件引起的。。。。。</p>
<h3>Related Posts</h3><ul><li>0</li></ul><h3>Recent Comments</h3><ul><li><a class="commentor" href="http://renrne.com" >喊你放开那大妈。。。。</a> : <a class="comment_content" href="http://www.chenhuan.net/gnome-keyrings-puzzled.html#comment-623" title="View the entire comment by 喊你放开那大妈。。。。" >@Hexec, 
我这一个月都是这个IP…… <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' />  [s...</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/gnome-keyrings-puzzled.html#comment-622" title="View the entire comment by Hexec" >@喊你放开那大妈。。。。, 当然 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' /> </a></li>
<li><a class="commentor" href="http://renrne.com" >喊你放开那大妈。。。。</a> : <a class="comment_content" href="http://www.chenhuan.net/gnome-keyrings-puzzled.html#comment-621" title="View the entire comment by 喊你放开那大妈。。。。" >@Hexec, 

难道是IP把我出卖了………………</a></li>
<li><a class="commentor" href="http://www.chenhuan.net" >Hexec</a> : <a class="comment_content" href="http://www.chenhuan.net/gnome-keyrings-puzzled.html#comment-620" title="View the entire comment by Hexec" >@喊你放开那大妈。。。。, 湖哥，换了马甲哥也认得出来</a></li>
<li><a class="commentor" href="http://renrne.com" >喊你放开那大妈。。。。</a> : <a class="comment_content" href="http://www.chenhuan.net/gnome-keyrings-puzzled.html#comment-619" title="View the entire comment by 喊你放开那大妈。。。。" >这地方好久都没有评论了

秀一下风骚的名字、邮箱、网址。。。。。 <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' />  <img src='http://www.chenhuan.net/wp-includes/images/oniontou/12.gif' alt='[s:14]' class='wp-smiley' /> ...</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.chenhuan.net/gnome-keyrings-puzzled.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

