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