Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash 已删除的功能仍然可用_Bash_Shell_Centos - Fatal编程技术网

Bash 已删除的功能仍然可用

Bash 已删除的功能仍然可用,bash,shell,centos,Bash,Shell,Centos,我创建了一个名为tardir的函数来压缩特定的目录,并将其添加到CentOS box上的.bash_配置文件中 从那时起,我创建了一堆其他脚本,并没有将它们添加到我的.bash_配置文件中,而是创建了一个脚本文件夹,并将路径添加到我的.bash_配置文件中的$path导出 然后,我从.bash_配置文件中删除了tardir函数,并将其转换为shell脚本。我运行source.bash_profile来刷新它,但我注意到命令tardir仍然有效 我已经对shell脚本进行了更改,但是函数tardi

我创建了一个名为tardir的函数来压缩特定的目录,并将其添加到CentOS box上的.bash_配置文件中

从那时起,我创建了一堆其他脚本,并没有将它们添加到我的.bash_配置文件中,而是创建了一个脚本文件夹,并将路径添加到我的.bash_配置文件中的$path导出

然后,我从.bash_配置文件中删除了tardir函数,并将其转换为shell脚本。我运行source.bash_profile来刷新它,但我注意到命令tardir仍然有效

我已经对shell脚本进行了更改,但是函数tardir仍在运行旧代码,我找不到它

当我键入tardir'tab'tab'时,我得到两个结果,tardir和tardir.sh


塔迪尔从哪里来?是否可以运行flush cache命令来完全删除旧的tardir函数调用

它是在当前进程外壳环境中定义的

typeset -f tardir
要删除它,请启动一个新的bash实例,否则可以在当前进程中删除一个函数:

unset tardir

sourcing.bash\u profile仅在当前shell环境中运行.bash\u profile中的命令,但不重置环境。

我只需要关闭shell并启动一个新的shell。我验证了其他人没有看到旧代码,所以我想这次问题是在键盘和椅子之间。这个问题可以关闭