include and exclude in rsync
Hi,
I'm trying to copy files from my local directory to a remote site using rsync. I want to include in the copy all the java files and exclude all the .svn directories, but I can't do it. The command that I use is Code:
rsync -av -e ssh --include=*.java --exclude=/.svn/ dir user@remote:~/ |
It would help if you post what actually is not working.
Edit: Deleted obviously wrong content. |
The problem is that the exclude and include filters are not working, and i don't understand why.
|
After looking at your command and studying the manpage of rsync I come to the conclusion that this should work. I don't understand why this shouldn't work, too.
|
Have you tried reversing the order of the --include and --exclude flags and also quoting the the *.java (ie '*.java')?
Evo2. |
All times are GMT -5. The time now is 10:51 AM. |