Transferring from the Command Line |
Examples of initiating fasp file transfers using the ascp command.
This topic demonstrates the ascp command with the following examples:
Transfer with fair rate policy, with maximum rate 100 Mbps and minimum at 1 Mbps:
> ascp -T --policy=fair -l 100m -m 1m /local-dir/files root@10.0.0.2:/remote-dir
Transfer all files in \local-dir\files to 10.0.0.2 with target rate 100 Mbps and encryption OFF:
> ascp -T -l 100m /local-dir/files root@10.0.0.2:/remote-dir
To perform a transfer with UDP port 42000:
> ascp -l 100m -O 42000 /local-dir/files user@10.0.0.2:/remote-dir
To perform a transfer with public key authentication with key file /Documents and Settings/asp1/.ssh/asp1:
> ascp -T -l 10m -i "/Documents and Settings/asp1/.ssh/asp1" local-dir/files root@10.0.0.2:/remote-dir
Enclose the target in double-quotes when spaces are present in the username and remote path:
> ascp -l 100m local-dir/files "User Name@10.0.0.2:/remote directory"
Send files to a network shares location \\1.2.3.4\nw-share-dir, through the computer 10.0.0.2:
> ascp local-dir/files root@10.0.0.2:"//1.2.3.4/nw-share-dir/"
Use parallel transfer on a dual-core system, together transferring at the rate 200Mbps, using UDP ports 33001 and 33002. Two commands are executed in different Terminal windows:
> ascp -C 1:2 -O 33001 -l 100m /file root@10.0.0.2:/remote-dir & > ascp -C 2:2 -O 33002 -l 100m /file root@10.0.0.2:/remote-dir
Upload the file space\file to the server 10.0.0.2 with password protection (password: secRet):
> set ASPERA_SCP_FILEPASS=secRet&& ascp -l 10m --file-crypt=encrypt local-dir/file root@10.0.0.2:/remote-dir/
Download from the server 10.0.0.2 and decrypt while transferring:
> set ASPERA_SCP_FILEPASS=secRet&& ascp -l 10m --file-crypt=decrypt root@10.0.0.2:/remote-dir /local-dir
If the password-protected file is downloaded without descrypting (file1.aspera-env, with aspera-env appended), on the local computer, decrypt the file as file1:
> set ASPERA_SCP_FILEPASS=secRet&& asunprotect -o file1 file1.aspera-env