From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,f35ac22116396527,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1995-03-28 08:36:54 PST Path: nntp.gmd.de!dearn!blekul11!ccsdec1.ufsia.ac.be!reks.uia.ac.be!idefix.CS.kuleuven.ac.be! Belgium.EU.net!EU.net!howland.reston.ans.net!pipex!sunic!sunic.sunet.se!news.funet.fi!news.csc.fi!news.helsinki.fi!not-for-mail From: dsnyder@netcom.com (David C. Snyder) Newsgroups: comp.os.linux.announce Subject: Poor Man's Mirror 1.6 Followup-To: comp.os.linux.misc Date: 28 Mar 1995 07:50:13 +0300 Organization: ? Sender: wirzeniu@cc.helsinki.fi Message-ID: <3l84i5$3mk@klaava.helsinki.fi> NNTP-Posting-Host: klaava.helsinki.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Keywords: mirror archive ftp distribution /----------------------------------------------------------------------------\ | | | The Poor Man's Mirror Script | | | +----------------------------------------------------------------------------+ | | | tpircS rorriM s'naM rooP ehT | | | \----------------------------------------------------------------------------/ Introduction I am announcing the availability of a couple of smallish perl scripts that can be used to maintain an up to date copy of any archive directory structure that is available from a UNIX host via anonymous ftp. These scripts can be used to maintain an archive on your PC even if your only internet connection is via a dial-up UNIX shell account. These scripts are particularly useful for ftp'ing a Linux distribution from one of the mirror sights and modeming it down to your PC. If you choose to do this, please do so during off peak hours for the archive site! Features - The remote script (the one that runs on the PC at home) works under Linux or under DOS. This is handy if you don't already have Linux, but would like to pull a distribution down to your PC to install it. - The pmirror script forks itself so that it can ftp files in the background and download them in the foreground. This results in a significant time savings over ftp'ing and downloading in serial. - If interrupted, the process can be re-started without much backtracking. Just run 'remote -c -p 1' on your PC and then start again with 'remote -i'. Because the process works like a "Makefile", the files that were downloaded up to the point of interruption will not (normally) be downloaded again after when you re-start. Where To Get "The Poor Man's Mirror Script" See the pmirror*.lsm file for details. Archives of the scripts are generally available on tsx-11.mit.edu mirrors, sunsite.unc.edu mirrors, and from ftp.netcom.com. The UNIX archive will be named pmirror-*.tar.gz and the DOS archive will be named pm-*.zip. If you don't have ftp access of some kind, these scripts probably won't be of much use to you. If you would like to have them anyway, send me a request via e-mail, and I'll be glad to send them to you. The LSM: Begin3 Title: pmirror Version: 1.6 Entered-date: 95-03-09 Description: Perl scripts for maintaining an up to date copy of any archive directory structure available from a UNIX host via anonymous ftp. Can be used over a modem with ZMODEM. This is not the same as Lee McLoughlin 's mirror-x.y.tar.gz package, which is more general purpose. Keywords: Mirror Archive Author: dsnyder@netcom.com (David C. Snyder) Maintained-by: dsnyder@netcom.com (David C. Snyder) Primary-site: tsx-11.mit.edu /pub/linux/BETA/pmirror 16k pmirror-1.6.tar.gz 20k pm-16.zip Alternate-site: sunsite.unc.edu /pub/Linux/system/Network/file-transfer 16k pmirror-1.6.tar.gz 20k pm-16.zip Original-site: ftp.netcom.com /pub/ds/dsnyder 16k pmirror-1.6.tar.gz 20k pm-16.zip Platform: Copying-policy: End History About a year ago, I had heard and read much about Linux, but had never got around to installing it to see what it was really about. After the 1.0 version of the kernel was released, I decided it was time. Back then, CD's weren't as popular as they are now, and I didn't (and still don't) have a CD-ROM drive. Since I had internet access through work, I decided to pull the Slackware distribution down to a UNIX machine there and then push it down to my PC using ZMODEM. I started the process manually, but eventually broke down and hacked together five or so awk(1) and csh(1) scripts to automate most of the process. Within a few days, I was up and running Linux. Since several of my friends were interested in Linux, and since I had some free disk space, I thought it would be nice to keep the distribution on my hard drive. A month or so down the road, Patrick Volkerding made massive updates to Slackware, and my archive was out of date. At the same time, I was starting to learn perl. I decided it might be fun to throw away my awk(1) and csh(1) scripts and write a perl script that I could use to keep my archive up to date. The scrip would work like a Makefile in the sense that it would only download a file if it was new or if it had changed since the last download. The script had to actually be two scripts because two machines were involved, the UNIX machine at my work and my Linux PC at home. The script at home would take a recursive directory listing of my linux archive and up-load that to the script at work. The script at work would get a recursive directory listing of the Slackware distribution from an ftp.cdrom.com mirror site and compare that listing with the listing from home. It would create a list of files in my archive at home that were obsolete and a list of files that needed to be added or updated from the mirror site. Then it would ftp the files and ZMODEM them one by one down to my PC. The script at home would make space for the new files and, as each file finished downloading, it would move the file to its proper location in my archive. Writing the script was quite an experience, and I learned a lot about perl programming in the process. I imagined that I might not be the only person interested in doing this sort of thing, so I made my scripts available at sunsite.unc.edu and tsx- 11.mit.edu as well as in the ftp directory provided my Netcom, my current internet service provider. Unfortunately, I unknowingly chose the same name for my archive as Lee McLoughlin chose for his. Lee's scripts are the ones that most ftp sites use to keep the archives that they "mirror" from other sites in sync. I've seen his scripts and they are much fancier than what I have cobbled together, so I had to come up with a new name. The name I chose was pmirror, which stands for "Poor Man's Mirror". I chose this name because my scripts are much smaller and easier to understand, and they don't do nearly as much as the original. -- David dsnyder@netcom.com -- Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember Keywords: and a short description of the software.