include/exclude tutorial

Imbaud Pierre pierre.imbaud at gmail.com
Wed Apr 1 10:05:52 GMT 2009


Finally, I succeeded; with a --exclude-from= pointing to a file containing:

+ /tmp
+ /tmp/*.conf
- *

Lessons:

- when U want only a few files, first include these files, then exclude 
everything else
- include directories too.
- run the command without exclude-from, to spot where root is located: 
in my case, etc was part of the root, which I didnt take into account.
- '- *' excludes directories too

But well, Im still unhappy.

When we read a program, written for a von-neuman machine (I mean: one 
processor, one process, one thread), we have a way to foresee what it 
does: in the head, or with paper or a board if too intricate, run the 
program "by hand", step by step, as if single stepping with a debugger.
I think we need here a method to represent how the files flow is 
processed by rules.

Imbaud Pierre wrote:
> Maybe I am tired. I have been reading man page, and these messages, and 
> the website, I just dont understand how include/exclude works.
> 
> Is there a decent tutorial on the subject, I missed, for some reason?
> 
> all I want is to take /var/tmp/*.conf files. I dont want to recurse down 
> thru directories (but, for reasons hard to explain, I must have the 
> recursive option on)
> 
> Reminds me when I tried to understand the find -prune option. I never 
> succeeded.
> 
> Or should I proceed empirically, preparing directories, and trying 
> combination?
> 
> And please tell me, those who master the include/exclude technique: how 
> long did it take to reach full understanding?
> 



More information about the rsync mailing list