这取决于是否要查找指向特定文件的链接,
foo.txt,那么这是唯一的好方法:
find -L / -samefile path/to/foo.txt
另一方面,如果您只是想查找指向恰好名为的 任何 文件的链接
foo.txt,则类似
find / -lname foo.txt
要么
find . -lname *foo.txt # ignore leading pathname components

这取决于是否要查找指向特定文件的链接,
foo.txt,那么这是唯一的好方法:
find -L / -samefile path/to/foo.txt
另一方面,如果您只是想查找指向恰好名为的 任何 文件的链接
foo.txt,则类似
find / -lname foo.txt
要么
find . -lname *foo.txt # ignore leading pathname components