Simple life, Complicated mind
Tuesday, December 6, 2011
find and remove broken symbolic links
Method 1 (preferred):
# find -L /find/a/path/ -type l -print0 | xargs -0 -I @ rm @
Method 2:
# find /find/a/path/ -type l | perl -lne 'print if ! -e' | xargs rm -rf
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment