ITPub博客

首页 > Linux操作系统 > Linux操作系统 > linux下查找无效的符号连接(转)

linux下查找无效的符号连接(转)

原创 Linux操作系统 作者:BSDLite 时间:2007-08-15 20:53:43 0 删除 编辑
linux下查找无效的符号连接(转)[@more@]命令:
find -L /path/to/dir -type l 或 find /path/to/dir -follow -type l
CODE:
-L Follow symbolic links. When find examines or prints information
about files, the information used shall be taken from the prop-
erties of the file to which the link points, not from the link
itself (unless it is a broken symbolic link or find is unable to
examine the file to which the link points). Use of this option
implies -noleaf. If you later use the -P option, -noleaf will
still be in effect. If -L is in effect and find discovers a
symbolic link to a subdirectory during its search, the subdirec-
tory pointed to by the symbolic link will be searched.

When the -L option is in effect, the -type predicate will always
match against the type of the file that a symbolic link points
to rather than the link itself (unless the symbolic link is bro-
ken). Using -L causes the -lname and -ilname predicates always
to return false.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10617542/viewspace-959792/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论