大家好,我需要在 linux 中执行此操作:
怎么做?谢谢!
最佳答案
这取决于,如果您要查找名为 foo.txt,
的特定文件的链接,那么这是唯一的好方法:
find -L / -samefile path/to/foo.txt
另一方面,如果您只是想找到指向 任何 文件的链接,该文件恰好名为 foo.txt
,那么类似
find / -lname foo.txt
或
find . -lname \*foo.txt # ignore leading pathname components
关于linux - 符号链接(symbolic link) : find all files that link to this file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6184849/