in reply to Finding Hard links
Update: ok, here I try my hand at this with a minimal example/proof of concept:
#!/usr/bin/perl -ln use strict; use warnings; BEGIN { @ARGV='find . -xdev|' } our %files; my ($ino, $nlink)=(stat)[1,3]; next unless $nlink and $nlink > 1; if ($nlink == push @{ $files{$ino} }, $_) { print "$_ => $ino" for @{ $files{$ino} }; delete $files{$ino}; } __END__
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Finding Hard links
by powerman (Friar) on Nov 09, 2005 at 03:54 UTC | |
by blazar (Canon) on Nov 09, 2005 at 14:20 UTC |