find -L . -type l -delete

Andriy Gapon avg at icyb.net.ua
Thu Nov 13 05:38:55 PST 2008


Am I stupid or is our 'find' is seriously broken in one subtle feature?

$ find -L . -type l
find all broken symlinks (target doesn't exists)

$ find -L . -type l -delete
removes all symlinks!!!

FreeBSD 7.1-PRERELEASE amd64
-- 
Andriy Gapon


More information about the freebsd-stable mailing list