Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1090368
  • 博文数量: 321
  • 博客积分: 7872
  • 博客等级: 少将
  • 技术积分: 2120
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-16 09:06
文章分类

全部博文(321)

文章存档

2017年(1)

2016年(1)

2015年(12)

2014年(17)

2013年(78)

2012年(15)

2011年(17)

2010年(67)

2009年(102)

2008年(11)

分类: LINUX

2011-10-24 16:32:50

如果想查找/usr/lib中,无效的连接符号,可以用如下命令
 
#  find -L /usr/lib -type l
 
      -L     Follow symbolic links.  When find examines or prints information about files, the information used shall be  taken  from the properties 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 ineffect and find discovers a symbolic link to a subdirectory during its search, the subdirectory  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  broken).   Using  -L causes the -lname and -ilname predicates always to return false.
阅读(1701) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~