Questions tagged [lftp]

lftp is a command-line file transfer program for UNIX and Unix-like systems. It started as a FTP client but it also supports FTPS, HTTP, HTTPS, HFTP, FISH, and SFTP. The program also supports FXP and simple BitTorrent protocol support.

lftp(1) is a file transfer program that allows sophisticated transfer of multiple protocols such as FTP, FTPS, HTTP, HTTPS, HFTP, FISH, SFTP, FXP and BitTorrent. Like bash it has job control and uses the readline library for input.

It has bookmarks, a built-in mirror command, and can transfer several files in parallel. It was designed with reliability in mind. LFTP is free software, distributed under the GNU GPL license.

A complete list of features can be found here, and a more detailed description of the software here.

82 questions
32
votes
3 answers

lftp: login, put file in remote dir and exit in a single command: proper quoting help

I want to use lftp -c to do an entire session in one go (as I'll be launching this from a script later on) and I managed with -e but that ofc leaves me with the interactive session which I don't want. Manual states -c commands Execute the…
Recct
  • 647
  • 3
  • 8
  • 15
9
votes
4 answers

Using lftp with ssh-agent

I have a script that logs into sftp server eval `ssh-agent -s` ssh-add /home//.ssh/id_rsa sftp @ This works, but I would like to get only files that are newer than certain date. This doesn't seem to be possible with…
sjk
  • 193
  • 1
  • 1
  • 3
8
votes
2 answers

lftp exclude syntax confusion

I am confused with the syntax description given for lftp from their website: -x RX, --exclude=RX exclude matching files -X GP, --exclude-glob=GP exclude matching files How exactly do I exclude certain files during mirroring…
user50390
  • 81
  • 1
  • 1
  • 2
7
votes
1 answer

Ubuntu - lftp will not connect to ftps site (Fatal error: gnutls_handshake: An unexpected TLS packet was received.)

I have a specific ftps site that I cannot connect to with lftp. When I attempt to connect I get the error: Fatal error: gnutls_handshake: An unexpected TLS packet was received When I use gnutls-cli to connect I have found the correct settings to…
Ptier
  • 71
  • 1
  • 3
7
votes
1 answer

lftp mirror local directory to remote ftp server without deleting remote files which are missing locally

I have the following command: lftp -e 'mirror -R /local/backups /' -u username,password ftp://FTP_SERVER this works fine, until I started cleaning the /local/backups folder. I'd like to upload new files to my FTP_SERVER without deleting those which…
peter
  • 173
  • 1
  • 1
  • 5
7
votes
2 answers

Run LFTP on a list of files

I have a newline-delimited list of paths to files I would like to download via LFTP, from a remote machine to a local machine with the same directory structure. Is there any way that I can pass LFTP the list of files (the entire path to the file on…
7
votes
2 answers

LFTP: Mirror to remote except particular file present on remote

I usually edit my website locally and push it with this command: lftp -u user,password host -e "mirror -c -e -R -x ^\.git/$ my /my; exit" But now, my website dynamically appends data to the /my/data file. I don't have this /my/data file…
Nicolas Raoul
  • 7,945
  • 14
  • 43
  • 55
6
votes
1 answer

LFTP mirror includes - including other directories other than what I've included

My question: How can I make sure LFTP only includes files AND directories using --include or --include-glob, and not download a bunch of extra directories from the root of the remote that aren't in the includes? Some context: I'm using LFTP and…
Josh S.
  • 61
  • 1
  • 1
  • 4
5
votes
1 answer

LFTP Script to Download Files

I want to write a lftp script that will download files every 15 minutes from a server every x amount of time. Can someone advise how i can do this? Thanks
gurpsone
  • 153
  • 1
  • 1
  • 5
5
votes
2 answers

`lftp` does not connect to FTPS (ftp over ssl)

I have trouble in connecting lftp with ftps (ftp over ssl, not sftp!) server (FTP Server Ultimate (PRO version).) running on Android phone. Technical details: Linux part. Following :…
Grzegorz Wierzowiecki
  • 13,865
  • 23
  • 89
  • 137
4
votes
1 answer

* not interpreted in ftp, lftp?

I'd been seeing that * isn't interpreted on ftp or lftp. Suppose I want to change a directory from current to say ./japan In ftp> of lftp>, if I give: $ cd jap* it would show this error: No such file or directory So, I'm forced to give the…
Ravi
  • 3,723
  • 13
  • 44
  • 66
3
votes
1 answer

mv file/folder with blank-spaces in its name doesn't work - LFTP

I have 2 spaces: My Synology NAS. And my FTP. If we assume that some files on my local NAS are also in my FTP repository, I want to move some files on my local NAS AND on my FTP on different folders. eg: After downloading files from FTP to NAS NAS: …
JuGdx
  • 31
  • 1
  • 4
3
votes
4 answers

Can lftp read netrc for sftp-connections

I am trying to create a script to upload some files to a server via SFTP. I can do that manually by opening an interactive lftp-session and providing username and password there. For the script, I would like to not hardcode credentials in the…
kronn
  • 389
  • 1
  • 4
  • 13
3
votes
1 answer

rsync file copy including files that change

I have to copy files between 2 servers using rsync (the network is slow). Can mirroring/ FXP with lftp be used here? Also there will be a continuous flow of files in the source directory & the delta files also need to be copied to the destination…
Shradha
  • 31
  • 1
3
votes
2 answers

how to install a lftp program on centOS

how to install a lftp program on CentOS and use it to transfer files between servers. I used the below command but got an error as bad command. wget http://example.com/user/filename.gz.tar
user72966
  • 41
  • 1
  • 1
  • 3
1
2 3 4 5 6