rsync exclude hidden and temporary files
by rufa from LinuxQuestions.org on (#4SQ07)
Hi,
I'm doing rsync with inotifywait to sync two folders like below :
Code:while true; do
inotifywait -r -e modify,create,delete /opt/tmp1
# rsync -avz /directory /target
rsync -ahuvPz --exclude='*.' --exclude='*~' /opt/tmp1/* /opt/tmp2 --delete
notify-send "Sync finished" "$(date)" -i info
doneBut i see the error message in verbose mode:
Code:rsync: link_stat "/opt/tmp1/test1.txt~" failed: No such file or directory (2)I know this error isn't gonna affect the sync but how to prevent this error message using --exclude ?
Thanks,


I'm doing rsync with inotifywait to sync two folders like below :
Code:while true; do
inotifywait -r -e modify,create,delete /opt/tmp1
# rsync -avz /directory /target
rsync -ahuvPz --exclude='*.' --exclude='*~' /opt/tmp1/* /opt/tmp2 --delete
notify-send "Sync finished" "$(date)" -i info
doneBut i see the error message in verbose mode:
Code:rsync: link_stat "/opt/tmp1/test1.txt~" failed: No such file or directory (2)I know this error isn't gonna affect the sync but how to prevent this error message using --exclude ?
Thanks,