<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[hash命令：显示、添加或清除哈希表 make make install make distclean hash -r]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Sat, 08 Jul 2017 15:42:25 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	说明：linux系统下会有一个hash表，当你刚开机时这个hash表为空，每当你执行过一条命令时，hash表会记录下这条命令的路径，就相当于缓存一样。第一次执行命令shell解释器默认的会从PATH路径下寻找该命令的路径，当你第二次使用该命令时，shell解释器首先会查看hash表，没有该命令才会去PATH路径下寻找。<br/><br/>hash表的作用：大大提高命令的调用速率。 <br/><br/>hash的参数：<br/>[root@redhat ~]# hash　　//输入hash或hash -l 可以查看hash表的内容，我刚开机所以为空<br/>hash: hash table empty<br/>[root@redhat ~]# hash -l<br/>hash: hash table empty<br/><br/>当我执行过2条命令后再看：<br/><br/>[root@redhat ~]# hash　　//hash表会记录下执行该命令的次数，以及命令的绝对路径<br/>hits command<br/>&nbsp;&nbsp; 1 /bin/cat<br/>&nbsp;&nbsp; 1 /bin/ls<br/>[root@redhat ~]# hash -l　　//加参数-l既可以看到hash表命令的路径，也可以看到它的名字，说不定会有别名哦<br/>builtin hash -p /bin/cat cat<br/>builtin hash -p /bin/ls ls<br/><br/>[root@redhat ~]# hash -p /bin/ls bb　　//添加hash表，可以看到我把ls命令重新写了一遍，改名为bb<br/><br/>[root@redhat ~]# bb　　　　//当我执行bb时就是执行ls命令<br/>anaconda-ks.cfg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;icmp_echo_ignore_aly~&nbsp;&nbsp;pub.key<br/>dead.letter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;icmp_echo_ignore_alz~&nbsp;&nbsp;rpmbuild<br/>icmp_echo_ignore_all~&nbsp;&nbsp;install.log&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RPM-GPG-KEY-useradd<br/>icmp_echo_ignore_alw~&nbsp;&nbsp;install.log.syslog&nbsp;&nbsp;&nbsp;&nbsp; RPM-GPG-KEY-westos<br/>icmp_echo_ignore_alx~&nbsp;&nbsp;passwd<br/><br/><br/>[root@redhat ~]# hash -t ls　　//-t参数可以查看hash表中命令的路径，要是hash表中没有怎么办？<br/>/bin/ls<br/><br/>[root@redhat ~]# hash -t df　　//我没使用过df，执行hash，就会提示找不到该命令<br/>-bash: hash: df: not found<br/><br/>[root@redhat ~]# hash -r　　//清楚hash表，清楚的是全部的<br/>[root@redhat ~]# hash -l<br/>hash: hash table empty<br/><br/>[root@redhat ~]# hash -l<br/>builtin hash -p /bin/cat cat<br/>builtin hash -p /bin/ls ls<br/>[root@redhat ~]# hash -d cat 　　//清楚其中的某一条<br/>[root@redhat ~]# hash -l<br/>builtin hash -p /bin/ls ls<br/><br/>From:http://www.cnblogs.com/linux-super-meng/p/3788739.html
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] hash命令：显示、添加或清除哈希表 make make install make distclean hash -r]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>