s5cmd icon indicating copy to clipboard operation
s5cmd copied to clipboard

sync with --delete does not respect --exclude

Open ryansydnor opened this issue 7 months ago • 1 comments

If my-bucket has a directory, folder in it, this command will delete everything in s3://my-bucket/folder despite the --exclude "folder/*" flag.

s5cmd sync --delete --exclude "folder/*" . s3://my-bucket

This behavior is surprising to me given aws s3 sync will not delete folders specified with --exclude.

Is this intentional behavior of s5cmd? Or a bug?

ryansydnor avatar Jun 12 '25 14:06 ryansydnor

Second this, run into the same surprising behavior when trying to switch to s5cmd from aws-cli. Some clarification would be greatly appreciated here!

zwang180 avatar Jun 13 '25 21:06 zwang180