s3tools / s3cmd

Official s3cmd repo -- Command line tool for managing S3 compatible storage services (including Amazon S3 and CloudFront).
https://s3tools.org/s3cmd
GNU General Public License v2.0
4.57k stars 906 forks source link

get supports --rinclude and --rexclude but ls does not #553

Open gstaubli opened 9 years ago

gstaubli commented 9 years ago

This works as expected (downloading only files from 2014-10-28 at 11PM): s3cmd get --recursive --rexclude ".*" --rinclude ".*2014-10-28-23.*specific_log_type.*" s3://my-bucket-of-logs/folder/2014-10-28/

However changing the command to ls returns the entire directory, seemingly ignoring rinclude and rexclude: s3cmd ls --recursive --rexclude ".*" --rinclude ".*2014-10-28-23.*specific_log_type.*" s3://my-bucket-of-logs/folder/2014-10-28/

A reader on my blog brought this issue to light regarding using rinclude and rexclude to select only certain files: http://garrens.com/blog/2014/10/29/use-regex-to-select-only-certain-files-via-s3cmd/

mdomsch commented 9 years ago

You are correct. [ls] is not honoring this. Perhaps it should. On May 19, 2015 12:39 PM, "Garren Staubli" notifications@github.com wrote:

This works as expected (downloading only files from 2014-10-28 at 11PM): s3cmd get --recursive --rexclude "._" --rinclude "._2014-10-28-23._specific_logtype." s3://my-bucket-of-logs/folder/2014-10-28/

However changing the command to ls returns the entire directory, seemingly ignoring rinclude and rexclude: s3cmd ls --recursive --rexclude "._" --rinclude "._2014-10-28-23._specific_logtype." s3://my-bucket-of-logs/folder/2014-10-28/

A reader on my blog brought this issue to light regarding using rinclude and rexclude to select only certain files: http://garrens.com/blog/2014/10/29/use-regex-to-select-only-certain-files-via-s3cmd/

— Reply to this email directly or view it on GitHub https://github.com/s3tools/s3cmd/issues/553.

billyParmenter commented 3 years ago

I know it has been a few years but has there been any developments regarding this? would be useful for me or if you know of another method to check that a file exists.