ubuntu:如何清除$SHELL历史记录

ubuntu:如何清除$SHELL历史记录,shell,ubuntu,Shell,Ubuntu,我每次打开终端都会收到这个信息exprt'是我在安装过程中的打字错误。我试过了 No command 'exprt' found, did you mean: Command 'expr' from package 'coreutils' (main) exprt: command not found 但它仍然无法解决这个问题,尤其是当 # history -c # history -cw 它也会提示相同的错误 有解决办法吗?我是ubuntu的新手…这可能只是您的shell配置文件中的一个

我每次打开终端都会收到这个信息exprt'是我在安装过程中的打字错误。我试过了

No command 'exprt' found, did you mean:
 Command 'expr' from package 'coreutils' (main)
exprt: command not found
但它仍然无法解决这个问题,尤其是当

# history -c
# history -cw
它也会提示相同的错误


有解决办法吗?我是ubuntu的新手…

这可能只是您的shell配置文件中的一个输入错误吗

尝试运行以下命令来搜索.profile、.bash_profile、.bashrc等文件中的违规行:

# exec $SHELL

如果您发现输入错误,请编辑该行,使其显示“export”而不是“exprt”,如果应该是这样的话。

如果每次启动外壳(终端窗口)时都出现此错误,则它与历史记录功能无关,而是与某个外壳配置文件相关-请参阅@NicholasM的答案。
grep 'exprt' ~/.*