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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-08-2004, 08:30 AM
|
#1
|
Member
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112
Rep:
|
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?
|
|
|
10-08-2004, 08:34 AM
|
#2
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Tried gftp or even kbear?. I love the first one 
|
|
|
10-08-2004, 08:36 AM
|
#3
|
Member
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112
Original Poster
Rep:
|
yeah tried and didn't like them... but thanks anyway!
|
|
|
10-08-2004, 08:39 AM
|
#4
|
Member
Registered: Mar 2004
Location: uk
Distribution: fedora2, slackware10
Posts: 54
Rep:
|
how about ncftp
|
|
|
10-08-2004, 09:44 AM
|
#5
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
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
|
|
|
10-08-2004, 10:08 AM
|
#6
|
Member
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112
Original Poster
Rep:
|
but I want it to download all the files in seperate threads in PARALLEL!
|
|
|
10-08-2004, 10:14 AM
|
#7
|
Senior Member
Registered: Nov 2002
Location: British Columbia, Canada
Distribution: Gentoo x86_64; FreeBSD; OS X
Posts: 3,764
Rep:
|
I see, not sure if I've ever heard of something that can do that. Sounds like a job for a python script.
|
|
|
10-08-2004, 02:07 PM
|
#8
|
Member
Registered: Jan 2004
Location: Berne, Switzerland
Distribution: FC4, Gentoo
Posts: 112
Original Poster
Rep:
|
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++;}
}
|
|
|
All times are GMT -5. The time now is 09:54 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|