set 명령어

set -o noclobber
파일을 덮어 씌우는것을 예방한다
[root@solaris10 /etc]# set -o noclobber
[root@solaris10 /etc]# who > xyz
[root@solaris10 /etc]# who > xyz
-bash: xyz: cannot overwrite existing file
set -o ignoreeof
ctrl+d 를 눌렀을때 로그오프 되는것을 예방한다

set +o noclobber
설정을 무효한다
[root@solaris10 /etc]# set +o noclobber
[root@solaris10 /etc]# who > xyz      
[root@solaris10 /etc]# who > xyz
set 명령어

현재 사용하고 있는 쉘이 어떤 변수들로 구성되어 있는지 알고 싶은 경우,set 명령을 할수 있다.
unset 명령어

만약 원하지 않는 변수를 삭제하는 경우에 unset명령어를 사용한다
[root@solaris10 /etc]# set | grep PS1
PS1='[\u@\h \w]\$ '
[root@solaris10 /etc]# unset PS1

unset으로 현재 프롬프트가 나오지 않게 된다

by 홍텐 | 2007/10/14 15:23 | solaris | 트랙백 | 덧글(1)

트랙백 주소 : http://HongTen.egloos.com/tb/865616
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Commented by n0fate at 2007/11/29 17:07
이런 명령어도 있었군요?=_+잘보고갑니다..:)
※ 로그인 사용자만 덧글을 남길 수 있습니다.

◀ 이전 페이지다음 페이지 ▶