Skip to content

ls output misaligned (formatting issue) #956

@vpresnyak

Description

@vpresnyak

Hello,

I've had some issues with the output of the ls command. It seems to misalign files, which makes them hard to read. This started with the upgrade to py3 and v2.0.1 - previous versions of s3cmd didn't seem to have this issue.

$ s3cmd ls s3://my_bucket/files/2017/

2017-03-10 17:29 14069483520   s3://my_bucket/files/2017/file1.tar
2017-03-10 17:29 32289597440   s3://my_bucket/files/2017/file2.tar
2017-03-15 16:13 283443200   s3://my_bucket/files/2017/file3.tar
2017-03-10 16:51 9882787840   s3://my_bucket/files/2017/file4.tar
2017-10-23 21:15 66645022720   s3://my_bucket/files/2017/file5.tar
2017-08-04 22:03 229539840   s3://my_bucket/files/2017/file6.tar
2017-03-10 16:48 12873990656   s3://my_bucket/files/2017/file7.tar

oddly, adding the --human-readable-sizes parameter only makes things worse. It doesn't look like it's rounding correctly.

$ s3cmd ls -H s3://my_bucket/files/2017/

2017-03-10 17:29 13.103227615356445G  s3://my_bucket/files/2017/file1.tar
2017-03-10 17:29 30.072031021118164G  s3://my_bucket/files/2017/file2.tar
2017-03-15 16:13  270.3125M  s3://my_bucket/files/2017/file3.tar
2017-03-10 16:51 9.204063415527344G  s3://my_bucket/files/2017/file4.tar
2017-10-23 21:15 62.06801414489746G  s3://my_bucket/files/2017/file5.tar
2017-08-04 22:03 218.90625M  s3://my_bucket/files/2017/file6.tar
2017-03-10 16:48 11.989838123321533G  s3://my_bucket/files/2017/file7.tar

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions