chflags 는 해당 파일의 모드를 읽기 전용으로 변경 해줍니다. (리눅스의 chattr 모드와 같은..)

chflags 사용법

[root@yongbok ~]# chflags [option] [flags] [file]

사용 예
해당 파일을 읽기 전용(read only) 모드로 변경시

[root@yongbok ~]# chflags schg hello.c

해당 파일의 읽기 전용(read only) 모드를 해제시

[root@yongbok ~]# chflags -R nouchg  hello.c

플래그(Flags)

arch, archived
set the archived flag (super-user only)

opaque
set the opaque flag (owner or super-user only)

nodump
set the nodump flag (owner or super-user only)

sappnd, sappend
set the system append-only flag (super-user only)

schg, schange, simmutable
set the system immutable flag (super-user only)

sunlnk, sunlink
set the system undeletable flag (super-user only)

uappnd, uappend
set the user append-only flag (owner or super-user only)

uchg, uchange, uimmutable
set the user immutable flag (owner or super-user only)

uunlnk, uunlink
set the user undeletable flag (owner or super-user only)

더 자세한 내용은 man 페이지 참조 ( http://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=1 )

[root@yongbok ~]# man chflags