Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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... this is just a bump... i'd like to know if this is possible also... i checked the wget man page but couldn't find anything...
i suspect the only way this would actually improve your "speed" is if each individual connection to the server is less than what your total bandwidth is... for example, if i have a 256Kbps connection and i'm downloading recursively (one file at a time) from a server at 32KB/s (all my bandwidth is used), then i don't think it would help to have two connections going-on at the same time... but if my download speed was actually, say, 16KB/s, then having two simultaneous downloads would indeed get my files twice as fast... of course this also depends on whether the server allows me to establish two simultaneous connections or not...
even if wget can't do this on it's own, i have a feeling one can use it within a shell script to achieve the desired result...
anyways, i'm hoping someone can shed some light on this...
but would that mirror those three directories simultaneously?? in other words, it would be like initiating those three downloads individually, no?? or would that start multiple connections for *each* of those subdirs?? i apologize if my question has an obvious answer - i don't really know how to read ruby...
What this will do is recursively download "/foo/" "/bar/" and "/baz/" from example.com separately, but at the same time.
It is just quick and dirty, and has no error checking, but you get the idea. As many URLs as you can pass on the command line it will download simultaneously.
Quote:
would that start multiple connections for *each* of those subdirs??
You could do this, but not with wget. You would have to do it in pure Ruby (or Python, or Perl etc etc) and would take many more lines of code than my simple example...
and have it download /foo recursively using multiple simultaneous connections, where "-n" is the amount of simultaneous connections you'd want to achieve, if the server allows...
Right, well, that's why I used "example.com/foo/" "example.com/bar/" and "example.com/baz/" in my example.
If you want to download "example.com" recursively, and example.com has 'foo' 'bar' and 'baz' as subdirectories, then you are sorta achieving what you want, right? Right? He he. Come on, work with me here...
If you want to download "example.com" recursively, and example.com has 'foo' 'bar' and 'baz' as subdirectories, then you are sorta achieving what you want, right? Right? He he. Come on, work with me here...
LOL, it's all good, i hear ya...
but it would indeed be awesome to be able to deal with all the subdirs in one shot...
copied as many times as you deem fitting to have as much processes downloading. This isn't as elegant as a properly multithreaded app, but it will get the job done with only a slight amount of over head. the key here being the "-N" switch. This means transfer the file only if it is newer than what's on the disk. This will (mostly) prevent each process from downloading the same file a different process already downloaded, but skip the file and download what some other process hasn't downloaded. It uses the time stamp as a means of doing this, hence the slight overhead.
It works great for me and saves a lot of time. Don't have too many processes as this may saturate the web site's connection and tick off the owner. Keep it around a max of 4 or so. However, the number is only limited by CPU and network bandwidth on both ends.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.