瘋狂帽客's Blog
You are already naked. There is no reason not to follow your heart. ~ Steve Jobs ~
Friday, April 10, 2009
不紀錄開頭為space的指令於history中
直接來看如何實作吧!
舉個常會碰到的例子, 如果在console下需輸入敏感的資料時, 不要讓它記錄到history中:
#HISTCONTROL=ignorespace
# echo "redhat" | passwd --stdin lawrence (注意開頭必需為空白)
#history
如此一來echo "redhat" | passwd --stdin lawrence 就不會記錄到history中.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment