Lftp is command line tool for Linux and Cygwin (Windows).
To install lftp info Cygwin you can use a guide where instead of rsync and openssh component choose lftp.
In GNU/Linux you can install lftp using package manager or download the source code from website. In both cases it is necessary to check whether the program lftp uses GnuTLS or OpenSSL library. This can be done using:
ldd `which /path_to_lftp/lftp`
Fragment of GnuTLS library output might look like:
linux-vdso.so.1 => (0x00007fff8bc97000) libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007fbd4866d000) ...
In case that lftp doesn't use OpenSSL nor GnuTLS than it is necessary to compile the program with one of the libraries.
Ostrava ftp.du4.cesnet.cz
Jihlava ftp.du5.cesnet.cz
To log in to ftp server we can use a command:
lftp ftp://username@server
After you sucessfully log in you can enter FTP commands:
cd <adresar> change the remote directory lcd <local_directory> change the local directory get [OPTS] <remote_files> [-o <local_file>] download remote file mget [OPTS] <remote_files> download remote files mkdir [-p] <dirs> create directory on the server ls [<args>] list directory on the remote server put [OPTS] <local_file> [-o <remote_file>] send local file on server mput [OPTS] <local_files> send local files on the server mirror -R <local_directory> send entire directory including file on the server mv <remote_file1> <remote_file2> move remote file into different one. In you are moving file within one directory you are actualy renaming the file. rmdir [-f] <remote_directory> delete remote directory
Other available commands can be determined by:
help
ln -s /usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt /etc/ssl/certs/AddTrust_External_Root.pem
Then you must add the following lines to the file /etc/lftp.conf:
set ssl:check-hostname yes
set ssl:verify-certificate yes
set ssl:ca-file “path to your bundle certificate”
FTP protocol in generally doesn't support transferring time of files (timestamps). But if you use the lftp
client against out data storage servers, you can enable this feature in the configuration file /etc/lftp.conf
:
set ftp:use-mdtm-overloaded yes