0

I have a folder like this

/
  config.js
  /lib
    /project
      config.js

In the root directory I execute rsync

rsync -azvr --exclude config.js --include lib/project/config.js  .  dest

The /lib/project/config.js is not sync to the dest, how to fix this problem?

1

You need reorder you include/exclude parameter become

# rsync -azvr --include lib/project/config.js --exclude config.js . dest
sending incremental file list
./
lib/
lib/project/
lib/project/config.js

Instead

# rsync -azvr --exclude config.js --include lib/project/config.js . dest
sending incremental file list
./
lib/
lib/project/

sent 73 bytes  received 23 bytes  192.00 bytes/sec

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.