wget
There is a nifty little command line utility program that works with Mac OS X, Unix, Linux, and Windows called wget. To quote from SourceForge, “GNU wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.”
Here in Hopkins, we’re going to use it to help us with our 1 to 1 laptop initiative. All of our students will have access to a website full of help sheets that will have information on all kinds of things about their laptops. We know that some of the kids won’t have Internet access at home, but we still wanted them to have access to those help sheets. This is where wget comes in to the picture.
We have set up the laptops so that once a day, the cron utility will run a shell script that will synchronize a local directory on the laptop with the website that will contain all of the help files. The program that the shell script calls to do the work is wget. wget is smart enough to even compare the dates and file sizes of what it currently has stored locally to what is on the server and then only download files that have changed. Cool huh? You may be thinking, why use a shell script? Why not have cron call wget directly? The answer lies in server load. Since all of these laptops are based off of the same image, if they were all turned on at that same time, it is conceivable that all 650 of them might try to synchronize their directories with the web server simultaneously. In order to keep them from doing that, I have the shell script sleep for a random number of seconds BEFORE it calls wget. That way, they all won’t be hitting the server at the same time.
–Pete
Sorry, comments for this entry are closed at this time.