I'm seeing some weird behavior. Got this line:
my @stats = stat($f);
$f is the path to a file sitting on an amazon s3 bucket. I am using s3fs to mount the bucket on my instance and the path to the file looks like a normal path, something like: /backups/backups_db/some_dir/file. The backups_db is a symlink to /s3bucket/backups_db
At any rate, @stats contains values from the stat() function above but in totally random order. Here's a dump of three different files:
[DEBUG] Rex.CLI: 206
$VAR1 = [
'gid',
1000,
'size',
325342,
'mode',
'0644',
'mtime',
1623769844,
'uid',
1000,
'atime',
0
];
[DEBUG] Rex.CLI: 206
$VAR1 = [
'uid',
1000,
'size',
325316,
'atime',
0,
'gid',
1000,
'mode',
'0644',
'mtime',
1623771735
];
[DEBUG] Rex.CLI: 206
$VAR1 = [
'gid',
1000,
'mtime',
1623772143,
'mode',
'0644',
'atime',
0,
'uid',
1000,
'size',
325346
];
I'm not sure if I'm just being an idiot on how to use the stat() function or if the stat() function does not work properly on a file on an s3 bucket using s3fs. If it's the latter, can this be fixed?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.