peak / s5cmd

Parallel S3 and local filesystem execution tool.
MIT License
2.71k stars 240 forks source link

Option to show progress in non-interactive terminals? #753

Open shapirus opened 2 months ago

shapirus commented 2 months ago

It'd be nice if the cp command could show the numbers for completed objects and total objects.

I know about the --show-progress flag, but it:

a) won't work with non-interactive/dumb terminals such as plain text log files or github actions job output logs; b) doesn't pre-calculate the total number of files, and the total number of objects it prints is increasing along with the number of uploaded objects as it progresses.

Current output:

...
cp x/y/z/filename.ext s3://bucket/x/y/z/filename.ext
cp x/y/z/filename1.ext s3://bucket/x/y/z/filename1.ext
...

Desired output, for example, just like in s3cmd:

...
cp x/y/z/filename.ext s3://bucket/x/y/z/filename.ext [25 of 2028]
cp x/y/z/filename1.ext s3://bucket/x/y/z/filename1.ext [26 of 2028]
...