Questions tagged [lftp]

lftp is a sophisticated terminal-based file transfer program with support for FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols. BitTorrent is also supported.

lftp is a sophisticated terminal-based file retrieval program with support for FTP, HTTP, FISH, SFTP, HTTPS and FTPS protocols.

lftp supports background jobs, mirroring sites, and using multiple connections to speed up downloading of large files. If the program is exited while a file transfer is in progress it will automatically put itself into the background to complete any remaining jobs.

241 questions
2
votes
1 answer

LFTP wildcard source folder

I'm trying to use LFTP in my GitLab continuous integration setup so I can mirror JSON files with my destination. However, I'd like to only mirror on a set of folders using a wildcard, but I cannot seem to get this working. I tried this mirror…
2
votes
1 answer

Catching errors in LFTP Bash Script

So I am trying to catch specific errors whilst transferring files using LFTP, but the problem is, I am unable to catch them due to calling the <
Tachyon
  • 2,171
  • 3
  • 22
  • 46
2
votes
3 answers

lftp mget with wildcard mis-identifies a file

I'm running into an issue that's perplexing to me. I'm using LFTP as part of a nightly automated file transfer process, with the goal of collecting all of the .csv files on a site. Generally, the mget command, coupled with a wildcard .csv is able…
Adam Bethke
  • 1,028
  • 2
  • 19
  • 35
2
votes
2 answers

Handling $ sign in username in lftp

I'm trying to deploy website to Azure App Service from an Alpine Linux box using lftp. The username is always in the form usr\$usr. For whatever reason lftp (version 4.7.6-r0) is using only usr\ part. The command I'm using is using variables. lftp…
cincura.net
  • 4,130
  • 16
  • 40
2
votes
1 answer

Making LFTP mirror to one flat directory

Is there any way to make LFTP mirror remote files at ftp server to one "flat" local directory?
azrael
  • 263
  • 3
  • 13
2
votes
2 answers

Echo the current file transfer with LFTP

I'm trying to echo $file_name once the transfer is complete. However I cannot find any reference for how to create the variable in LFTP that displays the file name of what was just downloaded. The…
ThatsNoMoon
  • 33
  • 1
  • 5
2
votes
2 answers

Folder does not exists when changing directory using jcraft.jsch

I'm running on a Linux machine a Java program that uses jcraft.jsch library to connect to an external sftp server. The code looks like: JSch jsch = new JSch(); Session session = null; Channel channel = null; ChannelSftp c = null; session =…
user1261620
  • 377
  • 2
  • 5
  • 12
2
votes
3 answers

lftp hangs on "connecting"

I use lftp to transfer files from my Cloud 9 IDE to a remote host. Recently, it seems to have stopped working. I've raised this with the host, and they think it's working OK. Indeed, I can connect to the ftp host via FileZilla, and via a simple…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
2
votes
2 answers

Force lftp to open binary connections?

The problem: I am trying to create a local mirror of a public FTP site. When I use lftp to do the job it creates a mirror without a problem, but when I try to update the mirror a few days later it becomes very slow due to getting stuck on several…
econ
  • 547
  • 7
  • 22
2
votes
1 answer

Delete a file 5 days old with the rm command via bash

I want to remove the .tar.gz in that is 5 days old based on the iso date. Kinda like this? (iso date - 5 days = file to remove.tar.gz) The reason i'm doing this is because the FIND command does not work in lftp and I need this type of equation to…
2
votes
1 answer

LFTP Mirror - list with "mirrored" files

I'm using LFTP to mirror files from an FTP server to a local directory in Windows. My question is how can I log which files were actually mirrored. I can get some output by doing something like this: lftp -e 'mirror --only-newer /FtpFolder/…
user729400
  • 495
  • 7
  • 18
2
votes
1 answer

Php exec or shell_exec not works when execute command lftp

Command does not work if run from php with variables. But if I run it from the terminal or from php (exec or shell_exec) without variables it works. This not works: $command = 'lftp -c "open -u'.$user.','.$password.' -p xxx sftp://xx.xx.xx.xx; put…
mstafkmx
  • 419
  • 5
  • 17
2
votes
2 answers

Connecting to an sftp server with lftp in a passwordless fashion?

I'm running the following script that uses lftp: lftp -f " open sftp://myuser@sftp_server:443 lcd $FTP_FOLDER mirror --no-empty-dirs --only-newer --verbose $FTP_FOLDER $LOCAL_FOLDER bye " Now If I've already passed my public key to the server…
aarelovich
  • 5,140
  • 11
  • 55
  • 106
2
votes
1 answer

LFTP when used with proxies doesn't work

I can't seem to use LFTP with proxies that require authentification correctly on my Ubuntu server. When I use it with proxy that doesn't require username/password everything seems fine: lftp lftp :~> set http:proxy http://HOST:PORT lftp :~> set…
user2949465
  • 21
  • 1
  • 1
  • 5
2
votes
2 answers

how to download hidden dot-directories with lftp's mirror command

I don't know how to download hidden dot-directories with lftp's mirror command I just can get a dot-file with get command, and list the hide files with ls -a command for now. Can this be configured?
jason.foo
  • 331
  • 1
  • 4
  • 14