2017-07-06 118 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中,'$'在'''裏面有意義,但不在''裏面,而'\'是相同的,所以'\'將是一個字符文字。 –