Examples of bottom up include-exclude processing

These examples illustrate the concept of bottom up include-exclude processing.

Example 1:

Assume that /home is defined as the domain, and you defined the following include-exclude statements:
exclude *.obj
include /home/foo/.../*.obj
exclude /home/foo/junk/*.obj

In this example, the file that the client is processing is /home/foo/dev/test.obj. The client follows these steps:

  1. Checks statement 3 (the last include or exclude statement defined) first because of bottom up processing. The file /home/foo/junk/*.obj does not match the file name that is being processed.
  2. Moves to Statement 2 and checks it. This time, file /home/foo/.../*.obj matches the file name that is being processed. The client stops processing, checks the option, and it is include.
  3. Backs up /home/foo/dev/test.obj

Example 2:

Assume that /home is defined as the domain, and you defined the following include-exclude statements:
exclude *.obj
include /home/foo/.../*.obj
exclude /home/foo/junk/*.obj

In this example, the file that the client is processing is /home/widg/copyit.bat. The client follows these steps:

  1. Checks statement 3 and finds no match.
  2. Checks statement 2 and finds no match.
  3. Checks statement 1 and finds no match.
  4. Because the client found no match, the file /home/widg/copyit.bat is implicitly included and backed up.

Example 3:

Assume that /home is defined as the domain, and you defined the following include-exclude statements:
exclude /.../*.obj
include /home/foo/.../*.obj
exclude /home/foo/junk/*.obj

In this example, the file that the client is processing is /home/lib/objs/printf.obj. The client follows these steps:

  1. Checks statement 3 and finds no match.
  2. Checks statement 2 and finds no match.
  3. Checks statement 1 and finds a match.
  4. Stops processing, checks the option, and it is exclude.
  5. Does not back up file /home/lib/objs/printf.obj.

Example 4:

Assume that you defined the following statements for the include and exclude options:
exclude.attribute.symlink /.../*
exclude /.../*.o
inlcude /home/foo/.../*.o
exclude /home/foo/junk/*.o

The current file that is being processed is /home/lib/objs/printf.o. The client follows these steps:

  1. Checks the exclude.attribute.symlink statement first. If printf.o is a symbolic link, it will be excluded. If printf.o is not a symbolic link, the client proceeds to the next step. Note that the exclude.attribute statements are always processed before the other include-exclude statements, regardless of their position on the list.
  2. Checks statement 4 and finds no match.
  3. Checks statement 3 and finds no match.
  4. Checks statement 2 and finds a match.
  5. Stops processing, checks the option, and it is exclude.
  6. Does not back up file /home/lib/objs/printf.o.
Related concepts:
Client domain