文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>[fw] Adding Date And Time To Your Bash History

[fw] Adding Date And Time To Your Bash History

时间:2009-05-09  来源:s_x_g

Adding Date And Time To Your Bash History
http://www.howtoforge.com/adding-date-and-time-to-your-bash-history
This is a quick but handy addon (RedHat/CentOS) to enhance your bash history (bash > 3.0).It comes in handy particularly if there are multiple people maintaining a given server (so you can see when a command was performed) or even if you are the sole maintainer, but can't remember exactly when you did or changed something.
  Edit your /etc/bashrc and append to the bottom:
export HISTTIMEFORMAT="%h/%d - %H:%M:%S"
  From next login instead of: 574  tail -f /var/log/maillog
575  mailq | tail -15
576  tail -f /var/log/maillog
577  less /var/log/maillog
  you get: 1002  Apr/30 - 11:46:16 grep duncan /var/log/maillog
1003  Apr/30 - 14:17:40 passwd jduncan
1004  Apr/30 - 14:18:02 smbpasswd jduncan
1005  Apr/30 - 14:50:28 history 10
  Hope this helps someone;)
相关阅读 更多 +
排行榜 更多 +
味子夫

味子夫

购物比价 下载
恩猫

恩猫

购物比价 下载
街头纷争

街头纷争

动作格斗 下载