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

<channel>
	<title>天道酬勤 &#187; shell</title>
	<atom:link href="http://www.ochef.net/tag/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ochef.net</link>
	<description>RDBMS and My Life</description>
	<lastBuildDate>Mon, 19 Jul 2010 02:01:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=1309</generator>
		<item>
		<title>Unix、Linux下shell配置文件之间的区别</title>
		<link>http://www.ochef.net/2009/09/compare-unix-shell/</link>
		<comments>http://www.ochef.net/2009/09/compare-unix-shell/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 01:08:59 +0000</pubDate>
		<dc:creator>ochef</dc:creator>
				<category><![CDATA[(l)unix-script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.ochef.net/?p=604</guid>
		<description><![CDATA[随着在Unix和Linux平台下工作的时间越长，不同种类的shell繁多，感觉对shell的认识由清晰开始变得模糊，所以应该赶紧弄清楚它们，shell太重要了。以下内容来自互联网综合、整理后的。 .profile：是Bourne Shell (sh)的配置文件，Korn Shell (ksh)兼容sh所以也会使用.profile。 /etc/profile：此文件为系统的每个用户设置环境信息,当用户第一次登录时该文件被执行，并从/etc/profile.d目录的配置文件中搜集shell的设置。 .bash_ profile：是bash特有的, 由于bash被设计成兼容sh、ksh并有csh的特征, 所以会在用户主目录依次查找.bash_profile， .bash_login，.profile并用找到的第一个作为自己的配置文件。 ~/.bash_profile：每个用户都可使用该文件输入专用于自己使用的shell信息。当用户登录时，该文件仅仅执行一次。默认情况下，它设置一些环境变量，执行用户的.bashrc文件。 .login 是C Shell (csh) 的配置文件。 在Linux下sh是bash的一个链接, 如果bash使用sh命令启动的, 就会以sh兼容方式运行使用.profile，可用man bash命令查看更详细的解释。 /etc/bashrc：为每一个运行bash shell的用户执行此文件，当bash shell被打开时，该文件被读取。 ~/.bashrc：该文件包含专用于你的bash shell的bash信息，当登录时以及每次打开新的shell时，该该文件被读取。 ~/.bash_logout：当每次退出系统(退出bash shell)时，执行该文件。另外，/etc/profile中设定的变量(全局)的可以作用于任何用户，而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量，它们是&#8221;父子&#8221;关系。 ~/.bash_profile：是交互式、login 方式进入 bash 运行的；~/.bashrc 是交互式 non-login 方式进入 bash 运行的。通常二者设置大致相同，所以通常前者会调用后者。 -The End-]]></description>
			<content:encoded><![CDATA[<p>随着在Unix和Linux平台下工作的时间越长，不同种类的shell繁多，感觉对shell的认识由清晰开始变得模糊，所以应该赶紧弄清楚它们，shell太重要了。以下内容来自互联网综合、整理后的。</p>
<p><span style="color: #ff0000;">.profile：</span>是Bourne Shell (sh)的配置文件，Korn Shell (ksh)兼容sh所以也会使用.profile。</p>
<p><span style="color: #ff0000;">/etc/profile：</span>此文件为系统的每个用户设置环境信息,当用户第一次登录时该文件被执行，并从/etc/profile.d目录的配置文件中搜集shell的设置。</p>
<p><span style="color: #ff0000;">.bash_ profile：</span>是bash特有的, 由于bash被设计成兼容sh、ksh并有csh的特征, 所以会在用户主目录依次查找.bash_profile， .bash_login，.profile并用找到的第一个作为自己的配置文件。</p>
<p><span style="color: #ff0000;">~/.bash_profile：</span>每个用户都可使用该文件输入专用于自己使用的shell信息。当用户登录时，该文件仅仅执行一次。默认情况下，它设置一些环境变量，执行用户的.bashrc文件。</p>
<p><span style="color: #ff0000;">.login </span>是C Shell (csh) 的配置文件。</p>
<p>在Linux下sh是bash的一个链接, 如果bash使用sh命令启动的, 就会以sh兼容方式运行使用.profile，可用man bash命令查看更详细的解释。</p>
<p><span style="color: #ff0000;">/etc/bashrc：</span>为每一个运行bash shell的用户执行此文件，当bash shell被打开时，该文件被读取。</p>
<p><span style="color: #ff0000;">~/.bashrc：</span>该文件包含专用于你的bash shell的bash信息，当登录时以及每次打开新的shell时，该该文件被读取。</p>
<p><span style="color: #ff0000;">~/.bash_logout：</span>当每次退出系统(退出bash shell)时，执行该文件。另外，/etc/profile中设定的变量(全局)的可以作用于任何用户，而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量，它们是&#8221;父子&#8221;关系。</p>
<p>~/.bash_profile：是交互式、login 方式进入 bash 运行的；~/.bashrc 是交互式 non-login 方式进入 bash 运行的。通常二者设置大致相同，所以通常前者会调用后者。</p>
<p>-The End-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ochef.net/2009/09/compare-unix-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
