리눅스 history 시간 기록 및 삭제

– 리눅스 history 명령어

쉘 명령어 수해 목록 조회 / 조작할 수 있는 리눅스 명령어

# history
1. pwd
2. ll
3. cd -
4. date
5. history

# !{번호} : history 해당 한 번호를 명령어를 다시 실행 -> # !3 -> cd – 명령어 실행

# !d : 최근 명령어 중 d로 시작하는 명령어 다시 실행 -> data 명령어 실행

# !! : 최근 마지막에 실행한 명령어 실행 -> history 명령어 실행

– history 시간 기록

# echo export HISTTIMEFORMAT=\"[%F %T] \" > /etc/profile.d/bash_history.sh

# chmod 755 /etc/profile.d/bash_history.sh

– history 지우기

# history -c

# history -d {번호}

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다