How can I find all symlinks linking to a renamed volume?
I had a change a volume name and I h开发者_StackOverflow中文版ave dozens of (now broken) symlinks (at least) throughout my system.
How can I easily find all symlinks matching my old volume name?
Let's assume my old volume was named "OldVolume" and my new one is named "NewVolume".
I assume it will be some version of:
find / -type l -ls
find . -type l | (while read FN ; do test -e "$FN" || ls -ld "$FN"; done)
will find your broken symlinks. To limit the output, you could simple pipe the above into a grep:
find . -type l | (while read FN ; do test -e "$FN" || ls -ld "$FN"; done) | \
grep OldVolume
精彩评论