File transfer program with more features than ftp. The lftp command allows FTP and HTTP protocol transfers, plus other protocols including FISH (SSH based), FTPS, and HTTPS. It uses a shell-like command interface and offers job control in a manner similar to bash. lftp has two important reliability features: it resumes failed or interrupted transactions, and it goes into the background automatically if it is quit in the middle of a file transfer.
Run in debug mode.
Start, execute the specified commands, and then wait for further instructions.
Connect to the specified port number.
Login to the server with the username (and, optionally, password) you specify.
Run the specified script file of lftp commands, then exit.
Run the commands specified, then exit.
The lftp commands are similar to those for ftp. However, lftp lacks or uses different mechanisms for a number of commands, including $, ascii, binary, case, and macdef. It also adds the following:
alias [name [value] ]
Create an alias for a command. For example, you could set dir to be an alias for ls -lf.
Set the username to anonymous. This is the default username.
Execute a command at a given time, as with the at command in an actual shell.
The lftp bookmark command used with the following arguments will add, delete, edit, import, or list bookmarks, respectively:
Work with the local memory cache. This command should be followed by the arguments:
Display the status for the cache.
Turn caching on or off.
Empty the cache.
Set the maximum size for the cache. Setting it to -1 means unlimited.
Set the cache to expire after n units of time. You can set the unit to seconds (s), minutes (m), hours (h), or days (d). For example, for a cache that expires after an hour, use the syntax cache expire 1h.
Where the ftp version of this command just stops all sessions, this version closes idle connections with the current server. If you have connections to multiple servers and wish to close all idle connections, add the -a flag.
command cmd args
Execute the specified lftp command, with the specified arguments, ignoring any aliases created with the alias command.
mirror [options] [remotedir [localdir] ]
Copy a directory exactly. The mirror command accepts the following arguments:
If mirroring was interrupted, resume it.
Delete local files that are not present at the remote site.
Keep the suid/sgid bits as set on the remote site.
Get only those files from the remote site that have more recent dates than the files on the local system. Cannot be used with the -c argument.
Do not get any subdirectories.
Do not use umask when getting file modes. See umask for more information about file modes.
Mirror files from the local system to the remote system. With this argument, make sure that you specify the local directory first and the remote directory second. If you do not specify both directories, the second is assumed to be the same as the first. If you choose neither, the operation occurs in the current working directories.
When mirroring a link, download the file the link points to rather than just the link.
-N, --newer-than filename
Get all files newer than the file filename.
Download n files in parallel.
-i, --include regex
Get only the files whose names match the regular expression regex. See grep for more information about regular expressions.
-x, --exclude regex
Do not get the files whose names match regex. See grep for more information about regular expressions.
-t, time-prec n
Set the precision of time measurement for file comparison; if file dates differ by amounts less than n, they are assumed to be the same. You can specify n in seconds (s), minutes (m), hours (h), or days (d).
-T, --loose-time-prec n
Set the precision for loose time comparisons. You can specify n in seconds (s), minutes (m), hours (h), or days (d).
Set the verbose level. You can set n from 0 (no output) to 3 (full output) using a number or by repeating the v. For example, -vvv is level 3 verbose mode.
Use the cache to get directory listings.
Move, rather than copy, files when mirroring.
set [setting | value]
Set one of the preference variables for lftp. If run without arguments, list the variables that have been changed; without arguments and with the -a or -d flags, list all values or default values, respectively.
See the lftp manpage for a complete list of preference variables that can be set.
wait [n | all]
Wait for the job or jobs you specify by number, or all jobs, to terminate.