exclude all but specifice files in dir
Harry Putnam
reader at newsguy.com
Tue Feb 14 09:09:48 GMT 2006
How can I accomplish this:
Include
~/.kde*/some/deeper/path/bookmark.xml
But excldue all the other files under ~/.kde*
That is, I want only one file from this directory of dozens of files.
One of the examples given in man rsync appears to be about this
kind of problem:
One solution is to ask for all directories in
the hierarchy to be included by using a single rule: "+ */" (put it
somewhere before the "- *" rule). Another solution is to add specific
include rules for all the parent dirs that need to be visited. For
instance, this set of rules works fine:
+ /some/
+ /some/path/
+ /some/path/this-file-is-found
+ /file-also-included
- *
I come up with (in an exclude file)
+ /.kde*/
+ /.kde*/share/
+ /.kde*/share/apps/
+ /.kde*/share/apps/konqueror/
+ /.kde*/share/apps/konqueror/bookmarks.xml
- /.kde*
or
/.kde* # since it is already an exclude file
But this does not have the desired effect. I get a whole lot of files
under each subdirectory that I don't want.
More information about the rsync
mailing list