lftp: command not found

“lftp” is a free, open-source, and cross-platform command-line file transfer program. It supports various protocols such as FTP, HTTP, SFTP, and others, making it a versatile tool for transferring files over the network.

Some of the key features of lftp include:

  • Multi-threaded transfer: lftp can transfer multiple files at the same time, resulting in faster transfer speeds.
  • Resume support: lftp can resume broken transfers, allowing users to pick up where they left off.
  • Mirroring: lftp supports mirroring directories and can be used to keep local and remote directories in sync.
  • Scripting: lftp can be controlled through shell scripts, allowing users to automate complex transfer tasks.

Overall, lftp is a powerful and sophisticated file transfer program that offers advanced features for managing and transferring files over the network. It is widely used by system administrators and other users who need a robust and efficient tool for transferring large amounts of data.

If you encounter the below error while running the command lftp:

lftp: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install lftp
Ubuntu apt-get install lftp
Alpine apk add lftp
Arch Linux pacman -S lftp
Kali Linux apt-get install lftp
CentOS yum install lftp
Fedora dnf install lftp
OS X brew install lftp
Raspbian apt-get install lftp

lftp Command Examples

1. Connect to an FTP server:

# lftp ftp.example.com

2. Download multiple files (glob expression):

# mget path/to/*.png

3. Upload multiple files (glob expression):

# mput path/to/*.zip

4. Delete multiple files on the remote server:

# mrm path/to/*.txt

5. Rename a file on the remote server:

# mv original_filename new_filename

6. Download or update an entire directory:

# mirror path/to/remote_dir path/to/local_output_dir

7. Upload or update an entire directory:

# mirror -R path/to/local_dir path/to/remote_output_dir
Related Post