Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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`;

Replies are listed 'Best First'.
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 monks are mute...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2016-12-06 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (96 votes). Check out past polls.