- 15 Views
- 29/08/2025
How to download file using lftp
lftp is a command-line FTP/HTTP client for Unix-like systems (Linux, BSD, macOS, etc.).
It’s like the traditional ftp command, but much more powerful and scriptable.
1. Install lftp (if not installed)
On most Linux distributions:
sudo yum install lftp # CentOS/RHEL
sudo dnf install lftp # Fedora
2. Connect to the FTP server
Replace
usernameandpasswordwith your FTP login.If the server allows anonymous FTP, you can connect with:
3. Navigate and download files
Once connected, you’ll get an lftp shell similar to this:
Change directory on server:
List files:
Download a single file:
Download and resume (if interrupted):
Download multiple files:
4. Download directories
If you want a full folder (recursively):
Examples:
Mirror everything into current local directory:
- Mirror with resume and verbose mode:
Mirror only newer files:
5. Run in one command (non-interactive)
If you don’t want to open an interactive session:
Or mirror a folder directly:
Thanks for vist my website
