Article 4SQ07 rsync exclude hidden and temporary files

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,latest?d=yIl2AUoC8zA latest?i=7fRGZTLSd-c:OFv_IzIzMTk:F7zBnMy latest?i=7fRGZTLSd-c:OFv_IzIzMTk:V_sGLiP latest?d=qj6IDK7rITs latest?i=7fRGZTLSd-c:OFv_IzIzMTk:gIN9vFw7fRGZTLSd-c
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments