| Aspera Sync |
252
Globbing Extensions
Example
Matches
Does Not Match
/ at end of rule
abc/*/
abc/dir
abc/file
no / at end of rule
file
file
dir
/ at start of rule
/abc/def
/abc/def
.../abc/def
Filtering Examples
Filtering examples that demonstrate the effects of adding more filter rules to the command and show how to format a
filter rule file.
Note:
You can synchronize Windows, Linux, macOS, and other Unix-based endpoints and servers, but must take
care with path separators. The path separator "/" is supported on Windows and other platforms. The path separator "\"
is platform-agnostic
only
for the options
-d/r/L/R/B/b
and
--keep-dir-local/remote
. In Aspera Sync
filtering rules, however, "\" is exclusively a quoting operator and "/" is the only path separator recognized.
1.
Include files under top-level directories
Raw
and
Jpg
. Exclude all others.
# async ... --include='/Raw/**' --include='/Jpg/**' --exclude='*' \
--exclude='.*' ...
2.
Same as Example 1, except also include directories starting with ".", at any level.
# async ... --include='.*/' --include='/Raw/**' --include='/Jpg/**' \
--exclude='*' --exclude='.*' ...
3.
Same as Example 2, except exclude regular files ending in "~" or ".thm".
# async ... --include='.*/' --exclude='.*~' --exclude='*~' \
--exclude='.*.thm' --exclude='*.thm' --include='/Raw/**' \
--include='/Jpg/**' --exclude='*' --exclude='.*' ...
4.
Same as Example 3, except include only certain directories under Jpg.
# async ... --exclude='.*~' --exclude='*~' --exclude='.*.thm' \
--exclude='*.thm' --include='.*/' --include '/Raw/**' \
--include='/Jpg/Big/**' --include='/Jpg/Med/**' \
--exclude='*' --exclude='.*' ...
The long sequence in Example 4 can also be represented as a file:
# async ... --exclude-from=- <<EOF
# no regular files with ~ suffix, dot or otherwise:
.*~
*~
# similarly for ".thm" suffix files:
.*.thm
*.thm
# include directories starting with "."
+ .*/
# include everything else found under top-level Raw :
+ /Raw/**
# and under Big/ and Med/ in Jpg:
+ /Jpg/Big/**
+ /Jpg/Med/**
# but nothing else:
*
.*
EOF