Linux - SoftwareThis 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.
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.
Hi there, I need one program that can handle that, I have tryied from FTP to konqueror gftp(-kde), KBEAR, but none of them can handle multiple uploads like I see. I come from Windows FileZilla FTP program.
The FTP host allow 4 connections at a time.
For example gftp claim to have it, but like I see FTP only let upload 1 file at a time, then for upload multiple things, you need open more connections. I have look a little in the source code, and aparently there is a thread mutex (thing that I dont know), but it handle multiple uploads for 1 session/connection), then I guess is by that gftp can handle multiple connections but cant handle multiple connections/sessions... (like I understand from source, can handle multiple uploads from the same connection [dont know wich protocol let you do that], but I never see that it try to open more connections to the server). Yes, I have clicked the option in settings that say something like "one file at a time" and it work the same way (I dont see that try open other connections to the site.. in the log by instance...).
ftp mget put multiple but dont multiple at the same time, the same behaviour with KBEAR and konqueror.
I have tryied to send the next to the gftp-users, but I have not been able to use the major dome thing well (If some of you can send it, feel free to do it... [I only need that this feature is reached])... I only put here the way that I see posible to solve it... (peraphs) because you already know the problem, I can't do it... because I really dont know the internals or much about this topic in programming, and the thread and mutext things... for the original developers with this posible hint should be somewhat easy, becaus they have almost all done for support it...
Like I see now, in FTP is only possible upload one file per session at a time, now I think that perhaps such options "one transfer at a time" is for other protocols?? or Im wrong?, I say this, because I have tryied to find where to modify this...
I have see that the the function from /src/gtk/transfer.c the that do the handle job is "transfer_window_files" is composed in 3 parts:
(1) it first check for the selected items (in window1 or window 2 [left, right])) and is not recursive?, ie: if there is a directory selected, it will not get the files inside.
(2) will check if there are files to upload(/download) and if there are, then will be called "gftp_gtk_get_subdirs" that mainly get the files attributes? (name, directory, size, ...)if Im not wrong, it get subfolders and content of them(in some way.. I guess... Im unsure what is the function of call "gftpui_common_run_callback_function" inside such function) somewhere here will be called the popup dialog of actions taked (for discard, resume, overwrite) that will change the files to upload "transfer->files".
(3) after have selected now really what to do with the files that are selected, is time to upload(/download) them "gftpui_common_add_file_transfer" I guess is the function that do the real job of upload then, then inside this function is where the problem reside????
I have taked a surface look at those last functions, but like I see, there is a mutex (I dont have knowledge about them, I only know that are related to multi-thread or some like that), but in fact, from what I understand from connecting manually to the FTP server, is that for transfer in this case 4 files, I must open the session 4 times.
My actuall way of think, for open multiple sessions will be in step (3) before call the function that I guess do the work of upload...:
a) see how many sessions can be opened (a input popup should be ok for the moment?)
b) We have now 1 session open, then connect nSessions-1 times a again
c) copy the direction that is poiting the actual list of files to really upload(/download) to the new sessions.
d) Modify "gftpui_common_add_file_transfer" for accep an array of connections for upload?
d.1) I guess the actual code should work ok (with minime changes???), you will need only loop the sessions opened, because I guess there is a flag for file transfer by each one? (is printed in the list of upload), then there will be no problem if two sessions try upload the same file.
c) Now we have uploaded in parallel with nSessions, time to close the nSessions-1 and let the "original" session continue.
Like you see I have passed the open of multiple sections to the part (3) upload(/download), because there no exist the necessity of open them before??, perhaps only for the step (2) when getting the comparations of the 2 locations.
Is that the correct way??, or Im missing something about the option "one transfer at a time", yes I have unckecked it, and I dont see in the log more messages about the welcome of the FTP server (mean that there is opening more sessions).
At first I didn't want to post this, since it might be a lot simply then you are looking for, however, since no one in answering, maybe I can help.
Unix allows many processes at once, as you probably know already. I say this, because i think you can let the operating system do the multicasking part for you rather than the program.
This isn't mult-connection per file, but I believe it would be a seperate connection for each file. This would make sense, two different user can download two different file at the same time. In linux, processed are treated simularly; meaning two downloads can happen at once.
The nice nohup, is not really necessary. However nohup is nice incase you forget they are downloading and log off. If it is your computer, and you shut it down regularly, nohup probably won't help. Maybe a guru can help us, I don't klnow if nohup restarts a program after a shutdown. Nice just lowers the processes important, "nice," pun inteneded, if you are on a system with other users.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.