天天看點

linux 指令

Linux系統中hash指令:

hash的參數:

-l #檢視hash表的内容


[root@centos6 ~]# hash -l
builtin hash -p /usr/bin/tail tail
builtin hash -p /bin/cat cat
builtin hash -p /bin/ls 

-d #删除一條hash記錄

[root@centos6 ~]# hash -l
builtin hash -p /usr/bin/tail tail
builtin hash -p /bin/cat cat
builtin hash -p /bin/ls 

[root@centos6 ~]# hash -d cat #删除cat記錄

[root@centos6 ~]# hash -l
builtin hash -p /usr/bin/tail tail
builtin hash -p /bin/ls ls

-r #清除hash表全部内容

[root@centos6 ~]# hash -l
builtin hash -p /usr/bin/tail tail
builtin hash -p /bin/ls ls

[ ~]# hash -r    #清除hash表中内容

[root@centos6 ~]# hash -l
hash: hash table empty      
上一篇: linux指令
下一篇: linux指令