lftp
is a sophisticated file transfer program with a command-line interface. It supports FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols. Here are some of the most commonly used parameters:
-c
: Executes the given commands and exits. The commands are executed in the order they appear.-p
: Specifies the port number to connect to.-u
: Specifies the username and password to use when connecting.-e
: Executes the command after connecting.-d
: Enables debugging output.open
: Connects to the given server.mirror
: Mirrors files and directories between local and remote locations. It has its own set of options:-R
: Mirrors files from local to remote.-e
: Deletes files in the destination that don’t exist in the source.-v
: Enables verbose output.--ignore-time
: Ignores time when deciding whether to upload a file.--parallel=n
: Uploadsn
files in parallel.--exclude-glob pattern
: Excludes files that match the given pattern.--no-perms
: Does not set file permissions to match the source files when mirroring.--only-newer
: Only transfers files that are newer on the source side.
get
: Downloads the specified file.put
: Uploads the specified file.cd
: Changes the current directory on the remote server.lcd
: Changes the current directory on the local machine.ls
: Lists files in the current directory on the remote server.lls
: Lists files in the current directory on the local machine.mget
: Downloads multiple files.mput
: Uploads multiple files.set
: Sets various options, such asftp:ssl-allow no
, which disables SSL for FTP.