如果没有遍历文件系统寻找所有符号链接,然后检查他们的目的地,没有.但如果你仍然想要这样做,那就非常简单:
use strict;
use warnings;
use File::Find;
my $target = 'the filename you want to find links to';
finddepth(
sub {
return if not -l $File::Find::name;
print "found $File::Find::name!\n" if readlink($File::Find::name) eq $target;
},
'/'
);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
657 次 |
最近记录: |