LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-18-2010, 09:59 AM   #1
cigarette
LQ Newbie
 
Registered: Jan 2010
Posts: 9

Rep: Reputation: 0
How do I set lftp to download files in a specific order


I have the following option set in my ~/.lftp/rc

Code:
set mirror:order "*.rpm */"
Here, *.rpm files are given preference. The rest of the files are being downloaded by lftp in alphabetical order, not the custom order sent by my ftp server. Is there a way to make it download it in the order sent by my ftp server.

I'm using proftpd and the files are sorted by size.
 
Old 02-10-2010, 07:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by cigarette View Post
The rest of the files are being downloaded by lftp in alphabetical order, not the custom order sent by my ftp server. Is there a way to make it download it in the order sent by my ftp server.
If such a thing exists it will likely be some client-side ftp client "retrieve listing, sort, download" functionality, I've never encountered or heard of a FTP daemon sending files in a custom order. It wouldn't make any sense to me as the only thing one needs is to download the files. What I mean is that if you're depending on ordering things to tackle a problem of a different order then you might be waving the wrong stick at the problem. Elaborate if you like.

//NTLB
 
Old 02-14-2010, 04:45 AM   #3
cigarette
LQ Newbie
 
Registered: Jan 2010
Posts: 9

Original Poster
Rep: Reputation: 0
What I mean is the list of files when you type "ls". You can set the daemon to send a sorted list the way you like it. But lftp downloads them in alphabetical order when a mirror command is used. I checked the source and I'm not sure what to change. What I want it to do is to download the smallest files first, and the ProFTPd is sending the file list sorted that way. I don't want lftp to do any sorting on its own.

Last edited by cigarette; 02-14-2010 at 04:50 AM.
 
Old 02-14-2010, 06:00 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
"Mirror" accepts ordering but only by extension AFAIK and I doubt consecutive sessions of "--size-range=" will help you. In absence of good solutions maybe grab a listing with say curl then create a custom sort order D/L script?
 
  


Reply



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
[SOLVED] Can I set the cups output order to always print in reverse order Thane Ubuntu 3 07-09-2018 09:49 PM
Which files in Gnome to modify in order to set Preferences manually? lqv Linux - Desktop 4 01-06-2009 12:13 PM
Automatically set permissions of new files created within a specific folder Lorian Linux - Desktop 2 03-03-2007 03:17 PM
lftp does not list files PhillipHuang Red Hat 1 12-28-2006 04:09 AM
I need a set of download instructions for all the files ex) .rpm .tgz ECT Lord Hakk Linux - Newbie 2 03-30-2006 03:52 PM

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

All times are GMT -5. The time now is 12:20 PM.

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
Open Source Consulting | Domain Registration