Please kindly help me add date time on history command.
I tried but not work on
1. login root
2. vi /etc/bashrc
#add below command
export HISTTIMEFORMAT='%F %T '
# su - [user]
# echo $HISTTIMEFORMAT
source /etc/bashrc
*****
It can work on time but when I log out and login again. it go back to normal need to run source /etc/bashrc to active the Timestamp again
[root@pcrfocf109 ~]# cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch
rinting-4.0-amd64
rinting-4.0-noarch
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)
[root@pcrfocf109 ~]#
I tried but not work on
1. login root
2. vi /etc/bashrc
#add below command
export HISTTIMEFORMAT='%F %T '
# su - [user]
# echo $HISTTIMEFORMAT
source /etc/bashrc
*****
It can work on time but when I log out and login again. it go back to normal need to run source /etc/bashrc to active the Timestamp again
[root@pcrfocf109 ~]# cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch


Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)
[root@pcrfocf109 ~]#