home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!svin02!wsinis01!devet
- From: devet@wsinis01.info.win.tue.nl (Arjan de Vet)
- Newsgroups: comp.unix.admin
- Subject: Re: anonymous ftp script..
- Message-ID: <3716@svin02.info.win.tue.nl>
- Date: 22 Jul 92 21:07:28 GMT
- References: <1992Jul21.161626@ece.arizona.edu>
- Sender: news@svin02.info.win.tue.nl
- Reply-To: devet@info.win.tue.nl
- Followup-To: comp.unix.admin
- Organization: Eindhoven University of Technology, the Netherlands
- Lines: 91
-
- In article <1992Jul21.161626@ece.arizona.edu> mshah@ece.arizona.edu (Munil
- A. Shah) writes:
-
- > I want to transfer many files by anonymous ftp. And I want to do
- >it during the night by running a script. I am really poor with writing
- >a script. How can I specify ftp commands(login name,password,get,etc..)
- >in the script so that they should go run on ftp prompt and not on the shell
- >prompt.?
-
- I've written some PERL scripts which can do this:
-
- ftp.win.tue.nl:/pub/archives/ftpfiles-1.0beta.tar.Z
-
- The program ftpfiles will probably become (partially) obsolete by Lee
- McLoughlin's mirror.pl version 2.0. If you need to transfer many files
- (whole directory trees), have a look at mirror:
-
- ftp.win.tue.nl:/pub/archives/mirror1.11.tar.Z
-
- From the README file:
-
- ftpfiles
- --------
-
- A PERL script for fetching files from UNIX hosts in the background by
- anonymous ftp. Example:
-
- ftpfiles ftp.win.tue.nl -r /pub -l $HOME -a README
-
- transfers ftp.win.tue.nl:/pub/README to $HOME/README in ASCII mode. This
- commando puts itself in the background and sends a message by E-mail. A
- manual page is available. Help page when ftpfiles is invoked without
- arguments:
-
- -----------------------------------------------------------------------------
- ftpfiles <host> [ -l <path> | -r <path> | -ls<type> | [ [-a|-b] <file> ] ] ...
-
- Usage:
- <host> : domain name or IP address
- -l <path> : set local directory prefix (default "./")
- -r <path> : set remote directory prefix (default "/")
- -ls<type> : get directory listing; -<type> is passed to the remote /bin/ls
- -a <file> : get file in ascii mode
- -b <file> : get file in binary mode
- <file> : get file in binary mode (default)
-
- -----------------------------------------------------------------------------
-
- ftpi
- ----
-
- A PERL script to extract site:file specifications (e.g.,
- ftp.win.tue.nl:/README) from stdin, loads them into an editor for
- corrections/selections and invokes ftpfiles. Example usage:
-
- | ftpi
-
- from within your news reader when you see a site:file specification.
-
-
- Bugs
- ----
-
- Everything is still in early development. Bug reports welcome. I only tested
- this on a SUN SPARC (no other machines available here) with perl 4.0.35
-
-
- Future
- ------
-
- Future extension:
-
- - queuing requests until it is night at the remote site;
-
- Acknowledgements
- ----------------
-
- Based on:
- chat2.pl by Randal L. Schwartz <merlyn@iwarp.intel.com>
- ftp.pl by Alan R. Martello <al@ee.pitt.edu>
-
- Inspired by and some code taken from:
- mirror.pl by Lee McLoughlin <lmjm@doc.ic.ac.uk>
-
- Author's address
- ----------------
-
- Arjan de Vet <devet@win.tue.nl>
- Department of Mathematics and Computing Science
- Eindhoven University of Technology
- the Netherlands
-