I am experiencing an issue with a indexing program running much longer than expected. I want to rule out the possibility of a recursive symbolic link. How could I find a symbolic link that is recursive at some level?
Asked
Active
Viewed 7,373 times
1
-
5previously, previously – Jeff Schaller Apr 18 '16 at 01:46
-
@JeffSchaller, The first link does detect recursive symbolic links. Thank you for pointing me to that. I saw the second question you linked before posting this question. That does not provide a way to find such a link. – Steven C. Howell Apr 18 '16 at 02:29
1 Answers
8
This related question, provides a way to identify a recursive symbolic link using the find
command:
$ find -L .
.
./a
./a/b
./a/b/c
./a/b/c/d
find: File system loop detected; `./a/b/c/d/e' is part of the same file system loop as `./a/b'.
find: `./a/b/e': Too many levels of symbolic links

Steven C. Howell
- 487
-
-
1Yes, the loop messages come out on stderr, so you can filter out only those results by running
find -L . > /dev/null
– maaarghk Sep 27 '21 at 11:50