i've encountering problems when I use rsync
(v3.2.3 on a Pi with Raspbian) with directories containing a whitespace at the end. example:
pi:~ $ find source/
source/
source/hello
source/hello/whitespace_dir <--- dir with whitespace at the end
source/hello/whitespace_file <--- file with whitespace at the end
source/foo
source/foo/bar1
source/foo/bar2
output of a dry run rsync:
pi:~ $ rsync -aHv --dry-run --include="*/" --include="bar" --exclude="*" source/ target/
sending incremental file list
./
foo/
foo/bar1/
foo/bar2/
hello/
hello/whitespace_dir /
The -vvv explanation says
[sender] hiding file hello/whitespace_file because of pattern *
[sender] pushing local filters for /home/pi/source/hello/whitespace_dir /
Why? I just want to copy all dir's AND files matching the pattern "bar".