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.

Filter by
Sorted by
Tagged with
26
votes
3answers
103k views

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. ...
7
votes
2answers
4k views

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 ...
6
votes
2answers
14k views

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 ...
6
votes
1answer
4k views

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-...
5
votes
4answers
21k views

Using lftp with ssh-agent

I have a script that logs into sftp server eval `ssh-agent -s` ssh-add /home/<username>/.ssh/id_rsa sftp <username>@<target> This works, but I would like to get only files that are ...
5
votes
1answer
21k views

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 ...
5
votes
1answer
29k views

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
5
votes
1answer
2k views

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 ...
4
votes
1answer
3k views

* 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 ...
4
votes
1answer
13k views

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 ...
3
votes
2answers
21k views

`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 : https://...
3
votes
1answer
420 views

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 ...
3
votes
1answer
2k views

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. ...
2
votes
1answer
123 views

I have a process (left) that is stuck, and I can't kill it. (kill -9 does not work), what to do?

I have a process that I ran under a Tmux session that I cannot kill. I have tried kill, kill -9, and a few other kill numbers, without it having any effect. I killed the tmux session successfully ...
2
votes
1answer
2k views

How to synchronise a specific file to a remote FTP server using lftp?

I'm trying to synchronise one file (among other things) using lftp. Even though the docs say that --file=FILE mirror a single file or globbed group (e.g. ...
2
votes
3answers
4k views

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 ...
2
votes
4answers
4k views

Download directory from sftp

I want to download directory from sftp to a server.I am able to login to sftp using sftp rob2056@storagename and then can get individual files using : get *.txt /remotedir But I want to ...
2
votes
0answers
710 views

lftp mirror error

I have a problem with a script that I am trying to write. Ideally, the script should compress the folders and then send the zipped files to the ftp server creating the folder as the name of the ...
2
votes
1answer
2k views

LFTP exclude file extensions

I am trying to mirror directories with lftp but I don't want to download filetypes that are notoriously large like .mp4 and .swf. But I am having trouble with the regex - and seeming like the exclude-...
1
vote
1answer
5k views

bash set variable with colon (:) and dash (-) in it (as used by lftp)

so lftp uses some weird shell variables, like the following: xfer:log-file = 1 sftp:connect-program = “ssh -a -x -i keyfile” how would I set these variables? I've tried using set, and env; as well ...
1
vote
1answer
111 views

How to update a local mirror from a public server?

I already have a mirror of the entire slackware64-current/ directory tree using wget -r -np -R "index.html*" https://mirror.slackbuilds.org/slackware/slackware64-current/ and that's fine. But it's ...
1
vote
1answer
89 views

Automating SFTP using LFTP

I have a weekly file transfer to one of our vendors that I am trying to automate. They require that we transfer the file using sftp. We login to their SFTP server using a userid and password. My ...
1
vote
1answer
4k views

LFTP - Remove files from remote server while uploading via lftp mirror --reverse

I'm using a shell script which executes lftp mirror --reverse to upload files and directories to a remote server. Just before that it removes everything using glob -a rm -r -f *. The problem is, it is ...
1
vote
1answer
3k views

Lftp PASV incorrect?

When connecting to a ftp via terminal, everthing is fine. When using lftp instead, I'm constantly getting timed out and can never sync the folder content. But why? script.sh: lftp -c " debug open $...
1
vote
1answer
7k views

`lftp` does not connect to FTPS (FTP over TLS) server but filezilla and ncftp yes

I have a shared hosted server with FTPS access, and I can connect it trough Filezilla with the following configuration: <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <FileZilla3&...
1
vote
1answer
1k views

“lftp” on RHEL6 fails to connect to vsftpd on RHEL7

I have configured vsftpd on RHEL7 and i am trying to transfer data to it using lftp from RHEL6. lftp seems to fail after sending the PASS command for anonymous login. ---> USER anonymous <--- ...
1
vote
1answer
1k views

Can lftp get take in a variable name?

I want to have a script that uses lftp to download a zip file with a variable name. Currently I have the following: open server user user pass set ssl:verify-certificate no ls -ltA1 | grep .zip$ | ...
1
vote
1answer
6k views

Can't use LFTP with SFTP but SFTP clients allow connections

I'm trying to use LFTP (v 4.8.3) to connect to my KVM. This server already allows me to remote execute SSH through terminal and SFTP through FTP client (Transmit app). I want to do this in order to ...
1
vote
1answer
744 views

lftp: removes folder prefix while uploading files

I want to upload some files in a local folder to a remote folder thanks to the command line's ftp client lftp. What I want : In my local computer, I do have : me@local $ tree my-site ├── index.html ...
1
vote
1answer
4k views

lftp return code

I have written below code to get listing from a remote server. echo "set xfer:log yes" > batchfile.txt echo "set xfer:log-file Templogfile1.txt">> batchfile.txt echo "open -p $rport -u $...
1
vote
2answers
2k views

lftp whiptail progress bar

I am using the following command in a bash script to download files from an ftp server. This command uses the -v option which shows the name of each file being downloaded. /usr/bin/lftp ftp://$...
1
vote
2answers
9k views

“lftp” login still possible for “/etc/pam.d/vsftpd” blocked users

I have a ftp server running on the machine 192.168.122.50 Below are the last three directives from /etc/vsftpd/vsftpd.conf file pam_service_name=vsftpd #userlist_enable=YES #userlist_deny=YES Below ...
1
vote
1answer
100 views

What is the detriment to downloading too many files in parallel through lftp?

I'm downloading files in parallel through lftp onto a remote server, and I use the commands: lftp ftp:*url* cd into directory mirror --parallel=10 I'm downloading a total of 365 files separated ...
1
vote
0answers
31 views

File permissions while sending the file from one Linux host to another host

One of the source servers is sending the files to destination servers using lftp. The umask setting in the destination host is 007(in proftpd.conf file), so the files landing in the destination ...
1
vote
0answers
184 views

LFTP script file arguments

I've got an issue while using LFTP with some script files. lftp -f download.lftp the script looks something like that for now: open -u someurl mirror -i "somefile*.zip" --only-missing ... somehow ...
1
vote
1answer
947 views

LFTP exclude specific folder only

I have same folder name in different sub-directories, but while mirroring I want to exclude specific folder only. Example : I have directory "123" in different directories ./abc/123/ ./abc/xyz/...
1
vote
0answers
104 views

LFTP: want to make sure I am going to use LFTP correctly

Basically, we had a huge file dump at work and every time I try to copy it over drag and drop style it times out and i have spend a few minutes trying to figure out what/where to copy. So I decided ...
1
vote
1answer
1k views

Why would an lftp mirror operation slow down over time?

I have CCTV server that is backed up daily to a remote ftp server using an lftp command. The CCTV server saves videos to a new folder each day, the backup runs once a day at 1am, so each backup only ...
1
vote
0answers
888 views

LFTP --exclude prevents log file creation

Is there a way to use advanced features like --exclude and still keep xfer:log-file "lftpbackup.log" capabilities? I read manual at http://lftp.yar.ru/lftp-man-alt.html also lftp.yar.ru wiki, ...
1
vote
0answers
830 views

lftp logging of removed source files

When I use --remove-source-files when pulling files from a remote server, there is no log of files being removed. In theory, one could assume that as long as you're using --remove-source-files that ...
1
vote
0answers
216 views

After transferring file to another server I want to move source file to another folder is source server using lftp

I was able to transfer files from host server to client server with lftp, but now as per requirement the files from host folder after transferring to client server should be moved to folder say "old" ...
1
vote
2answers
10k views

LFTP mirror upload only non existing files to remote directory

Every 5 minutes some new files are downloaded via lftp to a local directory. I need to upload to another ftp only the non existing files. My script so far is: #! /bin/bash today=$(date +%Y%m%d) ...
0
votes
2answers
25k views

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
0
votes
1answer
7k views

Simple question: lftp not writing to $LOG — what am I doing wrong? [closed]

I use a script for work that invokes lftp to mirror a directory: #!/bin/bash HOST='ftp.example.com" USER='pretenduser' PASS='pretendpass' TARGETFOLDER='/home/pretenduser/Dropbox/lftp' SOURCEFOLDER='/...
0
votes
1answer
95 views

Get remote files by a list preserving their relative paths, and do it on a remote machine

1) I run SSH session on the remote client to get files from the server. 2) There is a server and it keeps a very broad directory structure. 3) I've got a list of thousands path-names to the files ...
0
votes
2answers
4k views

How to connect to server with TLS using LFTP?

I'm trying to connect to a server that needs TLS using LFTP. I'm trying in this way, but I get error sslv3 alert when I try to use any command ls, put, pget, etc. lftp set ftp:ssl-force true connect X....
0
votes
1answer
458 views

LFTP adds “;type=i” to remote file name

I'm using LFTP version 4.7.8 under cygwin. It automatically adds ";type=i" (or ";type=a" if I do put -a) to remote file name. What's more, mv command does not work : mv: Operation not supported: 501 ...
0
votes
1answer
38 views

Sending only one file through lftp

I am trying to create a command line to send files to my server.  Everything is working great to send a folder, but it fails for a single file.  The command I am running is lftp -e "set ftp:ssl-...
0
votes
1answer
20 views

How does lftp decide which files need to be transferred when using the mirror command?

The lftp utility has a mirror command which synchronizes a local directory with a directory on the remote server. How does this command decide which files need to be transferred? In particular, if a ...
0
votes
1answer
141 views

How can I specify which cipher lftp is using when connecting to a sftp server?

I'm using lftp to connect to an sftp server but I get a "no matching ciphers" error, and need to specify which cipher is used. Using sftp the command to connect would look like this: sftp -c ...