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 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .