|
From: Matthew Lincoln on 7 May 2008 01:57 As I learned from the man page of rsync I can exclude a certain directory (trees) by using the --exclude option like in rsync .... --exclude=/proc .... But how do I exclude multiple directory (trees) at once in such a rsync command? The following does not work: rsync .... --exclude=/proc||/var||/dummy .... Same with "&&" instead of "||" Matthew
From: Chris Davies on 7 May 2008 04:42 In comp.os.linux.misc Matthew Lincoln <kmlincoln100(a)hotmail.com> wrote: > As I learned from the man page of rsync I can exclude a certain > directory (trees) by using the --exclude option like in > rsync .... --exclude=/proc .... > But how do I exclude multiple directory (trees) at once in such a > rsync command? You get good marks for reading the man page. (You'd be amazed how many people don't even bother to try...) I think the bit you missed is this: Note also that the --filter, --include, and --exclude options take one rule/pattern each. To add multiple ones, you can repeat the options on the command-line [...] Personally, I don't find the interaction between the --include/--exclude directives particularly intuitive. If it's simply a case of "exclude this and that", then you should be fine. However, as soon as I wanted to "include this but exclude that", I ended up taking some of the working examples (from the man page) and tweaking them until I got something that worked. Chris
|
Pages: 1 Prev: Real mode BIOS call in x86_64 Linux environment Next: Slow parallel cluster submission node |