2017-07-06 122 views

回答

2

您需要确定引用特殊字符。 !匹配模式!<event ID>其中<event ID>是在您的history东西。

这里是我的历史:

[[email protected] files]$ history 
1 tail /var/log/httpd/error_log 
2 ./tools/runcmd deploy latest 
3 ./tools/runcmd deploy fntsy.2625 
4 ./tools/runcmd deploy fntsy-2625 

所以,当我键入!1我得到:

[[email protected] files]$ tail /var/log/httpd/error_log 
<!-- tail information here --> 

在你的情况下,在命令行中无法找到ID为@#的事件,因为没有在你的历史比赛中。

尝试引用您的密码:-p'<your pass>'或只是完全省略您的密码(请拨mysql -u <your-name> -p,它会提示您输入您的密码)。

+0

还有一件事:美元符号在某些终端是特殊的。我们有这样的系统密码需要通过脚本输入。即使引用'-p'$ Texas''也不起作用。必须像这样输入:'-p'\ $ Texas'' –

+0

这取决于shell。在bash中,'$'在'''里面有意义,但不在''里面,而'\'是相同的,所以'\'将是一个字符文字。 –