리눅스 시스템에서 history 명령어를 이용하여
그간의 작업기록을 확인할수 있습니다
history
[root@servblog ~]# history
1001 history |
작업한 내용에 대해선 확인이 가능하지만 작업한 시각을 확인할 수가 없습니다
설정
vi /etc/profile
### profile 하단부에 아래라인 추가하고 저장
HISTTIMEFORMAT=”%Y-%m-%d_%H:%M:%S\ ”
export HISTTIMEFORMAT
적용
source /etc/profile
1001 2018-12-27_11:57:20\ history 1002 2018-12-27_11:57:35\ clear 1003 2018-12-27_12:00:12\ w 1004 2018-12-27_12:00:13\ free 1005 2018-12-27_12:00:14\ yop 1006 2018-12-27_12:00:15\ top 1007 2018-12-27_12:00:18\ history 1008 2018-12-27_12:00:20\ ls -al 1009 2018-12-27_12:00:31\ netstat 1010 2018-12-27_12:00:40\ ls /var/log/messages 1011 2018-12-27_12:00:43\ ls /var/log/ 1012 2018-12-27_12:00:47\ history 1013 2018-12-27_12:13:33\ vi /etc/profile 1014 2018-12-27_12:13:41\ source /etc/profile 1015 2018-12-27_12:13:43\ history |
정상적으로 적용되었습니다