Skip to content

Commit

Permalink
Merge pull request #127 from milianw/files-lstat
Browse files Browse the repository at this point in the history
Use lstat instead of stat to not count size of symbolic link targets
  • Loading branch information
brendangregg authored Apr 7, 2017
2 parents 74764af + eec1439 commit e5d63f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files.pl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub usage {
find(\&wanted, $dir);

sub wanted {
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat($_);
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = lstat($_);
return unless defined $size;
my $path = $File::Find::name;
$path =~ tr/\//;/; # delimiter
Expand Down

0 comments on commit e5d63f9

Please sign in to comment.