Removing Broken Symlinks: Difference between revisions

From Leo's Notes
This page was last edited on 29 March 2015, at 05:30.
Created page with "To remove broken symlinks automatically, run: find . -type l -! -exec test -e {} \; -print | while read i ; do rm -v $i ; done Category:Linux"
 
mNo edit summary
Line 1: Line 1:
To remove broken symlinks automatically, run:
To remove all broken symlinks automatically, run:
   find . -type l -! -exec test -e {} \; -print | while read i ; do rm  -v $i ; done
   find . -type l -! -exec test -e {} \; -print | while read i ; do rm  -v $i ; done




[[Category:Linux]]
[[Category:Linux]]
[[Category:Tipsntricks]]
{{Navbox Linux}}

Revision as of 05:30, 29 March 2015

To remove all broken symlinks automatically, run:

 find . -type l -! -exec test -e {} \; -print | while read i ; do rm  -v $i ; done