3.6. Pathnames and Globbing

Globbing (or regular expression matching) is when you modify the directory path using wild cards to include a group of files or subdirectories. File resources can be specified with a globbing syntax similar to that used by popular shells, such as csh, bash, and zsh.

*

Substitutes for any number of characters, except /.

Example: An arbitrary number of path elements, including entire directories.

**

Substitutes for any number of characters, including /.

Example: an arbitrary number of path elements, including entire directories.

?

Substitutes for any single character, except /.

[abc]

Substitutes for the single character a, b, or c

Example: a rule that matches /home[01]/*/.plan allows a program to access .plan files for users in both /home0 and /home1.

[a-c]

Substitutes for the single character a, b, or c.

{ab,cd}

Expand to one rule to match ab and one rule to match cd.

Example: A rule that matches /{usr,www}/pages/** to grant access to Web pages in both /usr/pages and /www/pages.