Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1154  / 3 Years ago, sun, september 5, 2021, 8:48:03

I have more than 1000 icons in a single directory and also there are hundreds of shortcuts (symbolic links?) inside that directory with different names, some of symbolic links are broken, i need to find which symbolic links are broken.



i tried using ls -l but it is difficult to use.



How do i do that? And is it possible to fix broken symbolic links. Thanks


More From » icons

 Answers
5

This will list you all broken links:

find . -type l -exec sh -c "file -b {} | grep -q ^broken" ; -print


[#24441] Monday, September 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terneive

Total Points: 329
Total Questions: 117
Total Answers: 105

Location: Denmark
Member since Tue, Oct 18, 2022
2 Years ago
;