lftp allow you to upload all files and sub folders using single command. With normal ftp command, you need to use put/mput command many times to do the same.
To download all files from FTP server, use “mirror” command. mirror command also allow you to upload files to remote server by specifying -R (reverse mirror) option.
This is very useful for uploading files from SSH shell account.
For help, use ? in lftp command prompt. To get help for specific command use
help
Exampe
help mirror
To upload all files from local folder to remote server, run
lftp -d -u FTP_USER,FTP_PASSWORD FTP_SERVER_IP set ftp:ssl-allow no mirror -R /var/flashwebhost/vshare2.7/ public_html
Following will upload vshare2.7 folder to FTP root folder.
unzip vshare2.7.zip lftp -d -u FTP_USER FTP_SERVER_IP set ftp:ssl-allow no mirror -R vshare2.7
See lftp
Leave a Reply