Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Fastest way to calculate directory size in linux

by DrHyde (Prior)
on Feb 02, 2012 at 10:57 UTC ( #951409=note: print w/replies, xml ) Need Help??

in reply to Fastest way to calculate directory size in linux

If all you care about is the size of the directory, just use stat:

$ perl -e 'print +(stat("/tmp"))[7]' 49152

I have no idea whether stat() works on Windows or not, but it's not mentioned in perlport.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951409]
GotToBTru thinks erix & MySql ... talk about a database trigger
[GotToBTru]: wow .. outta votes and it's not even lunchtime yet
[stevieb]: berrybrew has been updated with the new perl checksums. Now I'm going to implement dynamic loading of perls thanks to their new JSON releases file

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-03-30 15:58 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (360 votes). Check out past polls.