Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
P is for Practical
 
PerlMonks  

Re^2: file test operation on files greater than 2gigs

by Anonymous Monk
on Aug 01, 2013 at 11:50 UTC ( #1047439=note: print w/ replies, xml ) Need Help??


in reply to Re: file test operation on files greater than 2gigs
in thread file test operation on files greater than 2gigs

Probably better to use the output of stat(1). Trying to parse ls(1) is well known to be a bad idea.

my $size = `stat -f %z yourfile.txt`;


Comment on Re^2: file test operation on files greater than 2gigs
Select or Download Code
Re^3: file test operation on files greater than 2gigs
by Anonymous Monk on Aug 01, 2013 at 12:47 UTC
    ...except that the GNU version uses -c %s for the format string argument. Ah well. Portability woes everywhere.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2014-04-18 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (460 votes), past polls