LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2004, 09:30 AM   #1
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Rep: Reputation: 15
Linux FTP program?


Is there a good linux FTP program to download multiple files each in its seperate thread?
Doesn't matter whether it has a GUI or not..

Would just like to enter "get *" and then there is a download thead for file*.ext.
Like in leechFTP in windows..

Or like lftp, but there the pget command doesn't accept wildcard, unfortunately? Or is there a trick with it?
 
Old 10-08-2004, 09:34 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
Tried gftp or even kbear?. I love the first one
 
Old 10-08-2004, 09:36 AM   #3
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
yeah tried and didn't like them... but thanks anyway!
 
Old 10-08-2004, 09:39 AM   #4
chongluo
Member
 
Registered: Mar 2004
Location: uk
Distribution: fedora2, slackware10
Posts: 54

Rep: Reputation: 15
how about ncftp
 
Old 10-08-2004, 10:44 AM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
lftp will do what you want...just use mget instead of pget.
Code:
lftp anonymous@somewhere:/> help mget
Usage: mget [OPTS] <files>
Gets selected files with expanded wildcards
 -c  continue, reget
 -d  create directories the same as in file names and get the
     files into them instead of current directory
 -E  delete remote files after successful transfer
 -a  use ascii mode (binary is the default)
 -O <base> specifies base directory or URL where files should be placed
lftp anonymous@somewhere:/> mget *.ext
 
Old 10-08-2004, 11:08 AM   #6
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
but I want it to download all the files in seperate threads in PARALLEL!
 
Old 10-08-2004, 11:14 AM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I see, not sure if I've ever heard of something that can do that. Sounds like a job for a python script.
 
Old 10-08-2004, 03:07 PM   #8
nyk
Member
 
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112

Original Poster
Rep: Reputation: 15
I wrote a perl script now that sends all the files to a background ncftp transfer.

Now I only have to write a script, that calculates the total transfer rate and tells me, when all transfers all done.


Code:
#!/usr/bin/perl

# pass ftp directory whose content you want to download as argument
# works with a windows ftp, dont know for unix yet.... (regex for dir listing)
# creates the directory you download localy
use Net::FTP;
$dir=shift;$serv="server_adress";$port="server_port";$user="username";$pass="password";
$ftp=Net::FTP->new($serv,Port=>$port,Passive=>1);
$ftp->login($user,$pass);@list=$ftp->dir($dir);
if ($dir=~/\/(.+)$/) {$ldir=$1} else {die}
mkdir($ldir) or die;
for ($i=0;$i<@list;$i++) {
	if ($list[$i]=~/^.+ (.+)$/) {$fn=$1} else {$fn=0}
	if ($fn=~/^\./) {$fn=0}
	$c="nohup ncftpget -c \'ftp:\/\/$user:$pass\@$serv:$port\/$dir\/$fn\' >\'$ldir\/$fn\' &";
	if ($fn) {print "$fn\n";system($c);$flist[$k]=$fn;$k++;}
}
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What linux FTP program is closest to FlashFXP for windows? eBopBob Linux - Software 7 05-21-2009 01:11 AM
which ftp program? kpachopoulos Linux - Newbie 3 09-15-2004 08:06 AM
I can't find the ftp program in Linux errisal Linux - Networking 2 07-29-2004 05:16 PM
FTP program in C shibdas Programming 9 02-10-2004 11:30 PM
Need a good FTP Program that runs under both Linux and Winbloze shassouneh Linux - Software 0 09-12-2002 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration