linux下设置history显示时间
来源:互联网 发布:网页编程常用软件 编辑:程序博客网 时间:2024/06/03 01:36
vi /etc/bashrc 添加以下信息:
# 设置保存历史命令的文件大小export HISTFILESIZE=10000000# 保存历史命令条数export HISTSIZE=1000000# 实时记录历史命令,默认只有在用户退出之后才会统一记录,很容易造成多个用户间的相互覆盖。export PROMPT_COMMAND="history -a"# 记录每条历史命令的执行时间export HISTTIMEFORMAT="%Y-%m-%d_%H:%M:%S "
备:%Y:4位数的年份;%m:2位数的月份数;%d:2位数的一个月中的日期数;%H:2位数的小时数(24小时制);%M:2位数的分钟数;%S:2位数的秒数
使更改立即生效:
# source /etc/bashrc
查看历史记录:
history
- linux下设置history显示时间
- Linux history显示时间
- linux 让history显示时间
- Linux history显示时间戳
- Linux系统设置 history 相关系统变量(包括显示时间、history条数)
- [Linux]history 显示命令执行的时间
- Linux history时间用户ip设置
- Linux history时间用户ip设置
- Linux下查看用户登陆后的操作记录及history命令显示时间
- Linux下查看用户登陆后的操作记录及history命令显示时间
- Linux下查看用户登陆后的操作记录及history命令显示时间
- 设置linux系统history相关变量,命令时间、保存history条数,多session共享history
- history 显示时间戳
- history显示时间格式
- history 显示时间
- CentOS - history 显示时间
- 让history显示时间
- linux 如何让linux的history命令显示时间记录
- 第十一次上机实验
- linux cat命令
- PostgreSQL copy
- 小火箭回到顶部
- 如何用Java实现获得MySQL数据库中所有表的记录总数
- linux下设置history显示时间
- 基于nginx的tomcat负载均衡和集群
- 公司框架使用总结
- [osg]OSG的分格化
- 蛋疼的考试
- 第十一次上机任务
- 【在床上使用笔记本容易降低电脑寿命和引起故障】
- 感想随笔
- 使ubuntu正常显示GB2312、GBK编码文件