| ascp: Transferring from the Command Line with Ascp |
124
Size:
file_size
file 2 data
...
To download one or more files to stdout, set the destination as
stdio-tar://
. Normal status output to stdout is
suppressed during downloads because the transfer output is streamed to stdout. The data sent to stdout has the same
encoding as described for uploads.
To download to a named pipe, set the destination to
stdio-tar:////
path
, where
path
is the path of the named
pipe.
When an offset is specified, the bytes that are sent replace the existing bytes in the destination file (if it exists). The
bytes added to the destination file can extend beyond the current file size. If no offset is set, the bytes overwrite the
file if overwrite conditions are met.
Restrictions:
• When downloading to
stdio-tar://
, the source list must consist of individual files only. Directories are not
allowed.
• Only
--overwrite=always
or
--overwrite=never
are supported with
stdio-tar://
. The behavior
of
--overwrite=diff
and
--overwrite=diff+older
is undefined.
• Offsets are only supported if the destination files are located in the native file system. Offsets are not supported for
cloud destinations.
Multi-file Transfer Examples:
• Upload two files,
myfile1
(1025 bytes) and
myfile2
(20 bytes), to
/remote-dir
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:// /remote-dir
Where
sourcefile
contains the following:
File: myfile1
Size: 1025
<< 1025 bytes of data>>
File: myfile2
Size: 20
<<20 bytes of data>>
• Uploading multiple files from stdin by using a persistent session is the same as a non-persistent session.
• Update bytes 10-19 in file
/remote-dir/myfile1
on the server at 10.0.0.2 at 100 Mbps.
cat sourcefile | ascp -l 100m --mode=send --user=
username
--host=10.0.0.2
stdio-tar:// /remote-dir
Where
sourcefile
contains the following:
File: myfile1
Size: 10
Offset: 10
<< 10 bytes of data>>