a 파일의 symlink b를 만들었는데, a 파일을 지운 경우 b symlink는 broken 상태가 된다

 

DIR=...
find -L $DIR -maxdepth 1 -type l -print

위 명령어로 broken symlink를 찾을 수 있다

 

for f in `find -L $DIR -maxdepth 1 -type l`; do unlink $f; done

실제 지우는건 이걸로 한다

반응형