임시방편이지만...
.bash_logout 파일을 편집한다.
bash의 history 기능에서 해당 command의 내용을 일정량(/etc/profile 파일의 HISTSIZE 변수)을 적재한 .bash_history에 조작을 가하는 것이다.
단, 아래의 과정은 바로 전 단계 shell의 history 정보는 가지고 있다.
$ cat ~/.bash_logout
clear
### clear 위에 히스토리정보를 가진 ~/.bash_history 파일의 크기를 0으로 만든다.
$ cat ~/.bash_logout
> ~/.bash_history
clear
$
### .bash_logout 파일을 source 한다.
$ . .bash_logout
$
root가 알아버리면 말짱 도루묵이지만 가끔 유용할 때가 있을것이다.

댓글을 달아 주세요