s4cmd icon indicating copy to clipboard operation
s4cmd copied to clipboard

Support --include/--exclude

Open jimmywan opened this issue 8 years ago • 4 comments

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.

jimmywan avatar Nov 04 '16 21:11 jimmywan

+1

pako-pl avatar Nov 06 '16 09:11 pako-pl

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 avatar Mar 19 '17 11:03 rprieto

@rprieto did this request move forward?

ghost avatar Jun 25 '19 22:06 ghost

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

Eichhorst avatar Jul 01 '19 13:07 Eichhorst