But did you notice that the symlinks are all "
../conf.d"?
This means that all the links point back to the same directory, and so there's only a single
suhosin.ini file. It's just available through multiple paths.
Of course, if what you want is a list of all the paths, then great!
Speaking of which, with bash's new
globstar feature (v.4+), you should be able to do this with a simple globbing pattern. I just mocked up the above directory tree and ran a test:
Code:
$ shopt -s globstar
$ printf "$PWD/%s\n" **/suhosin.ini
/home/david/testdir/apache2/conf.d/suhosin.ini
/home/david/testdir/cgi/conf.d/suhosin.ini
/home/david/testdir/cli/conf.d/suhosin.ini
/home/david/testdir/conf.d/suhosin.ini
The
**/ does recursive matching of all subdirectories. You do have to be a bit cautious with it though. Since it always follows directory symlinks like this, it can get stuck in eternal loops if there are any self-referencing ones.