IT Logs 落個史
2017-06-05
Linux bash history add timestamp
1.
vim ~/.bashrc
在最下方加入
HISTTIMEFORMAT='%F %T '
-
%F – expands to full date same, as %Y-%m-%d (year-month-date).
-
%T – expands to time; same as %H:%M:%S (hour:minute:seconds).
2.
source ~/.bashrc
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment