Questions tagged [lftp]

lftp is a file transfer program that supports several network protocols.

lftp is a file transfer program that can handle several network protocols, such as FTP, FTPS, HTTP, HTTPS, HFTP, FISH, SFTP and file. Its man page details usage.

It originated as part of ftpclass, but was renamed to lftp in 1997. More at the Wikipedia page for lftp.

49 questions
7
votes
1 answer

How to enable lftp protocol logging?

We are trying to get lftp to log all its protocol commands (during the login). I see several verbose options in the man page but the all have to do with a specific command issued after logging in (like: queue, or mirror). Is there a way to enabled…
jcalfee314
  • 745
  • 3
  • 9
  • 23
4
votes
0 answers

Resuming segmented file transfer

When I run an lftp command like this: mirror --use-pget-n=10 "My Directory" sometimes I find myself in a situation, that the computer was unexpectedly shutdown, say, during a blackout. After that, if I examine my local folder "My Directory" I…
Andrew Savinykh
  • 1,935
  • 3
  • 29
  • 31
3
votes
3 answers

Does LFTP support keepalive for FTP/SFTP?

In the documentation it's not clear whether lftp support keepalive for FTP and SFTP protocols. Does someone know the answer?
Gill Bates
  • 165
  • 1
  • 1
  • 11
3
votes
1 answer

How to disable Lftp chmod permissions warning?

I use this script (launching lftp with some options) to mirror a local folder and a website. #!/bin/bash HOST="myhost.com" USER="user" PASS="xxxxxx" lftp -c "set ftp:list-options -a; set cmd:fail-exit yes; open ftp://$USER:$PASS@$HOST; lcd…
ppr
  • 143
  • 1
  • 12
3
votes
0 answers

lftp mirror -I and mirror -i don't work

I am using the following command lines to mirror a remote server to my local directory: $ lftp -d -c 'open -e "mirror -i ^ABC . mirrordir/" http://ftp.abc.com/dir1/dir2' $ lftp -d -c 'open -e "mirror -I ABC*/ . mirrordir/…
Ankur Agarwal
  • 349
  • 6
  • 14
3
votes
1 answer

lftp: bash equivalent of command substitution backticks or $()

Is it possible to use bash-like command substitution, like backticks `` or $() with lftp? This is to e.g. cd into a directory given by a command: lftp .. cd `pwd`
gauteh
  • 133
  • 3
2
votes
1 answer

lftp how to upload everything new inside a folder but not the folder itself

I have this script in the a Pipeline: lftp -c " set ftp:ssl-force true; set ssl:verify-certificate false; open -u $FTP_USER,$FTP_PASS $FTP_HOST; cd remote-folder; mirror -R -e -v -n ./dist ./; " It's working, but I don't wish to upload…
2
votes
1 answer

Specify key exchange protocol with lftp

I have to download some (large) data from a distant server. The remote IT people suggest using lftp sftp://user@server.domain:port. However, when I type ls, I read: `ls' at 0 [Unable to negotiate with XXX.XXX.XXX.XXX port PPP: no matching key…
user980053
  • 223
  • 1
  • 2
  • 6
2
votes
1 answer

How do I specify an MVS data set name when using lftp?

We have a Linux server that needs to send a file to a z/OS mainframe using FTPS. How do we specify the MVS data set name we want to create? When we try to FTP the file, it always prepends the mainframe user ID to the data set name.
Matt
  • 21
  • 2
2
votes
1 answer

Add time offset for mirroring via lftp

I am working on a CI runner in GitLab which is supposed to transfer changed files via FTP to a development environment. lftp seemed to be a good solution for doing so as it's easy to use and not overly complicated. I am using this to transfer files:…
flomei
  • 121
  • 5
2
votes
0 answers

lftp miror does not remove extra files

I'm trying to mirror remote ftp to local dir: lftp -u 'user','pass' -e 'mirror -vv ./wp-content ./ && ex' sftp://x.x.x.x -p 22 Old file `cache/index-https-mobile.html' is not removed Old directory `cache/w-r' is not removed The local user is…
Putnik
  • 912
  • 1
  • 6
  • 16
2
votes
0 answers

Retrieving from ftp dirs with wildcards

What is the most efficient way to retrieve all relevant data from ftp if the address of said data can be specified with wildcards as below: ftp://ftp.some.site.gov/data/directory/only/*/these/*/*files.gz
5heikki
  • 121
  • 3
1
vote
2 answers

How do I attach running lftp process

I have lftp process running for days at a time on a CentOS machine. I read the lftp man pages and discovered the attach command. However when I call it with the respective process id from the lftp shell I get Unknown command "attach". Any…
cathal
  • 11
  • 1
1
vote
1 answer

How can I permanently disable directory caching in lftp?

I attempted to configure my $HOME/.lftp.rc to permanently disable directory caching (it has a nasty habit of never bloody updating). https://raw.githubusercontent.com/mcandre/dotfiles/master/.lftp.rc But no matter how I try to write this…
mcandre
  • 3,026
  • 5
  • 39
  • 61
1
vote
0 answers

lftp mirror mode over hftp/proxy not working

When I connect lftp over an http proxy using hftp and try to use mirror mode, no files are transferred. dir and get work fine. Mirror mode works fine when I connect directly. Here is the script I use to connect with identifying info removed: debug…
frankc
  • 301
  • 3
  • 13
1
2 3 4