linux中history命令显示操作执行的时间配置
来源:互联网 发布:网络批发平台 编辑:程序博客网 时间:2024/05/22 08:26
操作系统:RHEL6.5vim /etc/bashrc最后面添加如下:#HISTSETHISTFILESIZE=2000 #保存命令的总数默认总数为1000HISTSIZE=2000 #设置了history命令输出最多的记录总数HISTTIMEFORMAT='%F %T' #时间显示格式export HISTTIMEFORMATsource /etc/bashrc[root@node1 ~]# history 473 2017-04-10 10:17:29cd /upload/plproxy-2.5 474 2017-04-10 10:17:29ll 475 2017-04-10 10:17:29yum list postgrews 476 2017-04-10 10:17:29yum list postgres 477 2017-04-10 10:17:29df -h 478 2017-04-10 10:17:29yum list 479 2017-04-10 10:17:29yum list postgres* 480 2017-04-10 10:17:29history 481 2017-04-10 10:17:29vim .bash_history 482 2017-04-10 10:17:29vim /etc/bashrc 483 2017-04-10 10:17:29history 484 2017-04-10 10:17:29source .bash_history 485 2017-04-10 10:17:37vim /etc/bashrc 486 2017-04-10 10:21:27history可以发现执行生效之前的所有命令显示时间为上次关机的时间另外千万不要错误的执行成了:source .bash_history 【将历史命令重新执行一遍!】
0 0
- linux中history命令显示操作执行的时间配置
- linux中history命令显示操作执行的时间配置
- [Linux]history 显示命令执行的时间
- linux的history命令显示操作用户、显示操作时间、命令
- history命令显示操作时间
- Linux 配置 history 命令显示操作时间、用户和登录 IP
- Linux下查看用户登陆后的操作记录及history命令显示时间
- Linux下查看用户登陆后的操作记录及history命令显示时间
- Linux下查看用户登陆后的操作记录及history命令显示时间
- linux 如何让linux的history命令显示时间记录
- Linux history配置时间戳、执行用户
- 让自己的history命令显示时间
- 让linux history命令显示命令的执行时间、在哪个机器执行的这个命令
- Linux history显示时间
- Linux执行History下的命令
- Linux执行History下的命令
- Linux执行History下的命令
- Linux下深度解析history命令来显示曾执行过的命令
- LevelSet小结
- 苹果审核被拒,返回. txt 的崩溃日志转换格式化
- 查看APK的签名的方法
- classic bluetooth chat 四
- mysql sql语句的执行过程
- linux中history命令显示操作执行的时间配置
- 手机UDP穿透问题
- 内存泄漏改善方针
- Maven入门指南(二)
- ubuntu启动tftp服务cannot open IPv6 socket, disable IPv6: Address family not supported by protocol
- 深度学习物体检测(五)——对象检测RCNN系列总结
- Java输入输出流
- zbus消息队列应用实例
- Ubuntu16.04登陆时“读取/root/.profile时发现错误”的解