Discussion:
[S3tools-general] rexclude-from program abort plus possible regex failure
Russell Gadd
2016-03-14 21:58:02 UTC
Permalink
s3cmd throws an error with invalid regular expressions which ought to give
rise to a user error message rather than program abort. Maybe this isn't
much of an issue if all valid regular expressions work ok, but I have one
which I think is valid and ought to work differently than it does (see
third paragraph below).

Re the program abort, I have attached 2 files of error messages, one using
the installed s3cmd and also s3cmd downloaded today from github. The
command line uses a file BackupExcludesRequired.txt. This has just one line
which contains the invalid string "*~" (without the quotes). If I use the
expression ".*~" instead, there is no problem.

Re the particular regex problem, I am trying to exclude dot files with the
regular expression "\..*" (without the quotes). s3cmd sync excludes all
files with a dot anywhere in the name instead of just ones with a leading
dot. I'm wondering if regular expressions are reliable. Perhaps I'm using
the wrong definition of regular expressions? Could you please state the
regular expression model used e.g. grep or egrep.

Unfortunately neither can I exclude dot files with globbing (i.e. using
--exclude-from rather than --rexclude-from) when I tried the expression
".*" (without the quotes) which behaves in the same way as the regex
"\..*" above, i.e. it excludes all files with a dot anywhere in the name.

Russell

Loading...