I want to only match wildcard folders but not wildcard files. **/*cache or even **cache works for folders prepended with cache
but **/*cache*/ doesn’t work to match only folders because the trailing / is ignored
Is there anyway to get around this?
Reference
From Documentation https://restic.readthedocs.io/en/latest/040_backup.html
A trailing / is ignored, a leading / anchors the pattern at the root directory. This means, /bin matches /bin/bash but does not match /usr/bin/restic.
I want to only match wildcard folders but not wildcard files.
Can you help summarize your findings, if it helped anything towards your question?
Do I observe correctly that since there are 8 folders in your example tree, all green exclude combinations would work for you?
My initial concern was how long it would take to run a backup. My perspective is that backup time is directly correlated with how many files that have to be processed when the files are small. When the files are large that may be the limiting factor. I seem to have a lot of small files in directories like node_module directories and wanted to limit that. The green ones are what I wanted to see. I overwhelmed the excluded folders because I wanted to see how many of those directories were getting scanned completely.
The surprising one to me was T:\** as a prefix. T:\**excluded* seems to process all the files in the following, even though I would expect it completely safe to skip them because ** is any path:
folder/excluded
folder/folder/excluded
Limitations:
My provided folder structure might not be complete enough as I made it for one purpose.
That pattern is nonsensically. ** must be enclosed between directory separators or it won’t work. So you’re pattern is probably equivalent to T:\*excluded* (* does NOT match directory separators). Based on your example paths you actually wanted T:\**\excluded* (whatever that trailing * is supposed to match).