| ascp: Transferring from the Command Line with Ascp |
125
• Upload two files,
myfile1
and
myfile2
, to the named pipe
/tmp/mypipe
(streaming output) on the server
at 10.0.0.2. Transfer at 100 Mbps.
ascp -l 100m --mode=send --user=
username
--host=10.0.0.2 myfile1 myfile2
stdio-tar:////tmp/mypipe
This sends an encoded stream of
myfile1
and
myfile2
(with the format of
sourcefile
in the upload
example) to the pipe
/tmp/mypipe
. If
/tmp/mypipe
does not exist, it is created.
• Download the files from the previous example from 10.0.0.2 to stdout. Transfer at 100 Mbps.
ascp -l 100m --mode=recv --user=
username
--host=10.0.0.2 myfile1 myfile2
stdio-tar://
Standard output receives data identical to
sourcefile
in the upload example.
• Download
/tmp/myfile1
and
/tmp/myfile2
to stdout by using a persistent session. Start the persistent
session, which listens on management port 12345:
ascp -l 100m --mode=recv --keepalive -M 12345 --user=
username
--
host=10.0.0.2 stdio-tar://
Send the following in through management port 12345:
FASPMGR 2
Type: START
Source: /tmp/myfile1
Destination: mynewfile1
FASPMGR 2
Type: START
Source: /tmp/myfile2
Destination: mynewfile2
FASPMGR 2
Type: DONE
The destination must be a filename; file paths are not supported.
Standard out receives the transferred data with the following syntax:
File: mynewfile1
Size:
file_size
mynewfile1_data
File: mynewfile2
Size:
file_size
mynewfile2_data
• Upload two files,
myfile1
and
myfile2
, to named pipe
/tmp/mypipe
on the server at 10.0.0.2. Transfer at
100 Mbps.
ascp -l 100m --mode=send --user=
username
--host=10.0.0.2 myfile1 myfile2
stdio-tar:////tmp/mypipe
If file
/tmp/mypipe
does not exist, it is created.
• Upload two files,
myfile1
(1025 bytes) and
myfile2
(20 bytes) from stdio and regenerate the stream on the
destination to send out through the named pipe
/tmp/mypipe
on the server at 10.0.0.2. Transfer at 100 Mbps.
cat sourcefile | ascp -l 100m --mode=send --user=
username
--host=10.0.0.2
stdio-tar:// stdio-tar:////tmp/pipe