I am trying to find out if there is ways to convert a long list of
rsync exclude patterns, that I am maintaining for the purpose of making sensible backups, to an explicit list of file and directory names.
The application is that I am trying to use the same list (whenever I update it by adding or removing a pattern) for a different application (
mksquashfs). Both tools allow explicit file lists with one entry per line to be specified as exlude list, but the syntax for the patterns differs in details.
You may assume that the list to be converted consists of all kinds patterns, possibly including wildcards, allowed by
Two approaches are conceivable:
- Find out what
rsyncuses under the hook (it seems to be neither simple shell globbing nor
rsyncto produce the list by doing a
--dry-rundummy transfer with verbose output (here I am not sure how to have it print the names of the excluded files)