<?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>Page 5 &#187; Linux</title>
	<atom:link href="http://5.yupana.net/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://5.yupana.net</link>
	<description>Jeremy将所有的文字，写在了第5页. @Yupana.net</description>
	<lastBuildDate>Sat, 14 Jan 2012 17:47:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>让codeigniter在Linux主机运行时忽略url大小写</title>
		<link>http://5.yupana.net/2010/08/09/codeigniter-linux-url-ignore.html</link>
		<comments>http://5.yupana.net/2010/08/09/codeigniter-linux-url-ignore.html#comments</comments>
		<pubDate>Mon, 09 Aug 2010 08:06:50 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=2192</guid>
		<description><![CDATA[codeigniter框架(CI框架)的web应用在Linux主机里运行，会发现其对url的大小写很敏感。尤其是针对控制器的路由上。其实其他的一些web应用程序及框架可能也有这样的问题。 基本原因是CI框架在路由的时候，其实是通过地址判断文件是否存在，从而决定加载。同时Linux系统对文件名有大小写区分。 于是在地址栏里输入http://yoursite.com/Hello/hell的时候，打开的是一个名叫Hello的控制器，而同时加载的是controller下的Hello.php这个文件，如果你的文件名是hello.php，那么肯定就有404的错误。同样的如果你的控制器文件名字是hello.php，而你的地址是http://yoursite.com/Hello/hell，其要寻找的控制器文件Hello.php的时候自然就会判定不存在。 解决方法很简单，就是在system/libraries里的Router文件里加一条强制将控制器转化为小写的语句。然后将所有的控制器文件名改为小写（注意是文件名，不是类的名字）。 因为是修改框架本身的源文件，所以请备份好原文件。 1. 具体如下，找到system/libraries里的Router文件，修改源文件： 2. 将controllers文件夹下的文件都用小写的文件名，这也是codeigniter推荐的命名方式。 其实很多时候codeigniter并不推荐修改源文件，但是个人觉得这个方法最直接最有效，若有其他的方法，请留言告知，谢谢。]]></description>
			<content:encoded><![CDATA[<p>codeigniter框架(CI框架)的web应用在Linux主机里运行，会发现其对url的大小写很敏感。尤其是针对控制器的路由上。其实其他的一些web应用程序及框架可能也有这样的问题。</p>
<p>基本原因是CI框架在路由的时候，其实是通过地址判断文件是否存在，从而决定加载。同时Linux系统对文件名有大小写区分。</p>
<p>于是在地址栏里输入http://yoursite.com/Hello/hell的时候，打开的是一个名叫Hello的控制器，而同时加载的是controller下的Hello.php这个文件，如果你的文件名是hello.php，那么肯定就有404的错误。同样的如果你的控制器文件名字是hello.php，而你的地址是http://yoursite.com/Hello/hell，其要寻找的控制器文件Hello.php的时候自然就会判定不存在。</p>
<p>解决方法很简单，就是在system/libraries里的Router文件里加一条强制将控制器转化为小写的语句。然后将所有的控制器文件名改为小写（注意是文件名，不是类的名字）。</p>
<p>因为是修改框架本身的源文件，所以请备份好原文件。</p>
<p>1. 具体如下，找到system/libraries里的Router文件，修改源文件：</p>
<pre class="brush: php; title: ; notranslate">
//找到 function _validate_request

	function _validate_request($segments)
	{
		//增加下面这一句，其实就是强制将控制器名字转化为小写
                $segments[0] = strtolower($segments[0]);

		// Does the requested controller exist in the root folder?
		if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))
		{
			return $segments;
		}
</pre>
<p>2. 将controllers文件夹下的文件都用小写的文件名，这也是codeigniter推荐的命名方式。</p>
<p>其实很多时候codeigniter并不推荐修改源文件，但是个人觉得这个方法最直接最有效，若有其他的方法，请留言告知，谢谢。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2010/08/09/codeigniter-linux-url-ignore.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让nvidia显卡在Linux下正常驱动</title>
		<link>http://5.yupana.net/2010/05/05/nvidia-for-linux.html</link>
		<comments>http://5.yupana.net/2010/05/05/nvidia-for-linux.html#comments</comments>
		<pubDate>Wed, 05 May 2010 08:16:59 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=2155</guid>
		<description><![CDATA[ubuntu从9.10升级到10.04后不能开启特效。 nvidia-settings的面板里能看到显卡和具体配置，却无法开启特效。 提示的错误是:no device 完全卸载了驱动并重新安装了闭源驱动，并执行sudo nvidia-xconfig依旧如此无效。 估计是xorg.conf的原因，后来对比了几次nvidia-xconfig生成的xorg.conf，发现原来这个文件并没被重写，新生成的文件和之前的完全一样（新文件和备份文件没区别）。 想了下，之前nvidia-settings里的可以读取到xorg.conf的文件，而nvidia-xconfig就是将nvidia-settings里读取的配置直接保存为当前的xorg.conf。那么不管是升级还是什么情况造成xorg.conf出错，只要nvidia-settings可以读取文件，最后nvidia-xconfig都将错误的配置生成错误的xorg.conf。 索性删除xorg.conf文件，重新生成。 成功开启特效。 不知道这个算不算是nvidia-xconfig的bug。至少我觉得这个命令应该是直接重置复写吧，不然备份的意义何在。 也不知道这个方法算不算解决nvidia显卡在ubuntu等Linux下无法驱动的一个方法。 反正记录下，备查。]]></description>
			<content:encoded><![CDATA[<p>ubuntu从9.10升级到10.04后不能开启特效。<br />
nvidia-settings的面板里能看到显卡和具体配置，却无法开启特效。<br />
提示的错误是:no device<br />
完全卸载了驱动并重新安装了闭源驱动，并执行sudo nvidia-xconfig依旧如此无效。</p>
<p>估计是xorg.conf的原因，后来对比了几次nvidia-xconfig生成的xorg.conf，发现原来这个文件并没被重写，新生成的文件和之前的完全一样（新文件和备份文件没区别）。<br />
想了下，之前nvidia-settings里的可以读取到xorg.conf的文件，而nvidia-xconfig就是将nvidia-settings里读取的配置直接保存为当前的xorg.conf。那么不管是升级还是什么情况造成xorg.conf出错，只要nvidia-settings可以读取文件，最后nvidia-xconfig都将错误的配置生成错误的xorg.conf。</p>
<p>索性删除xorg.conf文件，重新生成。<br />
成功开启特效。</p>
<p>不知道这个算不算是nvidia-xconfig的bug。至少我觉得这个命令应该是直接重置复写吧，不然备份的意义何在。<br />
也不知道这个方法算不算解决nvidia显卡在ubuntu等Linux下无法驱动的一个方法。<br />
反正记录下，备查。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2010/05/05/nvidia-for-linux.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决mplayer中文字幕显示乱码与ibus不能输入中文</title>
		<link>http://5.yupana.net/2009/12/30/mplayer-ibus-lc_ctype.html</link>
		<comments>http://5.yupana.net/2009/12/30/mplayer-ibus-lc_ctype.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 17:41:49 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=2088</guid>
		<description><![CDATA[解决mplayer中文字幕乱码，解决ibus不能输入中文，LC_CTYPE具体的设置对mplayer和ibus的影响]]></description>
			<content:encoded><![CDATA[<h3>解决mplayer中文字幕显示乱码</h3>
<p>忘记啥时候开始，我的mplayer显示中文字幕是乱码，其实也不完全叫做乱码就是所有字幕只显示一根横线偶尔能显示正确的数字，而我的mplayer的配置文件很久都没改动过了，配置文件的内容也是这种网上能找到的：<br />
在mplayer得gui界面点击右键打开配置，字幕选项卡下设置Encoding为cp936；在字体选项卡下设置中文字体，并使用Encoding为Unicode。<br />
当上面的方法无效时，请输入</p>
<pre class="brush: bash; title: ; notranslate">locale</pre>
<p>查看下LC_CTYPE是否为zh_CN.*，如果不是请打开&#8221;/etc/environment&#8221;，修改或添加</p>
<pre class="brush: bash; title: ; notranslate">LC_CTYPE=&quot;zh_CN.UTF-8&quot;</pre>
<p>我也是在前段时间更换系统字体的时候，发现很多字体在全英文界面下表现很不错，这时我才反应过来，我使用的英文操作系统，虽然有中文语言包，但是locale的设置应该全是en_US.UTF-8，估计是LC_CTYPE的原因造成的，于是在/etc/environment里加了一段LC_CTYPE=&#8221;zh_CN.UTF-8&#8243;便解决中文字幕乱码（其实该说是横码）问题。</p>
<p>另外还有种解决方法：<br />
在字体选择处输入字体名字，而非直接选择字体文件。</p>
<h3>解决ibus不能输入中文</h3>
<p>同时得以解决的是ibus拼音输入法有时不能输入中文的问题。之前ibus拼音输入法动不动就会“失灵”，没法输入中文，状态条直接消失不见。<br />
我估计的原因是，ibus只是一个输入法框架，它会为各种语言输入提供一个基础，其中包括英文，所以LC_CTYPE为en_US.UTF-8的时候能启动ibus，但是在具体负责中文输入的还是ibus-pinyin这个模块，就是说最后中文输入法还是得和LC_CTYPE挂上勾，还是要设置为zh_CN.*。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2009/12/30/mplayer-ibus-lc_ctype.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>为gtk程序实现国际化和本地化</title>
		<link>http://5.yupana.net/2009/12/22/gtk-i18n-l10n.html</link>
		<comments>http://5.yupana.net/2009/12/22/gtk-i18n-l10n.html#comments</comments>
		<pubDate>Mon, 21 Dec 2009 16:32:00 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=1848</guid>
		<description><![CDATA[为gtk提供国际化(i18n)和本地化(l10n)支持]]></description>
			<content:encoded><![CDATA[<p>这是一个学习笔记，内容是在Linux系统下以一个简单的gtk程序为基础，为其添加对i18n和l10n的支持。从而了解怎么实现gtk程序的国际化和本地化。</p>
<h3>基本的概念</h3>
<ul>
<li>什么是i18n，i18n是internationalization的简称，指程序能提供不同语言显示的国际化支持。</li>
<li>什么是l10n，l10n是localization的简称，指程序的能拥有某一特定语言支持的本地化。</li>
</ul>
<p>更多的信息可以自行google或者参看一下这里 <a href="http://www.linuxforum.net/doc/i18n-new.html" target="_blank">http://www.linuxforum.net/doc/i18n-new.html</a></p>
<ul>
<li>基本原则：标记代码中用户在程序使用过程可见的字符串。</li>
<li>基本原理：整个过程是代码中使用 _()和N_()的方式来标记你需要翻译的字符串(即用户在使用过程可见的字符串)，提取并翻译这些字符串后，将其单独格式化，存放到语言文件夹。</li>
</ul>
<h3>国际化</h3>
<ol>
<li>首先寻找你要翻译的字符串</li>
<li>然后gettext()函数将需要翻译的字符串进行标记</li>
<li>进行编译</li>
</ol>
<h3>本地化</h3>
<ol>
<li>提取被比较的字符串</li>
<li>进行翻译</li>
<li>格式化</li>
<li>将文件存放到本地文件夹</li>
</ol>
<h3>国际化具体过程</h3>
<p>我们先来看看gtk程序的国际化。<br />
首先是在需要提供国际化的程序代码里增加一些我们将要用到的库和申明。</p>
<pre class="brush: cpp; title: ; notranslate">//要包含一个头文件。
#include    &lt;glib/gi18n.h&gt;    //versions 2.4及更高版本使用

//同时需要一些基本的申明。
#define  GETTEXT_PACKAGE    &quot;Hello_I18n&quot; // 可以换成你需要的名字
#define  LOCALEDIR    &quot;mo&quot;        //定义本地语言文件存放路径

//以及对gettext()进行初始化
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, &quot;UTF-8&quot;);
textdomain(GETTEXT_PACKAGE);
</pre>
<p>现在可以对我们代码中需要翻译的字符串进行标记了。<br />
例：<br />
原代码如下</p>
<pre class="brush: cpp; title: ; notranslate">gtk_window_set_title(GTK_WINDOW(window),  &quot;Hello I18n!&quot;);</pre>
<p>需要标记的字符串为“Hello I18n!”，上面的语句说明了在程序的标题栏里要显示的字符串为“Hello I18n!”，那么需要将上面的语句改为下面这样：</p>
<pre class="brush: cpp; title: ; notranslate">gtk_window_set_title(GTK_WINDOW(window),  _(&quot;Hello I18n!&quot;));</pre>
<p>但是如果我们要对静态字符串进行标记的话，就要使用另一种方式N_().<br />
例：</p>
<pre class="brush: cpp; title: ; notranslate">const char *warning = &quot;The alien is behind you! \n&quot;;</pre>
<p>我们需要将其改为：</p>
<pre class="brush: bash; title: ; notranslate">const char *warning = N_(&quot;The alien is behind you! \n&quot;);</pre>
<p>就这样我们完成了程序的国际化，你可以编译你的程序。</p>
<h3>本地化具体过程</h3>
<p>而做完国际化后，我们需要做的是本地化。<br />
在终端下面通过xgettext命令，我们可以将我们代码test.c中标记的字符串提取出来并保存在test.po里：</p>
<pre class="brush: bash; title: ; notranslate">xgettext -a -o test.po test.c</pre>
<p>我们打开test.po可以看见一些信息<br />
例如：</p>
<pre class="brush: plain; title: ; notranslate">msgid &quot;test.\n&quot;
msgstr &quot;&quot;</pre>
<p>那么我们本地化就是对这样的字符串根据不同的地区语言进行翻译，例如我们的中文：</p>
<pre class="brush: plain; title: ; notranslate">msgid &quot;test.\n&quot;
msgstr &quot;测试。\n&quot;</pre>
<p>并且修改</p>
<pre class="brush: plain; title: ; notranslate">charset=CHARSET\n</pre>
<p>为</p>
<pre class="brush: plain; title: ; notranslate">charset=utf-8\n</pre>
<p>然后保存。<br />
接下来格式化文件：</p>
<pre class="brush: bash; title: ; notranslate">msgfmt -o test.mo test.po</pre>
<p>然后将test.mo文件复制到LOCALEDIR下面对应的文件夹里。例如，我们在前面的例子里定义LOCALEDIR为mo。</p>
<pre class="brush: bash; title: ; notranslate">cp test.mo mo/zh_CN/LC_MESSAGES</pre>
<p>现在如果我们的LC_ALL为zh_CN，那么我们如果执行这个程序，就可以看见中文了。而不是原来的英文或者其他语言。</p>
<p>一个国际化以后的简单例子：</p>
<pre class="brush: cpp; title: ; notranslate">#include    &lt;gtk/gtk.h&gt;
#include    &lt;glib/gi18n.h&gt;

#define GETTEXT_PACKAGE    &quot;Test&quot;
#define LOCALEDIR    &quot;mo&quot;

int main ( int   argc,
 char *argv[] )
{
 GtkWidget *frame;
 GtkWidget *label;

 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
 bind_textdomain_codeset(GETTEXT_PACKAGE, &quot;UTF-8&quot;);
 textdomain(GETTEXT_PACKAGE);

 window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
 gtk_window_set_title(GTK_WINDOW(window),  _(&quot;Hello I18n!&quot;));
 gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
 g_signal_connect(G_OBJECT(window), &quot;destroy&quot;,
 G_CALLBACK(gtk_main_quit),
 NULL);
 gtk_container_set_border_width(GTK_CONTAINER(window), 10);
 frame = gtk_frame_new(_(&quot;WARNING&quot;));
 label = gtk_label_new(_(&quot;\n  The alien is behind you!\n&quot;));
 gtk_container_add(GTK_CONTAINER(frame), label);
 gtk_container_add(window, frame);
 gtk_widget_show_all(window);
}
</pre>
<p>清理电脑里的文件时发现的笔记，写了有些年头了，而现在，似乎大家都用python在写gtk的程序了。<br />
P.S 有时做一些贡献很简单，比如为自己喜欢的软件实现本地化。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2009/12/22/gtk-i18n-l10n.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>当update时遇见GPG error</title>
		<link>http://5.yupana.net/2009/08/01/gpg-error-and-update.html</link>
		<comments>http://5.yupana.net/2009/08/01/gpg-error-and-update.html#comments</comments>
		<pubDate>Fri, 31 Jul 2009 17:39:13 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=1686</guid>
		<description><![CDATA[apt-get update时，发生gpg error错误的解决方法]]></description>
			<content:encoded><![CDATA[<p>在执行apt-get update（aptitude update）更新的时候，有时会出现类似这样的错误：</p>
<pre class="brush: bash; title: ; notranslate">W: GPG error: http://ppa.launchpad.net testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 671D1AEFF1D58512
或者是
W: GPG error: http://ppa.launchpad.net testing Release: 由于没有公钥，下列签名无法进行验证： NO_PUBKEY 665F9AEFE1098513</pre>
<p>如果是只想解决问题，请直接执行如下2条命令：</p>
<pre class="brush: bash; title: ; notranslate">gpg --keyserver subkeys.pgp.net --recv-keys 671D1AEFF1D58512
gpg --armor --export 671D1AEFF1D58512 | apt-key add -</pre>
<p>说明：<br />
subkeys.pgp.net可以是keyserver.ubuntu.com或者www.keyserver.net等<br />
&#8211;recv-keys后面的参数呢，就是你的NO_PUBKEY后面的值</p>
<p>然后就可以继续执行apt-get update（aptitude update）更新了。</p>
<p>如果想知道上面的命令是什么意思，可以简单地这样来说明：</p>
<pre class="brush: bash; title: ; notranslate">
gpg --keyserver subkeys.pgp.net --recv-keys 671D1AEFF1D58512
#从subkeys.pgp.net获取671D1AEFF1D58512的密钥

gpg --armor --export 671D1AEFF1D58512 | apt-key add -
#将671D1AEFF1D58512的密钥保存并添加到本地的apt的信任数据库里</pre>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2009/08/01/gpg-error-and-update.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>解决ubuntu下u盘的无法自动挂载</title>
		<link>http://5.yupana.net/2009/07/08/ubuntu-mount-usb-driver.html</link>
		<comments>http://5.yupana.net/2009/07/08/ubuntu-mount-usb-driver.html#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:38:45 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=1543</guid>
		<description><![CDATA[教你如何让ubuntu如何自动挂载u盘，解决ubuntu下u盘的无法自动挂载。]]></description>
			<content:encoded><![CDATA[<p>突然系统不自动挂载我的u盘了。其实不是不自动挂载，而是不识别usb了。</p>
<p>这里记录下解决不自动挂载的方法:</p>
<pre class="brush: bash; title: ; notranslate">sudo rmmod ehci_hcd</pre>
<p>重新插入u盘就会，发现u盘已经自动挂载上了。</p>
<p>记录下，方便自己以后查找。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2009/07/08/ubuntu-mount-usb-driver.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash shell快捷键</title>
		<link>http://5.yupana.net/2008/03/10/bash-shell-cheat.html</link>
		<comments>http://5.yupana.net/2008/03/10/bash-shell-cheat.html#comments</comments>
		<pubDate>Sun, 09 Mar 2008 17:11:31 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=2358</guid>
		<description><![CDATA[Ctrl + a &#8211; 光标跳转到命令的开头（当命令敲完了，结果发现开头敲错了的时候用） Ctrl + e &#8211; 光标跳转到命令结尾 Ctrl + b &#8211; 光标往左移动一个字符 Ctrl + f &#8211; 光标往右移动一个字符 Ctrl + x + x &#8211; 光标移动到最后和当前位置两个地方跳转 Ctrl + d &#8211; 删除光标所在位置的字符 Ctrl + h &#8211; 删除光标所在位置之前的一个字符 Ctrl + k &#8211; 删除光标所在位置之后（右边）的所有字符 Ctrl + u &#8211; 删除光标所在位置之前（左边）的所有字符 （密码输入错误的时候比较有用） Ctrl + w &#8211; 删除最后输入的单词 Ctrl + [...]]]></description>
			<content:encoded><![CDATA[<p>Ctrl + a &#8211; 光标跳转到命令的开头（当命令敲完了，结果发现开头敲错了的时候用）<br />
Ctrl + e &#8211; 光标跳转到命令结尾<br />
Ctrl + b &#8211; 光标往左移动一个字符<br />
Ctrl + f &#8211; 光标往右移动一个字符<br />
Ctrl + x + x &#8211; 光标移动到最后和当前位置两个地方跳转<br />
Ctrl + d &#8211; 删除光标所在位置的字符<br />
Ctrl + h &#8211; 删除光标所在位置之前的一个字符<br />
Ctrl + k &#8211; 删除光标所在位置之后（右边）的所有字符<br />
Ctrl + u &#8211; 删除光标所在位置之前（左边）的所有字符 （密码输入错误的时候比较有用）<br />
Ctrl + w &#8211; 删除最后输入的单词<br />
Ctrl + c &#8211; 终止正在执行的命令<br />
Ctrl + z &#8211; 挂起/停止正在执行的命令<br />
Ctrl + l &#8211; 清屏，类似 clear 命令<br />
Ctrl + r &#8211; 查找之前执行过的命令<br />
Ctrl + y &#8211; 在当前光标处插入之前输入的命令 （有用）</p>
<p>&nbsp;</p>
<p>Alt + &lt; &#8211; 显示历史命令中的第一条 （咱中文用户就不用试了，和输入法切换冲突） Alt + &gt; &#8211; 显示历史命中中的最后一条<br />
Alt + ? &#8211; 显示命令不全的候选项<br />
Alt + * &#8211; 插入命令不全的所有候选项<br />
Alt + / &#8211; 补全文件（夹）名称<br />
Alt + . &#8211; 插入前一个命令的最后一个参数 （这个很好很强大）<br />
Alt + b &#8211; 光标往左移动一个单词<br />
Alt + f &#8211; 光标往右移动一个单词（诶，和显示菜单的快捷键冲突了）<br />
Alt + c &#8211; 将光标所在的字符变成大写<br />
Alt + d &#8211; 删除光标所在位置的单词<br />
Alt + l &#8211; 将单词中光标位置之后的字符变成大写<br />
Alt + u &#8211; 将单词中光标位置之后的字符变成大写<br />
Alt + t &#8211; 在单词中的字符间跳转（诶，和菜单的快捷键冲突了）<br />
Alt + y &#8211; 在当前光标处插入之前之前（两个之前，不是我敲错了）输入的命令（请和Ctrl + y比较）<br />
Alt + back-space &#8211; 删除光标所在位置之前（左边）的所有字符</p>
<p>&nbsp;</p>
<p>找的Bash Shell的快捷键，备份一下，不算是小技巧，但是随时看看，可以提高工作效率。</p>
<p>随时还可以再补充。</p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2008/03/10/bash-shell-cheat.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]ubuntu start-up/ubuntu启动</title>
		<link>http://5.yupana.net/2005/12/09/ubuntu-start-up.html</link>
		<comments>http://5.yupana.net/2005/12/09/ubuntu-start-up.html#comments</comments>
		<pubDate>Fri, 09 Dec 2005 21:56:32 +0000</pubDate>
		<dc:creator>JeRemY</dc:creator>
				<category><![CDATA[分享]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://5.yupana.net/?p=324</guid>
		<description><![CDATA[ubuntu start-up]]></description>
			<content:encoded><![CDATA[<p>ubuntu start-up<br />
ubuntu 启动 </p>
<p>(Intro)介绍<br />
This will describe and explain the start-up process of Ubuntu Linux.<br />
这里将描述和解释Ubuntu Linux的启动过程 </p>
<p>(rc2.d)<br />
Like Debian, Ubuntu boots up in runlevel 2. Because of that, we’ll find the details we want in /etc/rc2.d. Inside that directory, we find:<br />
就像Debian，Ubuntu默认开机运行等级为2。因此，我们将在/etc/rc2.d发现我们想要的详细资料。在那个目录，我们发现：<br />
>> sysklogd<br />
>> klogd<br />
>> ppp<br />
>> portmap<br />
>> acpid<br />
>> alsa<br />
>> apmd<br />
>> autofs<br />
>> cupsys<br />
>> dbus-1<br />
>> fam<br />
>> inetd<br />
>> makedev<br />
>> postfix<br />
>> powernowd<br />
>> rsync<br />
>> mdadm<br />
>> atd<br />
>> cron<br />
>> acpi-support<br />
>> fetchmail<br />
>> gdm<br />
>> rmnologin<br />
>> stop-bootlogd </p>
<p>(start-stop-daemon)<br />
An important utility to understand first is the Debian utility, start-stop-daemon. It’s a simple program that manages starting and stopping running daemons. Each program under /etc/rc2.d utilizes this program to manage their process.<br />
一个首先推定为Debian工具的重要工具，start-stop-daemon。这是一个管理程序的开始和暂停的简单程序。任何在/etc/rc2.d底下的程序利用此程序来管理他们的进程。 </p>
<p>(init-functions)<br />
All services run /lib/lsb/init-functions. This file contains helper functions for the start-stop-daemon program. It helps manage the pid files under /var/run and provides the text-output and logging when the status of a service changes.<br />
所有服务运行 /lib/lsb/init-functions。此文件包含start-stop-daemon程序的助手函数。它帮助管理在/var/run下的pid文件并且在服务状态发生改变的时候提供文本输出和生成日志。 </p>
<p>(sysklogd)<br />
Sysklogd is the system log daemon. As the description implies, it allows the system to log messages. Options may be specified in the SYSKLOGD variable. The daemon then starts and reads its configuration from /etc/syslog.conf. More information can be found here<br />
Sysklogd是系统日志程序。作为必需的描述：它允许系统记录讯息。各种选项在变量SYSKLOGD里被指定。接着后台程序开始运行并且从/etc/syslog.conf读入配置文件。此处可获得更多信息。 </p>
<p>(klogd)<br />
Klogd provides kernel logging. Klogd will obtain kernel messages from /proc/kmsg, but if /proc doesn’t exist, it will use the system call interface. All kernel messages are routed through syslog which then places them in the /var/log/kern.log file.<br />
Klogd提供核心日志。Klogd将从/proc/kmsg获得核心讯息，但是如果/proc不存在，它将系统调用呼叫接口，所有核心讯息通过接着代替他们的syslog发送到/var/log/kern.log文件。 </p>
<p>(ppp)<br />
This file checks if /etc/ppp/ppp_on_boot exists and if it does, connect to the users ISP.<br />
此文件检查/etc/ppp/ppp_on_boot文件是否存在，如果存在连接到用户ISP. </p>
<p>(portmap)<br />
Portmap converts RPC calls into standard DARPA (tcp/ip) port numbers. This file reads /etc/default/portmap which tells portmap to only run on the local loopback interface.<br />
Portmap 将RPC调用转换成标准DARPA(tcp/ip)端口号。此文件读入/etc/default/portmap告诉portmap仅仅在本地回送接口运行。 </p>
<p>(acpid)<br />
acpid is a power management daemon. It will sit and read /proc/acpi/event until it receives a whole line. Once then, it checks /etc/acpi/events for a qualifying action for that event. By default, Ubuntu loads the following acpi related modules: battery, ac, processor, button, fan, and thermal. More info can be found here<br />
acpid作为电力管理程序。它将占用并读入/proc/acpi/event文件直到它收到一整行。一旦（发生事件）然后，它作为有资格的动作为那事件检查/etc/acpi/events。默认的，Ubuntu导入以下和acpi有关的模块：battery, ac, processor, button, fan, 和thermal，此处可获得更多信息。 </p>
<p>(alsa)<br />
Alsa is the Advanced Linux Sound Architecture. It reads in some basic settings from /etc/default/alsa then loads up the stored alsa settings. More info can be found here<br />
Alsa 是高级Linux声音架构的意思。它从/etc/default/alsa读入一些基本设置然后装载被存储的alsa设置。此处可获得更多信息。 </p>
<p>(apmd)<br />
apmd is another power management daemon. This one really just cares about battery power, system standby, system suspend, and system resume. More info can be found here<br />
apmd是另外一个电力管理程序。这个守护程序真正关心电池电力、系统待机、系统挂起、和系统恢复。此处可获得更多信息。 </p>
<p>(autofs)<br />
autofs controls the automount daemon. autofs reads /etc/auto.master for various mount points of mounting drives.<br />
autofs控制自动挂载程序。autofs在/etc/auto.master读入各种挂载设备的挂载点。 </p>
<p>(cups)<br />
cups is the Common Unix Printing System. It provides and extremely easy system for configuring a printer under linux. More info can be found here<br />
cups是通用Unix打印系统。它为在linux下配置打印机提供非常简单的系统。此处可获得更多信息。 </p>
<p>(dbus-1)<br />
dbus is a system for providing Inter Process Communications between two applications. As freedesktop explains, examples of this include a camera being plugged in or file monitoring. More info can be found here<br />
dbus是一个提供双应用程序间的处理通信的系统。作为freedesktop解释，此例子包含一个插上电源的照相机或者文件监视器。此处可获得更多信息。 </p>
<p>(famd)<br />
famd is the File Alteration Monitor daemon. It provides a system that applications can use to detect when a file changes.<br />
famd是文件更改监视器程序。它提供一个当文件被改变的时候能够监测的系统。<br />
(inetd)<br />
inetd provides a list of services and ports they run on under /etc/inetd.conf. It then listens for requests for those ports, and once received, runs that service.<br />
inetd提供在/etc/inetd.conf下的服务列表以及相关端口。然后它监听请求端口，一旦收到，运行相关服务。 </p>
<p>(makedev)<br />
makedev simply re-creates a symlink from /sbin/MAKEDEV to /dev/MAKEDEV<br />
makedev 简单的从/sbin/MAKEDEV到/dev/MAKEDEV重建一个符号连接 </p>
<p>(postfix)<br />
Postfix is a Mail Transport Agent or MTA. This provides local system mail transportation, and if configured correctly, internet-wide mail transportation. More info can be found here<br />
Postfix是邮件传送代理或者简称MTA。它提供本地系统邮件传递，如果配置正确，能提供Internet范围的邮件传递。此处可获得更多信息。 </p>
<p>(powernowd)<br />
powernowd is a client for cpufreq which, as the name implies, controls the CPU frequency. By using this, you may raise the frequency of your cpu when your computer may need the extra power and lower it during idle time. This is especially useful for laptops when heat is concerned.<br />
powernowd 是一个cpufreq的客户端程序，cpufreq～顾名思义－能控制CPU频率。通过是用它，你可以提高你电脑的频率同时或许会需要额外电力，在停机的时候降低它。当与热有关时，这特别对便携电脑有用。 </p>
<p>(rsync)<br />
This would start the rsync daemon on your system but, by default, it is disabled.<br />
这将在你的系统上开始rsync程序，但是默认他是不起作用的。 </p>
<p>(mdadm)<br />
mdadm manages software RAID under linux. More info can be found here<br />
mdadm在linux下管理软件RAID。 此处可获得更多信息。 </p>
<p>(atd)<br />
atd is the at daemon and manages processes scheduled to run at later times.<br />
atd是在后台并且管理过程计划为了在晚些时候运行。 </p>
<p>(crond)<br />
crond is the cron daemon and manages processes that may be on a repetitive schedule.<br />
crond 是cron守护进程并且在重复的计划中管理过程。 </p>
<p>(acpi-support)<br />
This is just a helper script for the acpi daemon. Depending on what mode a laptop is in (battery or AC), it will set the systems power accordingly.<br />
这仅仅是acpi程序的助手脚本。依靠便携机运行在什么方式（电池或者交流电），从而调整系统电力。 </p>
<p>(fetchmail)<br />
fetchmail manages retrieving email. This script checks for /etc/fetcmailrc and if it doesnt exist (it doesnt by default), then it does not start. More info can be found here<br />
fetchmail管理找回的email。此脚本检验/etc/fetcmailrc文件并且当此文件不存在的时候（默认不存在此文件），它将不运行。此处可获得更多信息。<br />
(gdm)<br />
gdm is the GNOME Display Manager. It starts X Windows and provides a graphical login screen. More info can be found here<br />
gdm是GNOME显示管理器。它开始X Window并且提供一个图形化的登录屏幕。此处可获得更多信息。 </p>
<p>(rmnologin)<br />
This script removes the /etc/rmnologin file. rmnologin prevents non-root users from logging in.<br />
此脚本移除/etc/rmnologin文件。rmnologin防止非root用户登录系统。 </p>
<p>(stop-bootlogd)<br />
Just like the name implies, this stops the bootlogd daemon. bootlogd logs all strings sent to the console.<br />
顾名思义，它结束bootlogd后台程序。bootlogd记录所有发送到控制台的字串。 </p>
]]></content:encoded>
			<wfw:commentRss>http://5.yupana.net/2005/12/09/ubuntu-start-up.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

