FTP file upload using CURL

The command is very very simple: just type
curl -T localfile.ext ftp://username:[email protected]/remotedir/

If you want to use a different destination filename just add it at the end:
curl -T localfile.ext ftp://username:[email protected]/remotedir/remotefile.zip



Posted

in

by

Tags:

Comments

3 responses to “FTP file upload using CURL”

  1. ssciboz Avatar
    ssciboz

    And for a full folder ?

  2. seravee Avatar
    seravee

    You can use this instead:

    find /server/ -exec curl -T {} ftp://some-ftp-site/folder/ –user user:pass \;

    1. Manuel Gomes Avatar

      A good alternative also is to use rclone: https://rclone.org/ – one of the available targets (among many) is FTP

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from try {} except

Subscribe now to keep reading and get access to the full archive.

Continue reading