2020-07-12 14:59:45 +01:00
|
|
|
# lftp
|
|
|
|
|
|
|
|
> Sophisticated file transfer program.
|
2021-04-16 15:42:14 +01:00
|
|
|
> More information: <https://lftp.yar.ru/lftp-man.html>.
|
2020-07-12 14:59:45 +01:00
|
|
|
|
|
|
|
- Connect to an FTP server:
|
|
|
|
|
2023-02-19 11:17:20 +00:00
|
|
|
`lftp --user {{username}} {{ftp.example.com}}`
|
2020-07-12 14:59:45 +01:00
|
|
|
|
|
|
|
- Download multiple files (glob expression):
|
|
|
|
|
|
|
|
`mget {{path/to/*.png}}`
|
|
|
|
|
|
|
|
- Upload multiple files (glob expression):
|
|
|
|
|
|
|
|
`mput {{path/to/*.zip}}`
|
|
|
|
|
|
|
|
- Delete multiple files on the remote server:
|
|
|
|
|
|
|
|
`mrm {{path/to/*.txt}}`
|
|
|
|
|
|
|
|
- Rename a file on the remote server:
|
|
|
|
|
|
|
|
`mv {{original_filename}} {{new_filename}}`
|
|
|
|
|
|
|
|
- Download or update an entire directory:
|
|
|
|
|
|
|
|
`mirror {{path/to/remote_dir}} {{path/to/local_output_dir}}`
|
|
|
|
|
|
|
|
- Upload or update an entire directory:
|
|
|
|
|
|
|
|
`mirror -R {{path/to/local_dir}} {{path/to/remote_output_dir}}`
|