- 论坛徽章:
- 0
|
HISTTIMEFORMAT="%F %T `who am i | awk 'BEGIN{OFS=" ";}{print $1,$2,$5}' ` `echo $PWD` "
设置了这个参数之后 history命令输出 发现这个现象:
1005 2012-08-10 17:04:01 root pts/2 (192.168.1.44) /home/nagios cd /usr/local/src/
1006 2012-08-10 17:04:08 root pts/2 (192.168.1.44) /home/nagios ls
1007 2012-08-10 17:05:15 root pts/2 (192.168.1.44) /home/nagios history
1008 2012-08-10 17:05:51 root pts/2 (192.168.1.44) /home/nagios cd /home/cacti/
1009 2012-08-10 17:05:53 root pts/2 (192.168.1.44) /home/nagios ls
1010 2012-08-10 17:06:00 root pts/2 (192.168.1.44) /home/nagios history
目录一直显示的是 /home/nagios 。就算切换了目录,显示的路径也没有改变。
想咨询一下这是什么原因。 |
|