我在 HP-UX 系统上工作,我想查找是否有任何循环符号链接。
到目前为止,我正在使用以下命令:
ls -lrt `find ./ -follow -type l`
Run Code Online (Sandbox Code Playgroud)
但结果它只ls -lrt在当前目录上执行。
我应该使用什么命令来查找系统中的所有循环符号链接?
小智 1
ls -lrt `find / -follow -type l`
Run Code Online (Sandbox Code Playgroud)
./ 搜索当前目录。如果它恰好是 / 那么您编写的命令将从根目录中搜索。否则会丢失前导点。