P is for Practical | |
PerlMonks |
•Re: Files owned in a filesystemby merlyn (Sage) |
on May 31, 2002 at 15:50 UTC ( [id://170749]=note: print w/replies, xml ) | Need Help?? |
That should be lstat instead of stat, or else you'll count a symlinked file's size multiple times.
And actually, you should use (lstat)[12], which accounts properly for holey files and indirect blocks, to give you a number like du instead of like adding up a bunch of ls -l values. -- Randal L. Schwartz, Perl hacker
In Section
Cool Uses for Perl
|
|