﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-gembin-随笔分类-Linux</title><link>http://www.blogjava.net/gembin/category/34821.html</link><description>&lt;font color="red"&gt;OSGi, Eclipse Equinox, ECF, Virgo, Gemini,  Apache Felix, Karaf, Aires, Camel, Eclipse RCP&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;
&lt;font color="green"&gt;HBase, Hadoop, ZooKeeper, Cassandra&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;

&lt;font color="blue"&gt;Flex4, AS3, Swiz framework, GraniteDS, BlazeDS etc.&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;
&lt;font color="black"&gt;
There is nothing that software can't fix. Unfortunately, there is also nothing that software can't completely fuck up. That gap is called talent.&lt;/font&gt;
&lt;br/&gt;&lt;br/&gt;

&lt;a href="http://about.me/gembin"&gt;About Me&lt;/a&gt;

&lt;script type="text/javascript" src="http://platform.linkedin.com/in.js"&gt;&lt;/script&gt;&lt;script type="in/share" data-counter="right"&gt;&lt;/script&gt;

</description><language>zh-cn</language><lastBuildDate>Sun, 23 Dec 2012 15:05:30 GMT</lastBuildDate><pubDate>Sun, 23 Dec 2012 15:05:30 GMT</pubDate><ttl>60</ttl><item><title>CentOS-语言设置</title><link>http://www.blogjava.net/gembin/archive/2012/12/23/393375.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Sun, 23 Dec 2012 14:08:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2012/12/23/393375.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/393375.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2012/12/23/393375.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/393375.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/393375.html</trackback:ping><description><![CDATA[<p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">查看所有的locale语言</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_1" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_1" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_1" name="clipboardswf_1" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">#&nbsp;locale&nbsp;-a&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">#&nbsp;locale&nbsp;-a|grep&nbsp;en&nbsp;</span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 查看当前操作系统使用的语言</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_2" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_2" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_2" name="clipboardswf_2" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">#&nbsp;echo&nbsp;$LANG&nbsp;</span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 设置系统locale语言为中文环境（永久生效）</p><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; "># vi /etc/sysconfig/i18n</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_3" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_3" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_3" name="clipboardswf_3" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; "><span style="padding: 0px; margin: 0px; border: none; color: red; background-color: inherit; ">LANG</span><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">=</span><span style="padding: 0px; margin: 0px; border: none; color: blue; background-color: inherit; ">"zh_CN.UTF-8"</span>&nbsp;</span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 设置系统locale语言为英文环境（永久生效）</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_4" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_4" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_4" name="clipboardswf_4" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; "><span style="padding: 0px; margin: 0px; border: none; color: red; background-color: inherit; ">LANG</span><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">=</span><span style="padding: 0px; margin: 0px; border: none; color: blue; background-color: inherit; ">"en_US.UTF-8"</span>&nbsp;</span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 临时改变系统locale语言（退出本次登录立即失效）</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_5" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_5" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_5" name="clipboardswf_5" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; "><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">#&nbsp;export&nbsp;</span><span style="padding: 0px; margin: 0px; border: none; color: red; background-color: inherit; ">LANG</span><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">=</span><span style="padding: 0px; margin: 0px; border: none; color: blue; background-color: inherit; ">zh_CN</span><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">.UTF-8&nbsp;</span></span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 安装中文字体</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_6" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_6" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_6" name="clipboardswf_6" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">#&nbsp;yum&nbsp;install&nbsp;fonts-chinese.noarch&nbsp;</span></li></ol></pre><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; ">&#9632; 指定中文字体路径</p><p style="padding: 0px; margin: 1em 0px 0.5em; text-indent: 2em; color: #333333; font-family: Verdana, Arial, Tahoma; line-height: 25px; background-color: #ffffff; "># vi /etc/X11/fs/config</p><pre style="padding: 0px; margin-top: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 712px; overflow: auto; background-color: #f7f7f7; color: #333333; line-height: 25px; "><div id="codeCtrl_7" style="padding-left: 10px; margin: 0px 0px 0px 3em !important; border-left-width: 3px; border-left-style: solid; border-left-color: #146b00; color: #999999; "><a id="view_7" href="" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">view plain</a>&nbsp;&nbsp;&nbsp;<span id="clipinner" style="padding: 0px; margin: 0px; position: relative; width: 100px; "><a href="http://www.sunchis.com/html/os/linux/2011/1115/373.html#" style="padding: 0px; margin: 0px; color: #999999; text-decoration: none; background-image: none; border: none; background-position: initial initial; background-repeat: initial initial; ">copy</a><embed width="100" height="20" type="application/x-shockwave-flash" wmode="transparent" swliveconnect="true" allowscriptaccess="sameDomain" menu="false" src="http://www.sunchis.com/public/clipboard.swf" devicefont="false" id="clipboardswf_7" name="clipboardswf_7" style="padding: 0px; margin: 0px; position: absolute; left: 0px; top: 0px; "></span></div><ol style="padding: 5px 0px; margin: 0px 0px 1px 3em !important; border-style: none none none solid; border-left-width: 3px; border-left-color: #146b00; list-style-position: initial; list-style-image: initial; color: #5c5c5c; "><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; "><span style="padding: 0px; margin: 0px; border: none; color: red; background-color: inherit; ">catalogue</span><span style="padding: 0px; margin: 0px; border: none; background-color: inherit; ">&nbsp;=&nbsp;/usr/X11R6/lib/X11/fonts/misc:unscaled,&nbsp;</span></span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/X11R6/lib/X11/fonts/75dpi:unscaled,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/X11R6/lib/X11/fonts/100dpi:unscaled,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/X11R6/lib/X11/fonts/Type1,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/share/fonts/default/Type1,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; color: inherit; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/share/fonts/zh_CN/TrueType,&nbsp;</span></li><li style="padding: 0px 3px 0px 10px !important; margin: 0px !important; border: none; list-style: decimal-leading-zero outside; line-height: 1.3em; "><span style="padding: 0px; margin: 0px; border: none; color: black; background-color: inherit; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/share/fonts/zh_TW/TrueType&nbsp;<br /><br /><br /><br /><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">方法2</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">修改CentOS运行环境的默认语言环境变量值</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">[root@www ~]# vi /etc/profile</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">找到export语句，在语句前面加入</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">LANG=&#8221;en_US.UTF-8&#8243;</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">再在export后面追加LANG</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC LANG</p><p style="background-color: #f3f3f3; border: 0px; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline; color: #333333; font-family: Verdana, 'Trebuchet MS', Tahoma, Georgia, Helvetica; line-height: 21px; white-space: normal; ">保存配置，修改CentOS语言完成。</p></span></li></ol></pre><img src ="http://www.blogjava.net/gembin/aggbug/393375.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2012-12-23 22:08 <a href="http://www.blogjava.net/gembin/archive/2012/12/23/393375.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ethtool and mii-tool</title><link>http://www.blogjava.net/gembin/archive/2012/09/07/387249.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Fri, 07 Sep 2012 06:41:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2012/09/07/387249.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/387249.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2012/09/07/387249.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/387249.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/387249.html</trackback:ping><description><![CDATA[<h1><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">mii-tool（这是Linux下专门设置网卡工作模式的命令）</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　1. 查看网卡的工作模式，输入命令：</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　#mii-tool -v</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　eth0: negotiated 100baseTx-FD, link ok</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　product info: vendor 00:aa:00, model 56 rev 0</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　basic mode: autonegotiation enabled</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　basic status: autonegotiation complete, link ok</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　从以上信息中可以看出，这块网卡工作在100M全双工自适应模式下，&#8220;100BaseTx-FD&#8221;意为100M Full Duplex。</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　2. 更改网卡的工作模式，输入命令：</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　#mii-tool -F media [interface]</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　media可选的模式有100baseTx-FD、100baseTx-HD、10baseT-FD、10baseT-HD等。 Interface代表所选择的网卡，如eth0、eth1等，默认为eth0。</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　例如，设置网卡工作在10M半双工模式下，输入命令：</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　#mii-tool -F 10baseT-HD eth0</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　3. 恢复网卡的自适应工作模式，输入命令：</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　#mii-tool -r eth0</span><div style="height: 14px; line-height: 14px; font-size: 12px; overflow: hidden; font-family: arial, 宋体, sans-serif; font-weight: normal; background-color: #ffffff; "></div><span style="font-family: arial, 宋体, sans-serif; font-size: 14px; font-weight: normal; line-height: 24px; background-color: #ffffff; ">　　更详细的使用方法可以用mii-tool -h来获得。<br /><br /><br /><br /></span><h2 class="contentheading" style="margin: 0px 0px 7px; font-size: 18px; line-height: 1.5em; color: #a30327; padding: 0px 0px 3px; font-family: 'Trebuchet MS', sans-serif; background-image: url(http://lynty.com/templates/ymovies/images/h3.gif); background-color: #ffffff; background-position: 0% 100%; background-repeat: repeat no-repeat; ">ethtool/mii-tool</h2><div class="newsitem_tools" style="width: 970px; margin: 0px 0px 15px !important; color: #555555; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; line-height: 18px; background-color: #ffffff; "><div class="newsitem_info" style="width: 679px; height: 10px; float: left; "></div><div class="buttonheading" style="width: 291px; overflow: hidden; float: right; "><span class="print" style="float: right; margin: 0px 2px 0px 0px; width: 16px; "><a href="http://www.lynty.com/index.php/ethtoolmii-tool?tmpl=component&amp;print=1&amp;page=" title="Print" rel="nofollow" style="cursor: pointer; text-decoration: none; color: #a30327; "><img src="http://www.lynty.com/templates/ymovies/images/printButton.png" alt="Print" style="border: 0px; padding: 0px; " /></a></span><span class="pdf" style="float: right; margin: 0px 2px 0px 0px; width: 16px; "><a href="http://www.lynty.com/index.php/ethtoolmii-tool?format=pdf" title="PDF" rel="nofollow" style="cursor: pointer; text-decoration: none; color: #a30327; "><img src="http://www.lynty.com/templates/ymovies/images/pdf_button.png" alt="PDF" style="border: 0px; padding: 0px; " /></a></span></div></div><div class="newsitem_text" style="width: 970px; padding-top: 10px !important; color: #555555; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; line-height: 18px; background-color: #ffffff; "><div class="news_item_article"><p style="margin: 0.5em 0px; "><strong>Linux LAN card: Find out full duplex / half speed or mode</strong><br /><br />Q. How do I find out if my Lan (NIC) card working at full or halt duplex mode / speed under Linux?<br /><br />A. LAN card or NIC is use to send and receive data. Technically, we use word Duplex for this functionality. Full duplex means you are able to send and receive data (files) simultaneously. In half duplex, you can either send or receive data at a time (i.e. you cannot send receive data (files) simultaneously). Obviously, full duplex gives you best user experience. However, how can I find out whether I am using full duplex/half duplex speed/mode?<br /><strong>Task: Find full or half duplex speed</strong><br /><br />You can use dmesg command to find out your duplex mode:</p><pre style="padding: 10px 15px !important; margin-top: 5px !important; margin-bottom: 15px !important; white-space: normal !important; width: auto !important; border-width: 1px 1px 1px 5px !important; border-style: solid !important; border-color: #e7e7e7 !important; background-color: #f6f6f6 !important; "># dmesg | grep -i duplex</pre><p style="margin: 0.5em 0px; ">Output:<br /><br />eth0: link up, 100Mbps, full-duplex, lpa 0x45E1<br /><br /><strong>ethtool command<br /></strong><br />Uss ethtool to display or change ethernet card settings. To display duplex speed, enter:</p><pre style="padding: 10px 15px !important; margin-top: 5px !important; margin-bottom: 15px !important; white-space: normal !important; width: auto !important; border-width: 1px 1px 1px 5px !important; border-style: solid !important; border-color: #e7e7e7 !important; background-color: #f6f6f6 !important; "># ethtool eth1</pre><p style="margin: 0.5em 0px; ">Output:<br /><br />Settings for eth1:<br />Supported ports: [ TP ]<br />Supported link modes:&nbsp;&nbsp; 10baseT/Half 10baseT/Full<br />100baseT/Half 100baseT/Full<br />1000baseT/Full<br />Supports auto-negotiation: Yes<br />Advertised link modes:&nbsp; 10baseT/Half 10baseT/Full<br />100baseT/Half 100baseT/Full<br />1000baseT/Full<br />Advertised auto-negotiation: Yes<br />Speed: 10Mb/s<br />Duplex: Full<br />Port: Twisted Pair<br />PHYAD: 0<br />Transceiver: internal<br />Auto-negotiation: on<br />Supports Wake-on: umbg<br />Wake-on: g<br />Current message level: 0x00000007 (7)<br />Link detected: yes<br /><br /><strong>mii-tool command</strong><br /><br />You can also use mii-tool to find out your duplex mode. Type following command at shell prompt:</p><pre style="padding: 10px 15px !important; margin-top: 5px !important; margin-bottom: 15px !important; white-space: normal !important; width: auto !important; border-width: 1px 1px 1px 5px !important; border-style: solid !important; border-color: #e7e7e7 !important; background-color: #f6f6f6 !important; "># mii-tool</pre><p style="margin: 0.5em 0px; "><br />Output:<br /><br />eth0: negotiated 100baseTx-FD flow-control, link ok<br /><strong><br />Remember,</strong><br /><br />1. 100baseTx-FD: 100Mbps full duplex (FD)<br />2. 100baseTx-HD: 100Mbps half duplex (HD)<br />3. 10baseT-FD: 10Mbps full duplex (FD)<br />4. 10baseT-HD: 10Mbps half duplex (HD)<br /><br />mii-tool utility checks or sets the status of a network interface Media Independent Interface (MII) unit. Most fast ethernet adapters use an MII to autonegotiate link speed and duplex setting. If you are using old card then this utility may not work (use dmesg command).<br /><br />This utility is useful for forcing specific Ethernet speed and duplex settings too, setup 100Mbps full duplex speed under Linux:</p><pre style="padding: 10px 15px !important; margin-top: 5px !important; margin-bottom: 15px !important; white-space: normal !important; width: auto !important; border-width: 1px 1px 1px 5px !important; border-style: solid !important; border-color: #e7e7e7 !important; background-color: #f6f6f6 !important; "># mii-tool -F 100baseTx-FD</pre><p style="margin: 0.5em 0px; "><br />Setup 10Mbps half duplex:</p><pre style="padding: 10px 15px !important; margin-top: 5px !important; margin-bottom: 15px !important; white-space: normal !important; width: auto !important; border-width: 1px 1px 1px 5px !important; border-style: solid !important; border-color: #e7e7e7 !important; background-color: #f6f6f6 !important; "># mii-tool -F 10baseT-HD</pre><p style="margin: 0.5em 0px; "><br />source:</p><p style="margin: 0.5em 0px; ">http://www.cyberciti.biz/faq/howto-setup-linux-lan-card-find-out-full-duplex-half-speed-or-mode/</p></div></div> </h1><img src ="http://www.blogjava.net/gembin/aggbug/387249.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2012-09-07 14:41 <a href="http://www.blogjava.net/gembin/archive/2012/09/07/387249.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Top Ten Reasons not to use the C shell</title><link>http://www.blogjava.net/gembin/archive/2012/04/01/373205.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Sun, 01 Apr 2012 08:30:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2012/04/01/373205.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/373205.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2012/04/01/373205.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/373205.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/373205.html</trackback:ping><description><![CDATA[<pre style="line-height: normal; font-size: medium; word-wrap: break-word; white-space: pre-wrap; "> <a href="http://www.grymoire.com/Unix/CshTop10.txt">http://www.grymoire.com/Unix/CshTop10.txt</a> </pre><img src ="http://www.blogjava.net/gembin/aggbug/373205.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2012-04-01 16:30 <a href="http://www.blogjava.net/gembin/archive/2012/04/01/373205.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Get substring of a string under UNIX/Linux</title><link>http://www.blogjava.net/gembin/archive/2012/04/01/373200.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Sun, 01 Apr 2012 07:38:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2012/04/01/373200.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/373200.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2012/04/01/373200.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/373200.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/373200.html</trackback:ping><description><![CDATA[<div style="text-align: left;"><strong style="background-color: #ffffff; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 22px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">there many ways to do so.</strong></div><p style="background-color: #ffffff; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.571em; margin-left: 0px; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 22px; "><strong style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br style="clear: both; " />str="hello world"<br style="clear: both; " /><br />1) cut<br /><span style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-weight: normal; line-height: 18px; text-align: left; ">Where -cN-M tells the cut command to return columns N to M, inclusive.</span>&nbsp;<br /></strong><strong style="color: #000000; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; line-height: 18px; text-align: left; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">cut -cN-M</span></code></strong></p><strong style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">start=1<br />end=5<br />sub_str=`echo ${str} | cut -c${start}-${end}`<br /></strong>output: hello<br /><br /><strong>2)</strong>
<strong>bash&nbsp;</strong><br /><span style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18px; text-align: left; ">Note: if you are not sure of having&nbsp;</span><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 1px; padding-right: 5px; padding-bottom: 1px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; line-height: 18px; text-align: left; ">bash</code><span style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18px; text-align: left; ">, consider using&nbsp;</span><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 1px; padding-right: 5px; padding-bottom: 1px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #000000; line-height: 18px; text-align: left; ">cut</code><span style="color: #000000; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; line-height: 18px; text-align: left; ">.</span>&nbsp;<br /><pre prettyprint"="" style="margin-top: 0px; margin-bottom: 10px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: #000000; line-height: 18px; text-align: left; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-color: #eeeeee; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">$</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">{</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">str</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">:</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">offset</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">}</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; "><br />$</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">{</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">str</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">:</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">offset</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">:</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">length</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; ">}<br /><br /></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; "><strong style="font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sub_str=${str:0:5}</strong> <br /></span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; "><span style="font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; ">output: hello</span> <br /><br /><strong style="font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; ">3)</strong><span style="font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; ">&nbsp;<strong>expr</strong></span><strong> </strong><br /></span></code></pre><p></p><pre prettyprint"="" style="margin-top: 0px; margin-bottom: 10px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; line-height: 18px; text-align: left; "><code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-color: #eeeeee; "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; "><span style="white-space: normal; ">expr substr string position length</span> <br /></span></code><span style="background-color: #eeeeee; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; "><span style="font-weight: bold; font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">sub_str=</span><strong>`expr substr $str 1 5`</strong><br /></span><span style="background-color: #eeeeee; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; "><span style="font-family: verdana, 'courier new'; line-height: 21px; text-align: -webkit-auto; white-space: normal; ">output: hello</span> </span></pre><span style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; line-height: 18px; text-align: left; "></span><p>&nbsp;</p><img src ="http://www.blogjava.net/gembin/aggbug/373200.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2012-04-01 15:38 <a href="http://www.blogjava.net/gembin/archive/2012/04/01/373200.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> Get the length of a string under UNIX/Linux</title><link>http://www.blogjava.net/gembin/archive/2012/04/01/373199.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Sun, 01 Apr 2012 07:14:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2012/04/01/373199.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/373199.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2012/04/01/373199.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/373199.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/373199.html</trackback:ping><description><![CDATA[<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.571em; margin-left: 0px; color: #111111; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 22px; background-color: #ffffff; "><strong style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">there many ways to do so.<br /><br />str="hello world"<br /><br />len=`expr length ${str}`<br /><br /></strong><strong style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">len=${#str}<br /></strong></p><div><span style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><strong>len=`echo ${str} | awk "{ print length }"`</strong><br /><br /><strong style="font-weight: bold; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">len=`echo -n ${str} | wc -c`</strong><strong>&nbsp;</strong><br /><font color="#111111" face="Arial, 'Helvetica Neue', Helvetica, sans-serif"><span style="line-height: 22px;"><br /></span></font></span></div><p>&nbsp;</p><img src ="http://www.blogjava.net/gembin/aggbug/373199.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2012-04-01 15:14 <a href="http://www.blogjava.net/gembin/archive/2012/04/01/373199.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How To Pronounce GNU</title><link>http://www.blogjava.net/gembin/archive/2011/11/18/364263.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Fri, 18 Nov 2011 09:17:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2011/11/18/364263.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/364263.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2011/11/18/364263.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/364263.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/364263.html</trackback:ping><description><![CDATA[<div><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.3em; color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; text-align: left; background-color: #ffffff; "><div><a href="http://www.gnu.org/pronunciation/pronunciation.html">http://www.gnu.org/pronunciation/pronunciation.html<br /><br /></a></div>The name &#8220;GNU&#8221; is a recursive acronym for &#8220;GNU's Not Unix!&#8221;; it is pronounced as one syllable with a hard g, like &#8220;grew&#8221; but with the letter &#8220;n&#8221; instead of &#8220;r&#8221;.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.3em; color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; text-align: left; background-color: #ffffff; ">This is a recording of&nbsp;<a href="http://www.stallman.org/" style="color: blue; ">Richard Stallman</a>&nbsp;saying &#8220;GNU&#8221; and another with a short explanation about how GNU was named:</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.3em; color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; text-align: left; background-color: #ffffff; "><strong style="font-style: inherit; font-weight: bold; ">How to say &#8220;GNU&#8221;:</strong></p><audio src="http://www.gnu.org/audio/gnu-pronunciation.ogg" controls="controls" style="color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; line-height: 19px; text-align: left; background-color: #ffffff; "></audio><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.3em; color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; text-align: left; background-color: #ffffff; "><strong style="font-style: inherit; font-weight: bold; ">How GNU Was Named:</strong></p><audio src="http://www.gnu.org/audio/how-gnu-was-named.ogg" controls="controls" style="color: #35382a; font-family: arial, helvetica, clean, sans-serif; font-size: 16px; line-height: 19px; text-align: left; background-color: #ffffff; "></audio></div><img src ="http://www.blogjava.net/gembin/aggbug/364263.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2011-11-18 17:17 <a href="http://www.blogjava.net/gembin/archive/2011/11/18/364263.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How To Use wget With Username and Password for FTP / HTTP File Retrieval</title><link>http://www.blogjava.net/gembin/archive/2011/06/07/351842.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Tue, 07 Jun 2011 03:02:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2011/06/07/351842.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/351842.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2011/06/07/351842.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/351842.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/351842.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/gembin/archive/2011/06/07/351842.html'>阅读全文</a><img src ="http://www.blogjava.net/gembin/aggbug/351842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2011-06-07 11:02 <a href="http://www.blogjava.net/gembin/archive/2011/06/07/351842.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Configuring the VNC server/viewer in Linux.</title><link>http://www.blogjava.net/gembin/archive/2010/07/16/326283.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Fri, 16 Jul 2010 03:45:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2010/07/16/326283.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/326283.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2010/07/16/326283.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/326283.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/326283.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Configuring the VNC server/viewer in Linux.&nbsp;&nbsp;<a href='http://www.blogjava.net/gembin/archive/2010/07/16/326283.html'>阅读全文</a><img src ="http://www.blogjava.net/gembin/aggbug/326283.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2010-07-16 11:45 <a href="http://www.blogjava.net/gembin/archive/2010/07/16/326283.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How To Setup Linux VNC Server In 3 Minutes</title><link>http://www.blogjava.net/gembin/archive/2010/07/16/326281.html</link><dc:creator>gembin</dc:creator><author>gembin</author><pubDate>Fri, 16 Jul 2010 03:37:00 GMT</pubDate><guid>http://www.blogjava.net/gembin/archive/2010/07/16/326281.html</guid><wfw:comment>http://www.blogjava.net/gembin/comments/326281.html</wfw:comment><comments>http://www.blogjava.net/gembin/archive/2010/07/16/326281.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/gembin/comments/commentRss/326281.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/gembin/services/trackbacks/326281.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:  setup Linux VNC Server In 3 Minutes&nbsp;&nbsp;<a href='http://www.blogjava.net/gembin/archive/2010/07/16/326281.html'>阅读全文</a><img src ="http://www.blogjava.net/gembin/aggbug/326281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/gembin/" target="_blank">gembin</a> 2010-07-16 11:37 <a href="http://www.blogjava.net/gembin/archive/2010/07/16/326281.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>