s4cmd
s4cmd copied to clipboard
Support --include/--exclude
Something I did a lot with s3cmd is to grab partial directory contents over a large tree by using the following:
s3cmd sync <src> <dst> --exclude '*' --include 'foo/bar/*/*/*.log'
Would be nice to have some way to do this. Seems like the only way to do this with s4cmd is to ls them all and try to copy them 1 by 1, but I'd have to manually compute the target path/folder for every one.
+1
Another use case when running on macOS is s3cmd sync [....] --exclude "._*"
which ignores all metadata files OSX creates on non-HFS drives.
I can't think of any workaround to ignore these on s4cmd
.
@rprieto did this request move forward?
I implemented the possibility of (multiple) --exclude patterns for local src files in dsync: https://github.com/bloomreach/s4cmd/pull/159/ Unfortunately pull requests don't seem to be processed by the maintainer :/
If you are interested, you can download the fixed version from my fork: https://github.com/Eichhorst/s4cmd