Exclusions
The -X or ExcludePath option allows you to specify certain path patterns to be ignored by syncdat. You may specify multiple exclusions on the command line and in the configuration file.
Function
Each exclusion will be matched against the relative path of both local and remote files and directories. The relative path is the portion below the top level folder of each side.
If you wish to specify many exclusions, consider placing them in a separate configuration file which you can reference with the -f option.
Ignored items will not be copied or deleted. If a folder is ignored, all of its contents will also be ignored but those contents will not contribute to the count of ignored items. Exclusions are applied after scanning and will not reduce the time it takes to scan. Specifying a large number of exclusions may increase the time it takes to compare the two folders.
Syntax
The wildcard character * may be used before and after a string to match path prefixes, suffixes, or substrings. Forward slashes should be used for directory delimiters and will be adjusted appropriately on Windows systems.
In unix shell environments, the * character must be quoted or escaped on the command line to avoid shell globbing.
The following patterns are accepted:
string | Exact | Relative paths must match the exact string. |
*string | Suffix | Matches all paths ending in string. |
string* | Prefix | Matches all paths beginning with string. |
*string* | Contains | Matches all paths containing string. |
For example, the following command will ignore all files or folders ending in ".dat".
syncdat -l -X "*.dat" localpath username@example.com:remotepath
Any additional * characters will be matched literally.
See Also
The IncludePattern option has more sophisticated syntax and is applied to only the base name of files and symbolic links.