Rsync - ignore multiple files

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

Kalle Tolonen
Oct. 15, 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 may be published.