| ascp: Transferring from the Command Line with Ascp |
129
Wildcard
Example
Matches
Does Not Match
/**
at end of rule
abc/**
abc/.file abc/d/e/ abc/
/
at end of rule
abc/*/
abc/dir
abc/file
no
/
at end of rule
abc
abc
(file)
abc/
/
at start of rule
/abc/def
/abc/def
xyz/abc/def
Testing Your Filter Rules
If you plan to use filtering rules, it's best to test them first. An easy way to test filtering rules, or to learn how they
work, is to set up source and destination directories and use
demo.asperasoft.com
as the Aspera server:
1.
On your computer, create a set of directories and files (size can be small) that approximate a typical transfer file
set. In the following example, the file set is in
/tmp/src
.
2.
Upload the file set to the Aspera demo server (demo.asperasoft.com) with the following command:
# ascp /tmp/src [email protected]:Upload/
Where the user is "aspera" and the target is the
Upload
directory. At the prompt, enter the password
"demoaspera".
3.
Create a destination directory on your computer, for example
/tmp/dest
.
4.
Download your files from the demo server to
/tmp/dest
to test your filtering rules. For example:
# ascp -N 'wxy/**' -E 'def' [email protected]:Upload/src/ /tmp/dest
5.
Compare the destination directory with the source to determine if the filter behaved as expected.
$ diff -r dest/ src/
The
diff
output shows the missing files and directories (those that were not transferred).
Example Filter Rules
The example rules below are based on running a command such as the following to download a directory
AAA
from
demo.asperasoft.com
to
/tmp/dest
:
# ascp
rules
[email protected]:Upload/AAA /tmp/dest
The examples below use the following file set:
AAA/abc/def
AAA/abc/.def
AAA/abc/.wxy/def
AAA/abc/wxy/def
AAA/abc/wxy/.def
AAA/abc/wxy/tuv/def
AAA/abc/xyz/def/wxy
AAA/wxyfile
AAA/wxy/xyx/
AAA/wxy/xyxfile
Key for interpreting example results below:
< xxx/yyy
= Excluded
xxx/yyy
= Included
zzz/
= directory name
zzz
= filename