手机
当前位置:查字典教程网 >操作系统 >unix linux >linux下查询history操作时间的方法
linux下查询history操作时间的方法
摘要:要在linux操作系统中查看history记录的操作时间,可以按如下步骤实现:1,修改/etc/profile文件,在末尾添加:export...

要在linux操作系统中查看history记录的操作时间,可以按如下步骤实现:

1,修改/etc/profile文件,在末尾添加:export histtimeformat=”%f %t `whoami` ”

2,或在用户目录下,修改文件 .bash_profile,添加export histtimeformat=”%f %t `whoami` ”

退出终端,重新登录。

例,查看history操作时间:

[root@jb51 ~]$ history | tail

989 2013-06-24 19:06:04 admin vi .bash_profile

990 2013-06-24 22:06:03 admin ll

991 2013-06-24 22:06:09 admin vi .bash_profile

992 2013-06-24 22:06:18 admin ll -ag

993 2013-06-24 22:06:55 admin history | tail

994 2013-06-24 22:07:11 admin vi .bash_profile

995 2013-06-24 22:07:24 admin history | tail

996 2013-06-24 22:07:32 admin eixt

997 2013-06-24 22:07:35 admin exit

998 2013-06-24 22:07:41 admin history | tail

【linux下查询history操作时间的方法】相关文章:

linux下编译php支持jpeg的笔记

修改Linux主机名的方法

Linux VPS查看Inodes数目的方法

Linux下获取用户主目录的方法分享

linux连接投影机方法介绍

Linux主机下远程操作GUI程序的方法

Linux下清除系统日志的方法

linux常用disk磁盘操作命令整理

linux svn客户端使用方法介绍

在Linux下生成crypt加密密码的方法

精品推荐
分类导航