Lftp
lftp - ftp cli client app
Support a number of network protocols (ftp, http, sftp, fish, torrent). Like BASH, it has job control and uses the readline library for input. It has bookmarks, a built-in mirror command, and can transfer several files in parallel.
1# Connect to the remote host
2lftp ftp://ftp.myftphost.com
3
4# After running the command, if the connection is successful, you will se lftp prompt:
5lftp ftp.myftphost.com:~>
6
7# than you can run
8lftp ftp.remotehost.com:~> login ourusername
9Password:
10
11# to easily authenticate, we can add a bookmark. If you already running lftp, runn command
12bookmark add portfoliohost lftp ftp.remotehost.com:~> ftp://username:password@ftp.remotehost.com
13
14# download and upload a file named file.txt from the FTP server to local machine
15lftp ftp.remotehost.com:~> pget file.txt
16lftp ftp.remotehost.com:~> put file.txt
17
18# use the mirror command to download the whole directory from the FTP server
19lftp ftp.remotehost.com:~> mirror /www
20
21# upload a directory to the FTP server
22lftp ftp.remotehost.com:~> mirror -R /www/html