[Bug 12378] why i cannot exclude dir/files if using option "--files-from"

samba-bugs at samba.org samba-bugs at samba.org
Thu Oct 13 22:13:46 UTC 2016


https://bugzilla.samba.org/show_bug.cgi?id=12378

--- Comment #3 from Kevin Korb <rsync at sanitarium.net> ---
I didn't say anything specific about a remote host.

You excluded .cache then you told it to copy specific files some of which are
in .cache.  If there was a file named .cache inside of a directory that you
told it to copy then it would be excluded.  If you excluded
userName/.cache/winetricks/msls31/InstMsiW.exe then it would be excluded. 
Exclude is not patern matched against parts of things you explicitly tell rsync
to copy...

kmk at dementia[1%]> cd /tmp
kmk at dementia[2%]> mkdir test
kmk at dementia[3%]> cd !$
cd test
kmk at dementia[4%]> mkdir src dst
kmk at dementia[5%]> cd src
kmk at dementia[6%]> mkdir -p a b c d e cache/c
kmk at dementia[7%]> cd ..
kmk at dementia[8%]> /bin/echo -ne "a\nb\nc\nd\ne\ncache/c\n" > list
kmk at dementia[9%]> cat list 
a
b
c
d
e
cache/c
kmk at dementia[10%]> rsync -vain --files-from=list --exclude=cache src/ dst/
building file list ... done
cd+++++++++ a/
cd+++++++++ b/
cd+++++++++ c/
cd+++++++++ cache/
cd+++++++++ cache/c/
cd+++++++++ d/
cd+++++++++ e/

sent 157 bytes  received 37 bytes  388.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
kmk at dementia[11%]> rsync -vain --files-from=list --exclude=c src/ dst/
building file list ... done
cd+++++++++ a/
cd+++++++++ b/
cd+++++++++ d/
cd+++++++++ e/

sent 106 bytes  received 28 bytes  268.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)
kmk at dementia[12%]> rsync -vain --files-from=list --exclude=cache/c src/ dst/
building file list ... done
cd+++++++++ a/
cd+++++++++ b/
cd+++++++++ c/
cd+++++++++ d/
cd+++++++++ e/

sent 121 bytes  received 31 bytes  304.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)

Cache isn't really being copied it is just being created to make a place for
cache/c to be stored when cache/c or c is not excluded.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list