<?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>PKILL.info &#187; bash</title>
	<atom:link href="http://pkill.info/b/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://pkill.info/b</link>
	<description>Tutorials and tips</description>
	<lastBuildDate>Wed, 08 Sep 2010 06:08:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Finding out Linux Network Configuration Information</title>
		<link>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/</link>
		<comments>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:01:09 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2350</guid>
		<description><![CDATA[There various network configuration information in Linux and lots tools can be used to find out those configuration information. Finding out these network information in Fedora Linux as the example will be introduced. IP address, MAC address and netmask ifconfig will print out all the network interfaces and their information including the IP address and [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2218/configuration-of-linux-kernel-video-mode/' rel='bookmark' title='Permanent Link: Configuration of Linux Kernel Video Mode'>Configuration of Linux Kernel Video Mode</a></li>
<li><a href='http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/' rel='bookmark' title='Permanent Link: Sending Email from mailx Command in Linux Using Gmail’s Smtp'>Sending Email from mailx Command in Linux Using Gmail’s Smtp</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>There various network configuration information in Linux and lots tools can be used to find out those configuration information. Finding out these network information in Fedora Linux as the example will be introduced.</p>
<h3>IP address, MAC address and netmask</h3>
<p><em>ifconfig</em> will print out all the network interfaces and their information including the IP address and netmask.</p>
<pre>$ ifconfig</pre>
<p>A typical output is like this:</p>
<pre>eth0      Link encap:Ethernet  HWaddr 00:26:22:A1:25:0F
inet addr:143.89.135.175  Bcast:143.89.135.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:305973 errors:0 dropped:0 overruns:0 frame:0
TX packets:337971 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:196287324 (187.1 MiB)  TX bytes:134890044 (128.6 MiB)
Interrupt:30

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:274 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37244 (36.3 KiB)  TX bytes:37244 (36.3 KiB)</pre>
<p><em>eth0 </em>is the network interface. <em>lo</em> is the loopback device.</p>
<p>The IP address is shown in <em>inet addr</em> field.</p>
<h3>DNS server, hosts file and DNS look up order</h3>
<p>The DNS server for Linux to contact is stored in <em>/etc/resolve.conf</em>. The DNS server(s) can be listed by:</p>
<pre>$ cat /etc/resolve.conf</pre>
<p>A line like this specifies the DNS server:</p>
<pre>nameserver 8.8.8.8</pre>
<p>The <em>hosts</em> file for Linux is stored in <em>/etc/hosts. </em>The first two lines (127.0.0.1 and ::1) which map the <em>localhost</em> name shouldn&#8217;t be changed since <em>localhost</em> is used for interprocess communication.</p>
<pre>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.1.8   mysite.mydomain mysite</pre>
<p>The order of DNS look up is defined in <em>/etc/nsswitch.conf</em>. Whether the hosts file should be looked up first can be defined. The line in <em>/etc/nsswitch.conf</em> for DNS look up order is:</p>
<pre>hosts:          dns [!UNAVAIL=return] files</pre>
<h3>Gateway</h3>
<p>The gateway can be find out by looking at the rules in route table:</p>
<pre>$ ip route show</pre>
<p>A line like this defines the gateway:</p>
<pre>default via 143.89.135.254 dev eth0  proto static</pre>
<h3>Host name</h3>
<p>The host name is specified in <em>/etc/sysconfig/network.</em> The HOSTNAME variable is for the machine&#8217;s host name:</p>
<pre>HOSTNAME=localhost.localdomain</pre>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2218/configuration-of-linux-kernel-video-mode/' rel='bookmark' title='Permanent Link: Configuration of Linux Kernel Video Mode'>Configuration of Linux Kernel Video Mode</a></li>
<li><a href='http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/' rel='bookmark' title='Permanent Link: Sending Email from mailx Command in Linux Using Gmail’s Smtp'>Sending Email from mailx Command in Linux Using Gmail’s Smtp</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending Email from mailx Command in Linux Using Gmail’s Smtp</title>
		<link>http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/</link>
		<comments>http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:24:46 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/?p=1411</guid>
		<description><![CDATA[mailx or mail command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail&#8217;s smtp in mailx/mail? gmail is a little special since gmail&#8217;s smtp server requires tls authorization. The good news is that mailx supports it. [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/125/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/' rel='bookmark' title='Permanent Link: Configure mailx to Use Gmail’s smtp'>Configure mailx to Use Gmail’s smtp</a></li>
<li><a href='http://pkill.info/b/1896/starting-kde-from-command-line-by-startx/' rel='bookmark' title='Permanent Link: Starting KDE from Command Line by startx'>Starting KDE from Command Line by startx</a></li>
<li><a href='http://pkill.info/b/2350/finding-out-linux-network-configuration-information/' rel='bookmark' title='Permanent Link: Finding out Linux Network Configuration Information'>Finding out Linux Network Configuration Information</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>mailx or mail command in Linux is still providing service for guys like me, especially when we need to send email automatically by script. gmail is great. Now, how to use gmail&#8217;s smtp in mailx/mail? gmail is a little special since gmail&#8217;s smtp server requires tls authorization. The good news is that mailx supports it. Let&#8217;s look at how to use it.</p>
<p>First, find out Fixforx&#8217;s profile directory in the home directory (I believe most of the users on Linux use Firefox. If you are not using Firefox, what you need to do is try it ;) . It has a format like this:</p>
<pre>~/.mozilla/firefox/xxxxxxxx.default</pre>
<p>xxxxxxxx is a random string that&#8217;s different for different users. You can easily find it out by looking into the directory <em>~/.mozilla/firefox</em>.</p>
<p>There are two ways to do this: using all-in-one command or putting configurations into profile. The all-in-one-command way needs no other configurations except the command line itself, while the way using configuration has a clearer command.</p>
<h3>All-in-one command</h3>
<p>This is an all-in-one command that sends email to $TO_EMAIL_ADDRESS</p>
<pre class="prettyprint">mailx -v -s "$EMAIL_SUBJECT" \
-S smtp-use-starttls \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp=smtp://smtp.gmail.com:587 \
-S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)" \
-S smtp-auth-user=$FROM_EMAIL_ADDRESS \
-S smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD \
-S ssl-verify=ignore \
-S nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default/ \
$TO_EMAIL_ADDRESS</pre>
<p>Replace the $XXX with the value that is actually used. The meaning is obvious. And remember to change xxxxxxxx to the string that&#8217;s part of the Firefox profile directory.</p>
<p>This command will ask for the email content. Type in the mail content and after finishing the email, use &#8220;Ctrl+d&#8221; to tell mailx you have finished. Then this mail will be sent out through gmail&#8217;s smtp server. You can also use pipe like this:</p>
<pre>echo "The mail content" | mail -v -s ...</pre>
<h3>Using configuration file</h3>
<p>There are too many options in the above command? Yes&#8230; I must confess so. We can write most of them into mailx/mail&#8217;s configuration file <em>~/.mailrc</em></p>
<pre class="prettyprint">set smtp-use-starttls
set nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default/
set ssl-verify=ignore
set smtp=smtp://smtp.gmail.com:587
set smtp-auth=login
set smtp-auth-user=$FROM_EMAIL_ADDRESS
set smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD
set from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)"</pre>
<p>Change the $XXX and xxxxxxx to the right value for you. When sending mails, use this command:</p>
<pre>mailx -v -s "$EMAIL_SUBJECT" $TO_EMAIL_ADDRESS</pre>
<p>Then, time to enjoy it!</p>
<p><span style="font-size: x-small;"><strong>Updated history</strong><br />
Mar. 11 2010<br />
Apr. 29 2010. Add title.<br />
Jul. 12, 2010. Revise the article.<br />
Jul. 26, 2010. Add highlight colour to pre tags.</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/125/%e9%85%8d%e7%bd%aemailx%e4%bd%bf%e7%94%a8gmail%e7%9a%84smtp/' rel='bookmark' title='Permanent Link: Configure mailx to Use Gmail’s smtp'>Configure mailx to Use Gmail’s smtp</a></li>
<li><a href='http://pkill.info/b/1896/starting-kde-from-command-line-by-startx/' rel='bookmark' title='Permanent Link: Starting KDE from Command Line by startx'>Starting KDE from Command Line by startx</a></li>
<li><a href='http://pkill.info/b/2350/finding-out-linux-network-configuration-information/' rel='bookmark' title='Permanent Link: Finding out Linux Network Configuration Information'>Finding out Linux Network Configuration Information</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>A good bash tutorial: Advanced Bash-Scripting Guide</title>
		<link>http://pkill.info/b/434/a-good-bash-tutorial-advanced-bash-scripting-guide/</link>
		<comments>http://pkill.info/b/434/a-good-bash-tutorial-advanced-bash-scripting-guide/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 10:43:26 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/a-good-bash-tutorial-advanced-bash-scripting-guide/</guid>
		<description><![CDATA[Advanced Bash-Scripting Guide &#8211; An in-depth exploration of the art of shell scripting by Mendel Cooper Link here: http://www.tldp.org/LDP/abs/html/index.html Read more:shell 中 ls 颜色设定 Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12 Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/129/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/' rel='bookmark' title='Permanent Link: shell 中 ls 颜色设定'>shell 中 ls 颜色设定</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Advanced Bash-Scripting Guide &#8211; An in-depth exploration of the art of shell scripting<br />
by Mendel Cooper</p>
<p>Link here: <a href="http://www.tldp.org/LDP/abs/html/index.html">http://www.tldp.org/LDP/abs/html/index.html</a></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/129/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/' rel='bookmark' title='Permanent Link: shell 中 ls 颜色设定'>shell 中 ls 颜色设定</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12'>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/434/a-good-bash-tutorial-advanced-bash-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>我的.bashrc .alias .lftp .fonts.conf配置文件</title>
		<link>http://pkill.info/b/139/%e6%88%91%e7%9a%84bashrc-alias-lftp-fontsconf%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/</link>
		<comments>http://pkill.info/b/139/%e6%88%91%e7%9a%84bashrc-alias-lftp-fontsconf%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/#comments</comments>
		<pubDate>Wed, 13 May 2009 06:17:00 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[lftp]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/%e6%88%91%e7%9a%84bashrc-alias-lftp-fontsconf%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/</guid>
		<description><![CDATA[~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions . ~/.alias # export GTK_IM_MODULE=ibus ################################## ~/.alias alias rm=&#8217;rm -i&#8217; alias l=&#8217;ll -h&#8217; ################################## ~/.lftprc set ftp:charset GBK set file:charset UTF-8 #set net:connection-limit 30 set net:reconnect-interval-base 12 set net:reconnect-interval-multiplier 1 ################################## .fonts.conf Fedora-中文字体设置 [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/691/lftp-disable-ssl/' rel='bookmark' title='Permanent Link: lftp disable ssl'>lftp disable ssl</a></li>
<li><a href='http://pkill.info/b/55/lftp-gftp-%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81-%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/' rel='bookmark' title='Permanent Link: lftp gftp 中文乱码 解决办法'>lftp gftp 中文乱码 解决办法</a></li>
<li><a href='http://pkill.info/b/59/vsftpconf/' rel='bookmark' title='Permanent Link: vsftp.conf'>vsftp.conf</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>~/.bashrc</p>
<p># .bashrc</p>
<p># Source global definitions<br />
if [ -f /etc/bashrc ]; then<br />
. /etc/bashrc<br />
fi</p>
<p># User specific aliases and functions<br />
. ~/.alias</p>
<p># export GTK_IM_MODULE=ibus</p>
<p>##################################<br />
~/.alias<br />
alias rm=&#8217;rm -i&#8217;<br />
alias l=&#8217;ll -h&#8217;</p>
<p>##################################<br />
~/.lftprc</p>
<p>set ftp:charset GBK<br />
set file:charset UTF-8<br />
#set net:connection-limit 30<br />
set net:reconnect-interval-base 12<br />
set net:reconnect-interval-multiplier 1</p>
<p>##################################<br />
.fonts.conf</p>
<p><a href="/Fedora-中文字体设置/">Fedora-中文字体设置</a></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/691/lftp-disable-ssl/' rel='bookmark' title='Permanent Link: lftp disable ssl'>lftp disable ssl</a></li>
<li><a href='http://pkill.info/b/55/lftp-gftp-%e4%b8%ad%e6%96%87%e4%b9%b1%e7%a0%81-%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95/' rel='bookmark' title='Permanent Link: lftp gftp 中文乱码 解决办法'>lftp gftp 中文乱码 解决办法</a></li>
<li><a href='http://pkill.info/b/59/vsftpconf/' rel='bookmark' title='Permanent Link: vsftp.conf'>vsftp.conf</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/139/%e6%88%91%e7%9a%84bashrc-alias-lftp-fontsconf%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell 中 ls 颜色设定</title>
		<link>http://pkill.info/b/129/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/</link>
		<comments>http://pkill.info/b/129/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 15:04:00 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/</guid>
		<description><![CDATA[bash中，ls后的颜色在黑色背景下有些不是很清楚，例如文件夹是蓝色的，在黑色背景下不好认。设置一下自己的~/.dir_colors可以解决： 复制一份系统的到自己的目录：cp /etc/DIR_COLORS ~/.dir_colors 修改 .dir_colors 示例&#8230;# Below are the color init strings for the basic file types. A color init# string consists of one or more of the following numeric codes:# Attribute codes:# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed# Text color codes:# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white# Background color codes:# 40=black [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/1508/tweeting-from-shell-using-twitter-api/' rel='bookmark' title='Permanent Link: Tweeting from Shell using Twitter API'>Tweeting from Shell using Twitter API</a></li>
<li><a href='http://pkill.info/b/733/start-a-job-and-return-to-the-shell-run-a-backgroud-job/' rel='bookmark' title='Permanent Link: Start a job and return to the shell : run a backgroud job'>Start a job and return to the shell : run a backgroud job</a></li>
<li><a href='http://pkill.info/b/2346/yum-installing-old-packages-from-the-repository/' rel='bookmark' title='Permanent Link: Yum Installing Old Packages from the Repository'>Yum Installing Old Packages from the Repository</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>bash中，ls后的颜色在黑色背景下有些不是很清楚，例如文件夹是蓝色的，在黑色背景下不好认。<br />设置一下自己的~/.dir_colors可以解决：</p>
<p>复制一份系统的到自己的目录：<br />cp /etc/DIR_COLORS ~/.dir_colors</p>
<p>修改 .dir_colors</p>
<p>示例<br />&#8230;<br /># Below are the color init strings for the basic file types. A color init<br /># string consists of one or more of the following numeric codes:<br /># Attribute codes:<br /># 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed<br /># Text color codes:<br /># 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white<br /># Background color codes:<br /># 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white<br />NORMAL 00 # global default, although everything should be something.<br />FILE 00   # normal file<br />DIR 01;34;47  # directory<br />&#8230;</p>
<p>DIR 01;34;47  # directory<br />表示文件夹字体为粗体白底蓝色。这样看起来好多了。</p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/1508/tweeting-from-shell-using-twitter-api/' rel='bookmark' title='Permanent Link: Tweeting from Shell using Twitter API'>Tweeting from Shell using Twitter API</a></li>
<li><a href='http://pkill.info/b/733/start-a-job-and-return-to-the-shell-run-a-backgroud-job/' rel='bookmark' title='Permanent Link: Start a job and return to the shell : run a backgroud job'>Start a job and return to the shell : run a backgroud job</a></li>
<li><a href='http://pkill.info/b/2346/yum-installing-old-packages-from-the-repository/' rel='bookmark' title='Permanent Link: Yum Installing Old Packages from the Repository'>Yum Installing Old Packages from the Repository</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/129/shell-%e4%b8%ad-ls-%e9%a2%9c%e8%89%b2%e8%ae%be%e5%ae%9a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
