I am running s3cmd version 2.4.0 on the AlmaLinux 10.1.
When running s3cmd ls s3://bucket --exclude "dirname" - it works, ie list everything except directory "dirname"
However running s3cms ls s3://bucket --recursive --exclude "dirname" - it lists everything , including dirname and its contents.
Tried all possible syntax for dirname [ /dir1/ /dir1/* dir1 /dir1 dir1/*] in --exclude - nothing works.
As a workaround I have to use grep -v '/dirname/' ...
Will appreciate help with it !