How to exclude a folder from rsync -


i using rsync deploy git branch production server. currently, got js files stored in 2 locations:

  • assets/js/
  • js/

when run rsync using --exclude js, non of both folders sync, while want assets/js/ folder synced , js/ folder inside root folder skipped. how can achieve this?

you need specify pattern files , directories:

using:

cwrule [pattern_or_filename] cwrule,modifiers [pattern_or_filename] 

so have

cw- js/ 

for more detailed info can see man page @ section

include/exclude pattern rules 

from this link, hope helps


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -