Differences
This shows you the differences between the selected revisions of the page.
2008-03-08 | 2008-03-08 | ||
matching subtree (martin) | fix subtree mask (martin) | ||
Line 21: | Line 21: | ||
All other characters are treated literally. | All other characters are treated literally. | ||
- | When the mask selects files and it makes sense to select them based on directory, you can extend the mask with a path mask. You should separate the path mask from the filename mask by a slash. For example mask ''/home/martinp/*.txt'' matches all text files within the directory, but not in subdirectories. To match all text files within subtree, use mask ''/home/martinp/*/*.txt''. | + | When the mask selects files and it makes sense to select them based on directory, you can extend the mask with a path mask. You should separate the path mask from the filename mask by a slash. For example mask ''/home/martinp/*.txt'' matches all text files within the directory, but not in subdirectories. To match all text files within subtree, use mask ''/home/martinp/*.txt; /home/martinp/*/*.txt''((Simpler, but less precise, form would be ''/home/martinp*/*.txt'')). |
For a relative path mask it makes no difference whether you use back (''\'') or forward slashes (''/''); the mask will always work for both local and remote paths. For example, the mask ''*/public_html/*.bak'' will match backup files both in ''D:\Documents\public_html'' and ''/home/martinp/public_html''. If you want to match directories only, add a slash at the end of the mask. | For a relative path mask it makes no difference whether you use back (''\'') or forward slashes (''/''); the mask will always work for both local and remote paths. For example, the mask ''*/public_html/*.bak'' will match backup files both in ''D:\Documents\public_html'' and ''/home/martinp/public_html''. If you want to match directories only, add a slash at the end of the mask. |