HP-UX
1757003 회원
2275 온라인
108858 솔루션
새 메시지

history 기록남기기 (도와주세요 ㅠㅠ)

 
장성도
비정기 기여자

history 기록남기기 (도와주세요 ㅠㅠ)

고수님들 좀 부탁합니다.

더이상 진행이 안되네요 ㅠㅠ

posix shell,ksh에서는 잘되는데



csh,ksh shell에서는 화일을 기록하지 않네요

처음 로긴할때 .cshrc에 넣었는데

화일만 생성되지 history가 기록되지 않습니다.





set today=`date +%Y%m%d%H%M%S`

set user=`whoami`

set where=`who am i -R | sed -e 's/.*(//' -e 's/)//'`

set file=$today.$user.$where.log

touch /home/ttest/$file

set histfile=/home/ttest/$file <-- 이부분이 안되는것 같아요

set histsize=10000

1 응답 1
권규용
정기 조언자

history 기록남기기 (도와주세요 ㅠㅠ)

#vi .cshrc



if ( $?prompt ) then # shell is interactive.

set history=300 # previous commands to remember.

set savehist=300 # number to save across

endif



위와 같이 해주시구여...

그럼 $HOME/.history 라는 파일에 history가 쌓여있을겁니다.

이파일을 보시면 될겁니다...



set histfile=/home/ttest/$file <-- 이건 안될건데요..

아시는분계시면 저도 답변 부탁드립니다..