Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

•Re: Files owned in a filesystem

by merlyn (Sage)
on May 31, 2002 at 15:50 UTC ( #170749=note: print w/ replies, xml ) Need Help??


in reply to Files owned in a filesystem

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


Comment on •Re: Files owned in a filesystem
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://170749]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2015-07-28 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls