리눅스 history 명령에 날짜/시간 표시하기

/etc/profile에서 아래와 같이 history format을 지정합니다.

# vim /etc/profile

HISTTIMEFORMAT="[%F %T]  "
export HISTTIMEFORMAT

이후 source로 profile을 재 적용하면 history 명령에서 시간을 확인할 수 있습니다.

source /etc/profile
504  [2015-01-07 00:17:58]  ls
505  [2015-01-07 00:18:07]  source /etc/profile
506  [2015-01-07 00:18:10]  history