s3cmd icon indicating copy to clipboard operation
s3cmd copied to clipboard

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

Open gstaubli opened this issue 10 years ago • 2 comments

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/

gstaubli avatar May 19 '15 17:05 gstaubli

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

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/

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

mdomsch avatar May 19 '15 22:05 mdomsch

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.

billyParmenter avatar Oct 05 '21 15:10 billyParmenter