Discussion:
[S3tools-general] Why does s3cmd du give different results depending on suffixed slash?
Joshua Fox
2015-05-19 06:29:25 UTC
Permalink
s3cmd du -H s3://bucketabc/prefix/further-prefix

gives 21G

s3cmd du -H s3://bucketabc/prefix/further-prefix/

gives 10G.

There are no files directly in there, just four "subdirectories."

I have five buckets which are near-copies and this only happens in two of
them. The others show 10G consistently. I am moderately sure that 10G is
correct.

The only apparent difference between buckets -- and a seemingly irrelevant
one -- is that the two which give 10G consistently have one *more* subdirectory
than the ones that give 21G vs 10G; there is a single 138M file in that
extra dir.

Why 21G vs 10G?

Thanks,

Joshua

(s3cmd version 1.5.0~rc1-2)
Joshua Fox
2015-05-20 06:15:53 UTC
Permalink
OK, it's just because the version without slash serves as a wild card for
other directories with this string as a prefix.
Post by Joshua Fox
s3cmd du -H s3://bucketabc/prefix/further-prefix
gives 21G
s3cmd du -H s3://bucketabc/prefix/further-prefix/
gives 10G.
There are no files directly in there, just four "subdirectories."
I have five buckets which are near-copies and this only happens in two of
them. The others show 10G consistently. I am moderately sure that 10G is
correct.
The only apparent difference between buckets -- and a seemingly irrelevant
one -- is that the two which give 10G consistently have one *more* subdirectory
than the ones that give 21G vs 10G; there is a single 138M file in that
extra dir.
Why 21G vs 10G?
Thanks,
Joshua
(s3cmd version 1.5.0~rc1-2)
Loading...