Quote:
Originally Posted by colucix
Code:
rsync -av --include=*/dir/file --exclude=dir/file . /tmp/test2
|
Thank you for your input colucix.
I'm afraid that it is not possible for me to add an --include for a specific file.
The command is used in a script whose purpose is to copy the whole hierarchy with a few exceptions.
The exceptions are dynamically put in a list just before invoking rsync with the --exclude-from option.
So it is possible for each file in the hierarchy to be excluded for a given run of the script.
The list is build with relative paths. I have a problem when ./dir/file is in the list. Any 'file' having a 'dir' parent is excluded.
I should have mentioned the context in my post. Sorry.