FTP file upload using cURL
FTP
upload
curl
It is very easy to upload files to FTP using cURL. I am using the command to send backup files from my web server to a backup server.
The following command will upload a file to a specific remote folder:
# curl -T backup-file.tar.gz ftp://username:password@ftp.server.com/backup/
If you need to use a different destination filename just add it at the end of the FTP URL:
# curl -T backup-file.tar.gz ftp://username:password@ftp.server.com/backup/backup.tar.gz
References
- cURL Website