21

I am trying to exclude "Mendeley Desktop" directory for rsync.

The exclude-from= is as:

Downloads
*.o
*.iso
Dropbox
Documents/Mendeley\ Desktop

but rsync is still backing up the Mendeley Desktop.

How I can make rsync to ignore the directories with space?

1 Answer 1

28

Remove the \ from before the space. An escaped space is used to stop the shell splitting at spaces. As you are using a file to list your excluded directories and files then the words Mendeley Desktop will never pass through the shell and therefore will not need escaping. If you were listing them on the command line with --exclude then you'd need to escape the space.

Use:

Downloads
*.o
*.iso
Dropbox
Documents/Mendeley Desktop

You must log in to answer this question.

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