<?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>可可熊的窝 &#187; Linux</title>
	<atom:link href="http://cocobear.info/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://cocobear.info/blog</link>
	<description>K.I.S.S</description>
	<lastBuildDate>Tue, 17 Aug 2010 10:26:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>想换一个Linux发行版</title>
		<link>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/</link>
		<comments>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 02:01:38 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=406</guid>
		<description><![CDATA[用了Fedora也有不少时间了，总的感觉还不错，但是我想要一个可以掌握在手里的系统，比较干净一些，不想有一些我从来用不到的东西，比如Java，我很讨厌系统里面有这些个东西，Fedora安装下来有不少没用的东西，即使使用很小的安装也得占大概2G的空间。 我希望的这个发型版： 比较干净（没用的东西尽量少，需要的时候才安装） 定制性比较强，安装软件比较容易（但也不可以因为我想听个歌而让我折腾半天的时间去装个播放器，也不可以让我花大量时间去折腾显卡配置等系统问题，我需要专注做事情，而不是折腾系统，系统只是个工具） 很方便使用X，我大部分时间还是需要X的； 比较适合做开发，比如Python，SDL，OpenGL，wxPython&#8230;&#8230; 速度比较快，Fedora开机的时候会加载很多没用的东西，当然这些可以自己手动去掉，俺还是不喜欢； 升级不能太频繁，Fedora从5开始用，现在都10了，才两年多的时间，太快了，虽然系统确实一直在进步，或者至少可以平滑的升级，Fedora在这方面做的不好； 稳定性比较好，说实话用这么长时间Fedora，还是有不少时间莫名的死掉； 暂时就想到这么多，最近把大部份的Linux发型版介绍都看了看，目前觉得以下几个比较合适的我需要： ArchLinux Slackware Gentoo 现在还拿不定主意，路过的给个选择，或者还有别的发型版更合适我？]]></description>
			<content:encoded><![CDATA[<p>用了<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>也有不少时间了，总的感觉还不错，但是我想要一个可以掌握在手里的系统，比较干净一些，不想有一些我从来用不到的东西，比如Java，我很讨厌系统里面有这些个东西，<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>安装下来有不少没用的东西，即使使用很小的安装也得占大概2G的空间。</p>
<p>我希望的这个发型版：</p>
<li>比较干净（没用的东西尽量少，需要的时候才安装）</li>
<li>定制性比较强，安装软件比较容易（但也不可以因为我想听个歌而让我折腾半天的时间去装个播放器，也不可以让我花大量时间去折腾显卡配置等系统问题，我需要专注做事情，而不是折腾系统，系统只是个工具）</li>
<li>很方便使用X，我大部分时间还是需要X的；</li>
<li>比较适合做开发，比如Python，SDL，OpenGL，wxPython&#8230;&#8230;</li>
<li>速度比较快，<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>开机的时候会加载很多没用的东西，当然这些可以自己手动去掉，俺还是不喜欢；</li>
<li>升级不能太频繁，<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>从5开始用，现在都10了，才两年多的时间，太快了，虽然系统确实一直在进步，或者至少可以平滑的升级，<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>在这方面做的不好；</li>
<li>稳定性比较好，说实话用这么长时间<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>，还是有不少时间莫名的死掉；</li>
<p>暂时就想到这么多，最近把大部份的Linux发型版介绍都看了看，目前觉得以下几个比较合适的我需要：</p>
<p>ArchLinux<br />
Slackware<br />
Gentoo</p>
<p>现在还拿不定主意，路过的给个选择，或者还有别的发型版更合适我？</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/12/04/want-a-new-linux-distribute/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Fedora 9 通过E680G/I手机实现GPRS上网</title>
		<link>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/</link>
		<comments>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 02:43:06 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[E680]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[GPRS]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=316</guid>
		<description><![CDATA[电脑通过E680G/I手机实现GPRS上网 E680是一款摩托的Linux系统手机，在Windows下可以通过自带的MPT工具包实现与电脑连接的GPRS上网，在Linux下也是比较方便的，以前我也用过，只是没记下来，今天再用的时候还得看别人写的文章，还是自己记一下。 我用的是Fedora 9，一般的Linux系统都应该可以，大同小异。首先是手机端设置连接模式为调制解调器(Modem)，通过数据线连接到电脑后(也可以用蓝牙，我这里没有环境)，Fedora 9会识别到有新的调制解调器： 发现新硬件: BASH: usb 4-3: new full speed USB device using ohci_hcd and address 2 usb 4-3: configuration #1 chosen from 1 choice usb 4-3: New USB device found, idVendor=22b8, idProduct=3802 usb 4-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 4-3: Product: Motorola USB Modem usb 4-3: Manufacturer: Motorola cdc_acm [...]]]></description>
			<content:encoded><![CDATA[<p><strong>电脑通过E680G/I手机实现<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>上网</strong></p>
<p><a href="http://cocobear.info/blog/tag/e680/" class="st_tag internal_tag" rel="tag" title="Posts tagged with E680">E680</a>是一款摩托的Linux系统手机，在Windows下可以通过自带的MPT工具包实现与电脑连接的<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>上网，在Linux下也是比较方便的，以前我也用过，只是没记下来，今天再用的时候还得看别人写的文章，还是自己记一下。</p>
<p>我用的是<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a> 9，一般的Linux系统都应该可以，大同小异。首先是手机端设置连接模式为调制解调器(Modem)，通过数据线连接到电脑后(也可以用蓝牙，我这里没有环境)，<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a> 9会识别到有新的调制解调器：</p>
<p><a href="#" onclick="xcollapse('X10973');return false;"> 发现新硬件: </a><br />
</p>
<div id="X10973" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-7">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: new full speed USB device using ohci_hcd and address <span style="color: #ffffff;color:#800000;">2</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: configuration <span style="color: #999999; font-style: italic;">#1 chosen from 1 choice</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: New USB device found, <span style="color: #ff87ff;">idVendor</span>=22b8, <span style="color: #ff87ff;">idProduct</span>=<span style="color: #ffffff;color:#800000;">3802</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: New USB device <span style="color: #3df346; font-weight: bold;">strings</span>: <span style="color: #ff87ff;">Mfr</span>=<span style="color: #ffffff;color:#800000;">1</span>, <span style="color: #ff87ff;">Product</span>=<span style="color: #ffffff;color:#800000;">2</span>, <span style="color: #ff87ff;">SerialNumber</span>=<span style="color: #ffffff;color:#800000;">0</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: Product: Motorola USB Modem</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usb <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>: Manufacturer: Motorola</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">cdc_acm <span style="color: #ffffff;color:#800000;">4</span>-<span style="color: #ffffff;color:#800000;">3</span>:<span style="color: #ffffff;color:#800000;">1.0</span>: ttyACM0: USB ACM device</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">usbcore: registered new interface driver cdc_acm</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">drivers<span style="color: #ffffff; font-weight: bold;">/</span>usb<span style="color: #ffffff; font-weight: bold;">/</span>class<span style="color: #ffffff; font-weight: bold;">/</span>cdc-acm.c: v0.25:USB Abstract Control Model driver <span style="color: #ffffff; font-weight: bold;">for</span> USB modems and ISDN adapters</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>它对应的设备就是/dev/ttyACM0。接下来用wvdial这个拨号工具，如果没有这个包的话请自行安装，wvdial有一个配置文件/etc/wvdial.conf,(使用root进行下面的操作)编辑这个文件,：</p>
<p><a href="#" onclick="xcollapse('X9261');return false;"> 添加以下内容:</a><br />
</p>
<div id="X9261" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-8">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>Dialer Defaults<span style="color: #85f78b; font-weight: bold;">&#93;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Init1 = at+<span style="color: #ff87ff;">cgdcont</span>=<span style="color: #ffffff;color:#800000;">1</span>,<span style="color: #00ffff;">&quot;ip&quot;</span>,<span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Phone = <span style="color: #ffffff; font-weight: bold;">*</span><span style="color: #ffffff;color:#800000;">99</span><span style="color: #ffffff; font-weight: bold;">***</span><span style="color: #ffffff;color:#800000;">1</span><span style="color: #999999; font-style: italic;">#</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Modem = <span style="color: #ffffff; font-weight: bold;">/</span>dev<span style="color: #ffffff; font-weight: bold;">/</span>ttyACM0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Username = <span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Password = <span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Carrier Check = no</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Baud = <span style="color: #ffffff;color:#800000;">460800</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Auto DNS = on</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>如果已经有Dialer Defaults这一块则覆盖之。这里要注意使用的是cmnet，最好是手机包月不分cmnet和cmwap那种的，不然收费是很贵的。修改完该文件后还需要对/etc/ppp/options文件进行修改，添加一行：<br />
:192.168.0.254<br />
这个修改比较奇怪，<a href="http://cocobear.info/blog/tag/e680/" class="st_tag internal_tag" rel="tag" title="Posts tagged with E680">E680</a>系列的Linux手机都需要这样:-(，不然用wvdial拨号时会在/var/log/messages中产生下面的错误：</p>
<p><a href="#" onclick="xcollapse('X1923');return false;"> 错误信息：</a><br />
</p>
<div id="X1923" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-9">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: pppd 2.4.4 started by root, uid <span style="color: #ffffff;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Using interface ppp0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">25</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Connect: ppp0 <span style="color: #ffffff; font-weight: bold;">&lt;</span>--<span style="color: #ffffff; font-weight: bold;">&gt;</span> <span style="color: #ffffff; font-weight: bold;">/</span>dev<span style="color: #ffffff; font-weight: bold;">/</span>ttyACM0</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">36</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Remote message: Welcome to Motorola A760 Software Modem<span style="color: #ffffff; font-weight: bold;">!</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">36</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: PAP authentication succeeded</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: LCP terminated by peer <span style="color: #85f78b; font-weight: bold;">&#40;</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span>^<span style="color: #ffffff; font-weight: bold;">@</span><span style="color: #85f78b; font-weight: bold;">&#41;</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Modem hangup</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Connection terminated.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">56</span>:<span style="color: #ffffff;color:#800000;">44</span> cocobear pppd<span style="color: #85f78b; font-weight: bold;">&#91;</span><span style="color: #ffffff;color:#800000;">18141</span><span style="color: #85f78b; font-weight: bold;">&#93;</span>: Exit.</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>修改完这个文件后就可以开始拨号了，直接使用wvdial命令:</p>
<p><a href="#" onclick="xcollapse('X771');return false;"> 拨号信息：</a><br />
</p>
<div id="X771" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-10">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># vim /etc/wvdial.conf </span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># vim /etc/ppp/options </span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>root<span style="color: #ffffff; font-weight: bold;">@</span>cocobear cocobear<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #999999; font-style: italic;"># wvdial</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> WvDial: Internet dialer version <span style="color: #ffffff;color:#800000;">1.60</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Cannot get information <span style="color: #ffffff; font-weight: bold;">for</span> serial port.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Initializing modem.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Sending: at+<span style="color: #ff87ff;">cgdcont</span>=<span style="color: #ffffff;color:#800000;">1</span>,<span style="color: #00ffff;">&quot;ip&quot;</span>,<span style="color: #00ffff;">&quot;cmnet&quot;</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">OK</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Modem initialized.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Sending: ATDT<span style="color: #ffffff; font-weight: bold;">*</span><span style="color: #ffffff;color:#800000;">99</span><span style="color: #ffffff; font-weight: bold;">***</span><span style="color: #ffffff;color:#800000;">1</span><span style="color: #999999; font-style: italic;">#</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Waiting <span style="color: #ffffff; font-weight: bold;">for</span> carrier.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">CONNECT</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Carrier detected. &nbsp;Waiting <span style="color: #ffffff; font-weight: bold;">for</span> prompt.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">~<span style="color: #85f78b; font-weight: bold;">&#91;</span>7f<span style="color: #85f78b; font-weight: bold;">&#93;</span><span style="color: #85f78b; font-weight: bold;">&#125;</span><span style="color: #999999; font-style: italic;">#@!}!}!} }&lt;}!}$}%\}&quot;}&amp;} } } } }#}$@#}%}&amp;j}?} } }'}&quot;}(}&quot;?}3~</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> PPP negotiation detected.</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Starting pppd at Thu Oct <span style="color: #ffffff;color:#800000;">16</span> 09:<span style="color: #ffffff;color:#800000;">58</span>:<span style="color: #ffffff;color:#800000;">41</span> <span style="color: #ffffff;color:#800000;">2008</span></div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Pid of pppd: <span style="color: #ffffff;color:#800000;">18959</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> Using interface ppp0</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> <span style="color: #85f78b; font-weight: bold;">local</span> &nbsp;IP address 10.182.237.127</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> remote IP address 192.168.0.254</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> primary &nbsp; DNS address 211.137.130.3</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">--<span style="color: #ffffff; font-weight: bold;">&gt;</span> secondary DNS address 211.137.130.19</div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>从上面的信息中可以看出我们成功的拨号上网了，不过这时候我们还需要手动把192.168.0.254添加为默认路由:</p>
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-11">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">route add default gw 192.168.0.254</div>
</li>
</ol>
</div>
</div>
</div>
<p>
ping一个google：</p>
<p><a href="#" onclick="xcollapse('X7787');return false;"> Ping结果：</a><br />
</p>
<div id="X7787" style="display: none; border 1px solid=#0000cc; padding: 10px; background-color: transparent;">
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-12">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #85f78b; font-weight: bold;">&#91;</span>cocobear<span style="color: #ffffff; font-weight: bold;">@</span>cocobear ~<span style="color: #85f78b; font-weight: bold;">&#93;</span>$ <span style="color: #3df346; font-weight: bold;">ping</span> www.g.cn</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">PING g.cn <span style="color: #85f78b; font-weight: bold;">&#40;</span>203.208.33.100<span style="color: #85f78b; font-weight: bold;">&#41;</span> <span style="color: #ffffff;color:#800000;">56</span><span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #ffffff;color:#800000;">84</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> bytes of data.</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">2</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">709</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">4</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1359</span> ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">5</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1159</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">6</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">1021</span> ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">64</span> bytes from 203.208.33.100: <span style="color: #ff87ff;">icmp_seq</span>=<span style="color: #ffffff;color:#800000;">7</span> <span style="color: #ff87ff;">ttl</span>=<span style="color: #ffffff;color:#800000;">242</span> <span style="color: #ff87ff;"><span style="color: #ffffff; font-weight: bold;">time</span></span>=<span style="color: #ffffff;color:#800000;">617</span> ms</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">^C</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #99ffcc;">---</span> g.cn <span style="color: #3df346; font-weight: bold;">ping</span> statistics <span style="color: #99ffcc;">---</span></div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff;color:#800000;">8</span> packets transmitted, <span style="color: #ffffff;color:#800000;">5</span> received, <span style="color: #ffffff;color:#800000;">37</span><span style="color: #ffffff; font-weight: bold;">%</span> packet loss, <span style="color: #ffffff; font-weight: bold;">time</span> 13411ms</div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">rtt min<span style="color: #ffffff; font-weight: bold;">/</span>avg<span style="color: #ffffff; font-weight: bold;">/</span>max<span style="color: #ffffff; font-weight: bold;">/</span>mdev = <span style="color: #ffffff;color:#800000;">617.708</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">973.500</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">1359.063</span><span style="color: #ffffff; font-weight: bold;">/</span><span style="color: #ffffff;color:#800000;">276.410</span> ms, pipe <span style="color: #ffffff;color:#800000;">2</span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
</div>
<p>好大的延时，还有丢包，没办法了中国移动的<a href="http://cocobear.info/blog/tag/gprs/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GPRS">GPRS</a>就这样了，EDGE在西安只有部分地区覆盖了，而且<a href="http://cocobear.info/blog/tag/e680/" class="st_tag internal_tag" rel="tag" title="Posts tagged with E680">E680</a>手机是不支持的！</p>
<p>终于上来了，搬到新租的房子后还没拉网线，只能先这样了。</p>
<p>羡慕王聪同学的3G上网啊＠_＠</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/10/16/e680-gprs-linux/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>处理了下网站</title>
		<link>http://cocobear.info/blog/2008/08/15/deal-with-wes/</link>
		<comments>http://cocobear.info/blog/2008/08/15/deal-with-wes/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 09:57:53 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Shell]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=305</guid>
		<description><![CDATA[改了info域名后网站以前里很多页面里有cocobear.cn，连一些图片也显示不出来，今天就处理了一下： 把网站里一些文件做替换，先备份一下： grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match&#124;xargs -i cp --parents {} bk/ 然后全部替换： grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match &#124; xargs sed -i 's/cocobear\.cn[^@]/cocobear\.info/g' 剩下就是数据库里的内容了，主要是wp_posts表中的post_content字段，还有guid字段，还有wp_comments中的comment_author_url，wp_postmeta中的meta_value; 操作的命令是： mysql> update wp_posts set post_content=replace(post_content,"http://www.cocobear.cn","http://cocobear.info"); 当然在进行数据库操作时一定要记得先备份一下： mysqldump -h mysql.1g50.cn -u cocobear -p cocobear > 0808151.sql 使用 mysqldump -h mysql.1g50.cn -u cocobear -p cocobear < 0808151.sql恢复似乎不太好，还是进mysql里使用source ~/0808151.sql进行恢复。]]></description>
			<content:encoded><![CDATA[<p>改了info域名后网站以前里很多页面里有cocobear.cn，连一些图片也显示不出来，今天就处理了一下：</p>
<p>把网站里一些文件做替换，先备份一下：<br />
grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match|xargs -i cp --parents {} bk/</p>
<p>然后全部替换：<br />
grep cocobear.cn ./cocobear.info/ -R -l --binary-files=without-match | xargs sed -i 's/cocobear\.cn[^@]/cocobear\.info/g'</p>
<p>剩下就是数据库里的内容了，主要是wp_posts表中的post_content字段，还有guid字段，还有wp_comments中的comment_author_url，wp_postmeta中的meta_value;<br />
操作的命令是：<br />
<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>> update wp_posts set post_content=replace(post_content,"http://www.cocobear.cn","http://cocobear.info");</p>
<p>当然在进行数据库操作时一定要记得先备份一下：<br />
 mysqldump -h <a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>.1g50.cn -u cocobear -p cocobear > 0808151.sql</p>
<p>使用 mysqldump -h <a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>.1g50.cn -u cocobear -p cocobear < 0808151.sql恢复似乎不太好，还是进<a href="http://cocobear.info/blog/tag/mysql/" class="st_tag internal_tag" rel="tag" title="Posts tagged with MySQL">mysql</a>里使用source ~/0808151.sql进行恢复。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/08/15/deal-with-wes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>crontab使用[转载]</title>
		<link>http://cocobear.info/blog/2008/08/14/learning-crontab/</link>
		<comments>http://cocobear.info/blog/2008/08/14/learning-crontab/#comments</comments>
		<pubDate>Thu, 14 Aug 2008 07:02:36 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[crontab]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=304</guid>
		<description><![CDATA[名称 : crontab 使用权限 : 所有使用者 使用方式 : crontab file [-u user]-用指定的文件替代目前的crontab。 crontab-[-u user]-用标准输入替代目前的crontab. crontab-1[user]-列出用户目前的crontab. crontab-e[user]-编辑用户目前的crontab. crontab-d[user]-删除用户目前的crontab. crontab-c dir- 指定crontab的目录。 crontab文件的格式：M H D m d cmd. M: 分钟（0-59）。 H：小时（0-23）。 D：天（1-31）。 m: 月（1-12）。 d: 一星期内的天（0~6，0为星期天）。 cmd要运行的程序，程序被送入sh执行，这个shell只有USER,HOME,SHELL这三个环境变量 说明 : crontab 是用来让使用者在固定时间或固定间隔执行程序之用，换句话说，也就是类似使用者的时程表。-u user 是指设定指定 user 的时程表，这个前提是你必须要有其权限(比如说是 root)才能够指定他人的时程表。如果不使用 -u user 的话，就是表示设定自己的时程表。 参数 : crontab -e : 执行文字编辑器来设定时程表，内定的文字编辑器是 VI，如果你想用别的文字编辑器，则请先设定 VISUAL [...]]]></description>
			<content:encoded><![CDATA[<p>名称 : crontab<br />
使用权限 : 所有使用者<br />
使用方式 :<br />
crontab file [-u user]-用指定的文件替代目前的crontab。<br />
crontab-[-u user]-用标准输入替代目前的crontab.<br />
crontab-1[user]-列出用户目前的crontab.<br />
crontab-e[user]-编辑用户目前的crontab.<br />
crontab-d[user]-删除用户目前的crontab.<br />
crontab-c dir- 指定crontab的目录。<br />
crontab文件的格式：M H D m d cmd. </p>
<p>M: 分钟（0-59）。<br />
H：小时（0-23）。<br />
D：天（1-31）。<br />
m: 月（1-12）。<br />
d: 一星期内的天（0~6，0为星期天）。<br />
cmd要运行的程序，程序被送入sh执行，这个<a href="http://cocobear.info/blog/tag/shell/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Shell">shell</a>只有USER,HOME,<a href="http://cocobear.info/blog/tag/shell/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Shell">SHELL</a>这三个环境变量<br />
说明 :<br />
crontab 是用来让使用者在固定时间或固定间隔执行程序之用，换句话说，也就是类似使用者的时程表。-u user 是指设定指定 user 的时程表，这个前提是你必须要有其权限(比如说是 root)才能够指定他人的时程表。如果不使用 -u user 的话，就是表示设定自己的时程表。 </p>
<p>参数 :<br />
crontab -e : 执行文字编辑器来设定时程表，内定的文字编辑器是 VI，如果你想用别的文字编辑器，则请先设定 VISUAL 环境变数来指定使用那个文字编辑器(比如说 setenv VISUAL joe)<br />
crontab -r : 删除目前的时程表<br />
crontab -l : 列出目前的时程表<br />
crontab file [-u user]-用指定的文件替代目前的crontab。<br />
时程表的格式如下 :<br />
f1 f2 f3 f4 f5 program<br />
其中 f1 是表示分钟，f2 表示小时，f3 表示一个月份中的第几日，f4 表示月份，f5 表示一个星期中的第几天。program 表示要执行的程序。<br />
当 f1 为 * 时表示每分钟都要执行 program，f2 为 * 时表示每小时都要执行程序，其馀类推<br />
当 f1 为 a-b 时表示从第 a 分钟到第 b 分钟这段时间内要执行，f2 为 a-b 时表示从第 a 到第 b 小时都要执行，其馀类推<br />
当 f1 为 */n 时表示每 n 分钟个时间间隔执行一次，f2 为 */n 表示每 n 小时个时间间隔执行一次，其馀类推<br />
当 f1 为 a, b, c,... 时表示第 a, b, c,... 分钟要执行，f2 为 a, b, c,... 时表示第 a, b, c...个小时要执行，其馀类推<br />
使用者也可以将所有的设定先存放在档案 file 中，用 crontab file 的方式来设定时程表。 </p>
<p>例子 :<br />
#每天早上7点执行一次 /bin/ls :<br />
0 7 * * * /bin/ls<br />
在 12 月内, 每天的早上 6 点到 12 点中，每隔3个小时执行一次 /usr/bin/backup :<br />
0 6-12/3 * 12 * /usr/bin/backup<br />
周一到周五每天下午 5:00 寄一封信给 alex@domain.name :<br />
0 17 * * 1-5 <a href="http://cocobear.info/blog/tag/mail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mail">mail</a> -s "hi" alex@domain.name < /tmp/maildata<br />
每月每天的午夜 0 点 20 分, 2 点 20 分, 4 点 20 分....执行 echo "haha"<br />
20 0-23/2 * * * echo "haha"<br />
注意 :<br />
当程序在你所指定的时间执行后，系统会寄一封信给你，显示该程序执行的内容，若是你不希望收到这样的信，请在每一行空一格之后加上 > /dev/null 2>&#038;1 即可</p>
<p>例子2 :<br />
#每天早上6点10分<br />
10 6 * * * date<br />
#每两个小时<br />
0 */2 * * * date<br />
#晚上11点到早上8点之间每两个小时，早上8点<br />
0 23-7/2，8 * * * date<br />
#每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点<br />
0 11 4 * mon-wed date<br />
#1月份日早上4点<br />
0 4 1 jan * date<br />
范例<br />
$crontab -l 列出用户目前的crontab.</p>
<p>来自：http://h1yn.itpub.net/post/2084/222108</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/08/14/learning-crontab/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fedora 8配置Heartbeat</title>
		<link>http://cocobear.info/blog/2008/08/07/fedora-8-heartbeat-config/</link>
		<comments>http://cocobear.info/blog/2008/08/07/fedora-8-heartbeat-config/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 09:28:24 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[heartbeat]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=301</guid>
		<description><![CDATA[Heartbeat是http://linux-ha.org中HA项目的核心，HA是(High Availability)的缩写；简单来说就是为了提供高可靠的应用服务，例如拿两来机子来做HA，提供WEB服务，一台机子为主服务器平时提供WEB服务，HA就是保证在主服务器出现故障(例如掉电)的时候另一台机子可以立刻接手继续提供WEB服务，从而使用户觉得服务未曾中断；实际应用中可能使用更多的机子组成集群。 Heartbeat可以使用串口或者以太网来实现对主机的监测，这里使用的是以太网，在两台机器上分别配双网卡，用一根双绞线把两台机器连接在一起，另外两个网卡连到路由；配置是： f801(主机名；使用这台作为主服务器)： eth0: 192.168.1.110 eth1: 10.0.0.1 f802: eth1: 192.168.1.111 eth2: 10.0.0.2 网络配置好后测试无误后再检查两台机器上的WEB服务是否可以正常使用；一切都正常后使用yum安装Heartbeat： yum install heartbeat 安装好heartbeat后开始配置，三个主要配置文件都在： /usr/share/doc/heartbeat-2.1.3/下面，需要我们手工修改后拷贝到/etc/ha.d/中(两台服务器使用的脚本基本一样)。 编辑authkeys文件，下面的配置使用了sha1作为认证方式(这里需要注意的是该文件的权限必须被设置为600)： auth 2 #1 crc 2 sha1 HI! #3 md5 Hello! 编辑ha.cf，注释下掉以下内容： keepalive 1 ##设定心跳(监测)时间时间为1秒 warntime 10 ##设定警告时间 deadtime 30 ##设定确定主机宕机时间 initdead 120 ##第一宕机时间 ucast eth1 10.0.0.2 ##使用eht1做心跳监测 也就是连接两PC的网卡 udpport 694 ##使用udp端口694 进行心跳监测 node f801 ##节点1，必须要与 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>是http://linux-ha.org中HA项目的核心，HA是(High Availability)的缩写；简单来说就是为了提供高可靠的应用服务，例如拿两来机子来做HA，提供WEB服务，一台机子为主服务器平时提供WEB服务，HA就是保证在主服务器出现故障(例如掉电)的时候另一台机子可以立刻接手继续提供WEB服务，从而使用户觉得服务未曾中断；实际应用中可能使用更多的机子组成集群。</p>
<p><a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>可以使用串口或者以太网来实现对主机的监测，这里使用的是以太网，在两台机器上分别配双网卡，用一根双绞线把两台机器连接在一起，另外两个网卡连到路由；配置是：</p>
<p>f801(主机名；使用这台作为主服务器)：<br />
eth0: 192.168.1.110<br />
eth1: 10.0.0.1</p>
<p>f802:<br />
eth1: 192.168.1.111<br />
eth2: 10.0.0.2</p>
<p>网络配置好后测试无误后再检查两台机器上的WEB服务是否可以正常使用；一切都正常后使用yum安装<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>：</p>
<p>yum install <a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">heartbeat</a></p>
<p>安装好<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">heartbeat</a>后开始配置，三个主要配置文件都在： /usr/share/doc/<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">heartbeat</a>-2.1.3/下面，需要我们手工修改后拷贝到/etc/ha.d/中(两台服务器使用的脚本基本一样)。</p>
<p>编辑authkeys文件，下面的配置使用了sha1作为认证方式(这里需要注意的是该文件的权限必须被设置为600)：</p>
<p>auth 2<br />
#1 crc<br />
2 sha1 HI!<br />
#3 md5 Hello!</p>
<p>编辑ha.cf，注释下掉以下内容：</p>
<p>keepalive 1               ##设定心跳(监测)时间时间为1秒<br />
warntime 10               ##设定警告时间<br />
deadtime 30              ##设定确定主机宕机时间<br />
initdead 120              ##第一宕机时间<br />
ucast eth1 10.0.0.2     ##使用eht1做心跳监测 也就是连接两PC的网卡<br />
udpport 694              ##使用udp端口694 进行心跳监测<br />
node f801                 ##节点1，必须要与 uname -n得到的结果一致。<br />
node f802                 ##节点2<br />
第二台服务器由于网卡是eth(192.*)1,eth2(10.*)，所以相应的配置文件中ucast 需要使用eth2。</p>
<p>编辑haresources，添加以下内容：</p>
<p>f801                    192.168.1.118 httpd<br />
表示主服务器使用192.168.1.118作为WEB服务的IP，f801为主服务器。</p>
<p>配置好后在主服务器上启动<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>：<br />
service <a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">heartbeat</a> start<br />
出错的话一般是配置文件的问题，根据提示修改就可以了；<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>会自动根据haresource配置文件启动相应的服务程序。<br />
然后在另一个台器上启动<a href="http://cocobear.info/blog/tag/heartbeat/" class="st_tag internal_tag" rel="tag" title="Posts tagged with heartbeat">Heartbeat</a>；</p>
<p>完成后可以使用tcpdump来测试两台机器间的心跳：</p>
<p>[root@f801 ~]# tcpdump -i eth0 -p udp port 694<br />
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode<br />
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes<br />
11:43:46.431448 IP ha01.filenet-nch > ha02.ha-cluster: UDP, length 219<br />
11:43:46.433968 IP ha01.filenet-nch > ha02.ha-cluster: UDP, length 216<br />
11:43:47.431456 IP ha01.filenet-nch > ha02.ha-cluster: UDP, length 216<br />
11:43:48.432516 IP ha01.filenet-nch > ha02.ha-cluster: UDP, length 216</p>
<p>如果这里出问题的话很有可能是防火墙的问题，或者是配置文件里ucast里的设置，需要仔细检查。<br />
最后就可以做测试，关闭主服务器，根据配置文件里的响应时间()，服务器f802会接管主服务器的任务。</p>
<p>参考文章：</p>
<p>http://www.bitscn.com/linux/network_manage/200805/140501_3.html</p>
<p>http://www.xxlinux.com/linux/article/network/app/20070329/8009.html</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/08/07/fedora-8-heartbeat-config/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fedora中mail命令无法发信</title>
		<link>http://cocobear.info/blog/2008/07/04/can-not-use-mail-in-fedora/</link>
		<comments>http://cocobear.info/blog/2008/07/04/can-not-use-mail-in-fedora/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 07:46:25 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=286</guid>
		<description><![CDATA[偶尔发现我机子上的mail命令不能发信，看了下错误日志： Jul 4 15:08:20 cocobear sendmail[4167]: m6478JxK004167: to=cocobear.cn@gmail.com, ctladdr=cocobear (500/500), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30113, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] 发信的状态是Connection refused by [127.0.0.1] 原来是sendmail在Fedora中默认的配置有问题，修改/etc/mail/sendmail.mc文件: DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl 把原来的指定Addr注释掉，原来这种配置只能向本机地址发送邮件，然后重新加载配置文件： make -C /etc/mail 重启服务: service sendmail restart 使用mail发信就正常了。 Update:080814: 今天又遇到这个问题了，CSDN那个文章没办法访问，看了看google的快照，顺便把过程写到这里。]]></description>
			<content:encoded><![CDATA[<p>偶尔发现我机子上的<a href="http://cocobear.info/blog/tag/mail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mail">mail</a>命令不能发信，看了下错误日志：</p>
<p>Jul  4 15:08:20 cocobear sendmail[4167]: m6478JxK004167: to=cocobear.cn@gmail.com, ctladdr=cocobear (500/500), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30113, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]</p>
<p>发信的状态是Connection refused by [127.0.0.1]</p>
<p>原来是sendmail在<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>中默认的配置有问题，修改/etc/<a href="http://cocobear.info/blog/tag/mail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mail">mail</a>/sendmail.mc文件:<br />
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl<br />
dnl #DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl</p>
<p>把原来的指定Addr注释掉，原来这种配置只能向本机地址发送邮件，然后重新加载配置文件：<br />
make -C /etc/<a href="http://cocobear.info/blog/tag/mail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mail">mail</a></p>
<p>重启服务:<br />
service sendmail restart</p>
<p>使用<a href="http://cocobear.info/blog/tag/mail/" class="st_tag internal_tag" rel="tag" title="Posts tagged with mail">mail</a>发信就正常了。</p>
<p>Update:080814:<br />
今天又遇到这个问题了，CSDN那个文章没办法访问，看了看google的快照，顺便把过程写到这里。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/07/04/can-not-use-mail-in-fedora/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fedora中ATI显示驱动问题</title>
		<link>http://cocobear.info/blog/2008/05/30/fedora9-ati/</link>
		<comments>http://cocobear.info/blog/2008/05/30/fedora9-ati/#comments</comments>
		<pubDate>Fri, 30 May 2008 08:25:34 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ATI]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=285</guid>
		<description><![CDATA[Fedora9中由于Xorg版本过新的原因（刚开始我还以为是内核版本过新的原因），最新的ATI显卡驱动没办法使用，因此3D效果无法开启，在我的机子上不仅如此，而且连在runlevel 5 下使用Ctrl+ALT+F1这样切换终端都出现问题（不支援）。 忍了几天，今天终于解决掉了，我是按照这篇文章来做的，既然Xorg版本过新，那就直接换个低版本的Xorg（Linux不就有这个好处吗^_^）。 详细的我就不写出来了，说下大概过程： 首先是为系统添加Fedora8的源，可以直接下载这个文件，然后在Fedora9 yum配置文件中把xorg* linuxwacom* rhpxl* mesa*/" 相关的软件包排除掉，卸载Xorg，重新安装一次，这时由于Fedora9中已经排除了Xorg相关的软件包，因此yum就会从Fedora8的源中安装这些包，这样就得到了downgrade的效果。 文章的最后还给出来如果恢复到系统默认Xorg的办法，这里就不提了。 现在我的Fedora9完全没有问题了，^_^ btw:记个东西，ssh到内网的电脑： 首先得有个公网的IP，然后在内网（我公司的电脑）的电脑上使用下面命令： [cocobear@cocobear ~]$ ssh -f -N -R 1986:localhost:22 cocobear@208.113.171.94 （208.113.171.94这个IP是我网站的IP，一会儿会提到为什么用这个IP） 接着在有公网IP的电脑上登录这台内网机器： 因为我另一边要在宿舍来连公司的这台电脑，而宿舍的电脑也在内网，因此需要使用一个具有公网IP的跳板电脑，我先在宿舍ssh到我这个网站的服务器上： [cocobear@cocobear ~]$ ssh -l cocobear cocobear.info 然后在服务器上连接 [crystallight]$ ssh cocobear@localhost -p 1986 呵呵，这样就可以从宿舍电脑ssh到公司了，一会儿回宿舍看看公司这边电脑东西下完了没^_^]]></description>
			<content:encoded><![CDATA[<p>Fedora9中由于Xorg版本过新的原因（刚开始我还以为是内核版本过新的原因），最新的ATI显卡驱动没办法使用，因此3D效果无法开启，在我的机子上不仅如此，而且连在runlevel 5 下使用Ctrl+ALT+F1这样切换终端都出现问题（不支援）。</p>
<p>忍了几天，今天终于解决掉了，我是按照<strong><a href="http://www.fedoraforum.org/forum/showthread.php?t=189227">这篇文章</a></strong>来做的，既然Xorg版本过新，那就直接换个低版本的Xorg（Linux不就有这个好处吗^_^）。</p>
<p>详细的我就不写出来了，说下大概过程：<br />
首先是为系统添加Fedora8的源，可以直接下载<a href="http://www.linux-ati-drivers.homecall.co.uk/fedora8.repo">这个文件</a>，然后在Fedora9 yum配置文件中把xorg*  linuxwacom*  rhpxl*  mesa*/" 相关的软件包排除掉，卸载Xorg，重新安装一次，这时由于Fedora9中已经排除了Xorg相关的软件包，因此yum就会从Fedora8的源中安装这些包，这样就得到了downgrade的效果。</p>
<p>文章的最后还给出来如果恢复到系统默认Xorg的办法，这里就不提了。</p>
<p>现在我的Fedora9完全没有问题了，^_^</p>
<p>btw:记个东西，<a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>到内网的电脑：<br />
首先得有个公网的IP，然后在内网（我公司的电脑）的电脑上使用下面命令：<br />
[cocobear@cocobear ~]$ <a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a> -f -N -R 1986:localhost:22 cocobear@208.113.171.94<br />
（208.113.171.94这个IP是我网站的IP，一会儿会提到为什么用这个IP）<br />
接着在有公网IP的电脑上登录这台内网机器：</p>
<p>因为我另一边要在宿舍来连公司的这台电脑，而宿舍的电脑也在内网，因此需要使用一个具有公网IP的跳板电脑，我先在宿舍<a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>到我这个网站的服务器上：<br />
[cocobear@cocobear ~]$ <a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a> -l cocobear cocobear.info<br />
然后在服务器上连接<br />
[crystallight]$ <a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a> cocobear@localhost -p 1986<br />
呵呵，这样就可以从宿舍电脑<a href="http://cocobear.info/blog/tag/ssh/" class="st_tag internal_tag" rel="tag" title="Posts tagged with ssh">ssh</a>到公司了，一会儿回宿舍看看公司这边电脑东西下完了没^_^</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/05/30/fedora9-ati/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>vim中使用sdcv(stardict CLI版)</title>
		<link>http://cocobear.info/blog/2008/05/19/vim-sdcv/</link>
		<comments>http://cocobear.info/blog/2008/05/19/vim-sdcv/#comments</comments>
		<pubDate>Mon, 19 May 2008 07:31:36 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sdcv]]></category>
		<category><![CDATA[Vim]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=280</guid>
		<description><![CDATA[这里介绍的vim中使用辞典查词的方法不错，利用了vim的一些特性，这样平时使用vim的时候就可以手不离键盘要完成查词了。 sdvc是命令行版的Stardict,可以在这里下载，目前最新的版本是0.4.2，不过在ADM64平台下编译会出错，我在网上找到了一个补丁，不过这个补丁是针对debain用户的，有些用不上，那些找不到文件的patch就可以直接忽略掉。 如果在gvim中使用则在~/.gvimrc中添加： BASH: function &#160;Mybln&#40;&#41; &#160; &#160; &#160;let &#160;expl=system&#40;'sdcv &#160;-n &#160;' &#160;. &#160; &#160; &#160; &#160; &#160; &#160;\ &#160;v:beval_text &#160;. &#160; &#160; &#160; &#160; &#160; &#160;\ &#160;'&#124;fmt &#160;-cstw &#160;40'&#41; &#160; &#160; &#160;return &#160;expl &#160; &#160;endfunction &#160; &#160; &#160;set &#160;bexpr=Mybln&#40;&#41; &#160; &#160;set &#160;beval 如果直接在vim中使用，则在~/.vimrc中添加： BASH: function! &#160;Mydict&#40;&#41; &#160; &#160;let &#160;expl=system&#40;'sdcv &#160;-n &#160;' &#160;. &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://my.opera.com/yunt/blog/show.dml/304842">这里</a>介绍的vim中使用辞典查词的方法不错，利用了vim的一些特性，这样平时使用vim的时候就可以手不离键盘要完成查词了。</p>
<p>sdvc是命令行版的Stardict,可以在这里<a href="http://sourceforge.net/projects/sdcv">下载</a>，目前最新的版本是0.4.2，不过在ADM64平台下编译会出错，我在网上找到了一个<a href="http://patches.ubuntu.com/by-release/debian/s/sdcv/sdcv_0.4.2-2.2.patch">补丁</a>，不过这个补丁是针对debain用户的，有些用不上，那些找不到文件的patch就可以直接忽略掉。</p>
<p>如果在gvim中使用则在~/.gvimrc中添加：</p>
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-15">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff; font-weight: bold;">function</span> &nbsp;Mybln<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;<span style="color: #85f78b; font-weight: bold;">let</span> &nbsp;<span style="color: #ff87ff;">expl</span>=system<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #00ffff;">'<a href="http://cocobear.info/blog/tag/sdcv/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sdcv">sdcv</a> &nbsp;-n &nbsp;'</span> &nbsp;. </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;v:beval_text &nbsp;. </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;<span style="color: #00ffff;">'|fmt &nbsp;-cstw &nbsp;40'</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp;<span style="color: #85f78b; font-weight: bold;">return</span> &nbsp;expl </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;endfunction </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;<span style="color: #ffffff; font-weight: bold;">set</span> &nbsp;<span style="color: #ff87ff;">bexpr</span>=Mybln<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;<span style="color: #ffffff; font-weight: bold;">set</span> &nbsp;beval</div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>如果直接在vim中使用，则在~/.vimrc中添加：</p>
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-16">
<div class="bash" style="font-family:monospace;">
<ol>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #ffffff; font-weight: bold;">function</span><span style="color: #ffffff; font-weight: bold;">!</span> &nbsp;Mydict<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;<span style="color: #85f78b; font-weight: bold;">let</span> &nbsp;<span style="color: #ff87ff;">expl</span>=system<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #00ffff;">'<a href="http://cocobear.info/blog/tag/sdcv/" class="st_tag internal_tag" rel="tag" title="Posts tagged with sdcv">sdcv</a> &nbsp;-n &nbsp;'</span> &nbsp;. </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp; expand<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #00ffff;">&quot;&lt;cword&gt;&quot;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;windo &nbsp;<span style="color: #ffffff; font-weight: bold;">if</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;expand<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #00ffff;">&quot;%&quot;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span>==<span style="color: #00ffff;">&quot;diCt-tmp&quot;</span> &nbsp;<span style="color: #ffffff; font-weight: bold;">|</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp;q<span style="color: #ffffff; font-weight: bold;">!|</span>endif </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;25vsp &nbsp;diCt-tmp </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;setlocal &nbsp;<span style="color: #ff87ff;">buftype</span>=nofile &nbsp;<span style="color: #ff87ff;">bufhidden</span>=hide &nbsp;noswapfile </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;1s<span style="color: #ffffff; font-weight: bold;">/</span>^<span style="color: #ffffff; font-weight: bold;">/</span>\=expl<span style="color: #ffffff; font-weight: bold;">/</span> </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp;<span style="color: #ffffff;color:#800000;">1</span> </div>
</li>
<li style="font-weight: normal; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">endfunction </div>
</li>
<li style="font-weight: bold; vertical-align:top;color:#3A6A8B;">
<div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #3df346; font-weight: bold;">nmap</span> &nbsp;F &nbsp;:call &nbsp;Mydict<span style="color: #85f78b; font-weight: bold;">&#40;</span><span style="color: #85f78b; font-weight: bold;">&#41;</span><span style="color: #ffffff; font-weight: bold;">&lt;</span>cr<span style="color: #ffffff; font-weight: bold;">&gt;</span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>gvim中鼠标移动到单词上就可以得到翻译，在vim中光标移动到单词上，使用shift＋f可以新分割出来一个窗口显示单词的翻译。</p>
<p>原文请使用梯子访问。<br />
</cr></cword></p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/05/19/vim-sdcv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fedora9安装vmware</title>
		<link>http://cocobear.info/blog/2008/05/19/fedora9-vmware/</link>
		<comments>http://cocobear.info/blog/2008/05/19/fedora9-vmware/#comments</comments>
		<pubDate>Mon, 19 May 2008 01:32:25 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=279</guid>
		<description><![CDATA[刚开始公司的机子上没办法装Fedora8，只好用vmware在XP下装了个Fedora8，现在F9出来了，在本机装了一个，以后就可以不用进XP了，不过F9似乎有些不太稳定，听说vmware也有linux版的,找了一个新6.0.3.build.80004版本的vmware，没想到安装时又出问题了，似乎又是因为内核版本过高的原因。 这里有一个解决方案，有人根据最新的内核写的vmware的补丁。 首先下载： http://blender6xx.ic.cz/pub/vmware/vmblock.patch http://blender6xx.ic.cz/pub/vmware/vmmon.patch http://blender6xx.ic.cz/pub/vmware/vmnet.patch 这几个补丁，然后安装使用vmware-install.pl 开始安装vmware，当编译出错时把这几个补丁打上去，需要打补丁的文件在：/usr/lib/vmware/modules/source/ ，有几个tar的包，先解压了，然后进入解压后的目录, 用 patch -Np1 < modulename.patch 打好补丁，然后再把打好补丁的包再打包一次。 完成后使用 vmware-config.pl 继续安装，中间可能会缺少一些库，如: libX11.so.6 libXtst.so.6 libXext.so.6 libXrender.so.1 libz.so.1 都可以在rpmfind.net里找到。 接下来一切都会顺利进行。把windows下的Fedora8拷过来直接就可以运行了，呵呵。]]></description>
			<content:encoded><![CDATA[<p>刚开始公司的机子上没办法装Fedora8，只好用<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>在XP下装了个Fedora8，现在F9出来了，在本机装了一个，以后就可以不用进XP了，不过F9似乎有些不太稳定，听说<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>也有linux版的,找了一个新6.0.3.build.80004版本的<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>，没想到安装时又出问题了，似乎又是因为内核版本过高的原因。</p>
<p><a href="http://bbs.archlinux.org/viewtopic.php?id=47704">这里</a>有一个解决方案，有人根据最新的内核写的<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>的补丁。</p>
<p>首先下载：</p>
<p>http://blender6xx.ic.cz/pub/<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>/vmblock.patch</p>
<p>http://blender6xx.ic.cz/pub/<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>/vmmon.patch</p>
<p>http://blender6xx.ic.cz/pub/<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>/vmnet.patch</p>
<p>这几个补丁，然后安装使用<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>-install.pl 开始安装<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>，当编译出错时把这几个补丁打上去，需要打补丁的文件在：/usr/lib/<a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>/modules/source/ ，有几个tar的包，先解压了，然后进入解压后的目录, 用<br />
patch -Np1 < modulename.patch 打好补丁，然后再把打好补丁的包再打包一次。</p>
<p>完成后使用 <a href="http://cocobear.info/blog/tag/vmware/" class="st_tag internal_tag" rel="tag" title="Posts tagged with vmware">vmware</a>-config.pl 继续安装，中间可能会缺少一些库，如:<br />
libX11.so.6<br />
libXtst.so.6<br />
libXext.so.6<br />
libXrender.so.1<br />
libz.so.1<br />
都可以在rpmfind.net里找到。</p>
<p>接下来一切都会顺利进行。把windows下的Fedora8拷过来直接就可以运行了，呵呵。</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/05/19/fedora9-vmware/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fedora9试用</title>
		<link>http://cocobear.info/blog/2008/05/15/fedora9-testing/</link>
		<comments>http://cocobear.info/blog/2008/05/15/fedora9-testing/#comments</comments>
		<pubDate>Thu, 15 May 2008 06:59:34 +0000</pubDate>
		<dc:creator>可可熊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>

		<guid isPermaLink="false">http://cocobear.info/blog/?p=277</guid>
		<description><![CDATA[刚在公司电脑上装了Fedora9，安装完成后发现X显示有问题，重启后进入X时显示器提示“不支援输入”，这个显示器是AOC的，查了下这种情况应该是刷新率与显示器的冲突吧，但是Fedora9中xorg.conf 文件已经不包含屏幕分辨率、刷新率的配置，而是自动进行检测，本来应该说是更智能了，但遇到这样的情况都没办法手动解决问题了，按照以往的经常，我把机子上Ubuntu的xorg.conf 文件拷了过来，覆盖掉原来的文件，X终于正常了，但屏幕的分辨率变为了：1152x864，刷新率只有60Hz，而且使用Ctrl+Alt+num 切换到其它终端时显示“无信号”，太奇怪了。用了Fedora系统这么久还是头一次遇到这样的情况。 现在正在下ATI 的显卡驱动，不知道会不会解决这个问题。 在这里下载驱动，安装好后可以设置正确的分辨率，1280x1024，但是其它终端仍然“无信号”，而且ati的那个控制中心没办法使用。 找到一篇文章，正在使用上面的方法重新安装驱动，里面有一点:yum install kmod-fglrx要加--enablerepo=livna-testing参数,，否则是无法找到kmod-fglrx这个包的。 公司的网速好慢……]]></description>
			<content:encoded><![CDATA[<p>刚在公司电脑上装了Fedora9，安装完成后发现X显示有问题，重启后进入X时显示器提示“不支援输入”，这个显示器是AOC的，查了下这种情况应该是刷新率与显示器的冲突吧，但是Fedora9中xorg.conf 文件已经不包含屏幕分辨率、刷新率的配置，而是自动进行检测，本来应该说是更智能了，但遇到这样的情况都没办法手动解决问题了，按照以往的经常，我把机子上Ubuntu的xorg.conf 文件拷了过来，覆盖掉原来的文件，X终于正常了，但屏幕的分辨率变为了：1152x864，刷新率只有60Hz，而且使用Ctrl+Alt+num 切换到其它终端时显示“无信号”，太奇怪了。用了<a href="http://cocobear.info/blog/tag/fedora/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Fedora">Fedora</a>系统这么久还是头一次遇到这样的情况。</p>
<p>现在正在下ATI 的显卡驱动，不知道会不会解决这个问题。</p>
<p>在<a href="http://ati.amd.com/support/drivers/linux64/radeonprevious-linux64.html">这里</a>下载驱动，安装好后可以设置正确的分辨率，1280x1024，但是其它终端仍然“无信号”，而且ati的那个控制中心没办法使用。</p>
<p>找到一篇<a href="http://blog.hxsd.com.cn/blog/linlin911911/article/i28813.html">文章</a>，正在使用上面的方法重新安装驱动，里面有一点:yum install kmod-fglrx要加--enablerepo=livna-testing参数,，否则是无法找到kmod-fglrx这个包的。</p>
<p>公司的网速好慢……</p>
]]></content:encoded>
			<wfw:commentRss>http://cocobear.info/blog/2008/05/15/fedora9-testing/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
