Will Tang
Will Tang

Reputation: 1085

How to use linux shell command to upload entire directory to ftp server?

I'm writing continuous integration script for Android,once the build task finished, I want to use a shell script to upload the entire output directory to ftp server.

I wonder is there has shell command like ftp or curl can do this, I searched a lots on the Google, but nothing found. Can anyone give me a favor? Thanks a lot.

Upvotes: 0

Views: 1257

Answers (1)

Mark Setchell
Mark Setchell

Reputation: 208107

Looks like a job for lftp like this:

lftp -u login,passwd -e "mirror --reverse /my/from/dir/ /ftp/target/dir/" <ftp.server>

Upvotes: 1

Related Questions