Rsync - ignore multiple files

Rsync is handy. It makes publishing a breeze when combined with Makefile.

Kalle Tolonen
15.10.2024

On many occasions, it's important to sometimes ignore certain files:

To achieve this, you can just add many excluded after one another:

rsync -v -r --delete $(LOCAL_PATH) $(REMOTE_SERVER):$(REMOTE_PATH) --exclude $(EXCLUDED_FILE1) --exclude $(EXCLUDED_FILE2) --exclude $(EXCLUDED_FILE3)

Comments

No published comments yet.


Add a Comment

Your comment is held for review before it appears publicly.

Tick the box, then click Submit right away (Google expires the check after about two minutes).