Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Usage of a sparse file

by aitap (Deacon)
on Mar 11, 2013 at 16:37 UTC ( #1022827=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Usage of a sparse file
in thread Usage of a sparse file

Isn't blocks*blocksize = (stat $file)[11]*512 the actual used size?

$ ls -lh sparse_file -rw-r--r-- 1 aitap aitap 101M Mar 11 20:30 sparse_file $ du -h sparse_file 1,1M sparse_file $ du -B 1 sparse_file 1060864 sparse_file $ perl -E'say ((stat shift)[12]*512)' sparse_file 1060864
Sorry if my advice was wrong.


Comment on Re^4: Usage of a sparse file
Select or Download Code
Re^5: Usage of a sparse file
by mishikal (Novice) on Mar 20, 2013 at 01:28 UTC
    Hm, that works. I can grab the blocksize as well, and divide by 8 to get down to 512. Thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (18)
As of 2015-07-06 17:15 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 (77 votes), past polls