home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / admin / 4268 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  3.1 KB

  1. Path: sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!svin02!wsinis01!devet
  2. From: devet@wsinis01.info.win.tue.nl (Arjan de Vet)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: anonymous ftp script..
  5. Message-ID: <3716@svin02.info.win.tue.nl>
  6. Date: 22 Jul 92 21:07:28 GMT
  7. References: <1992Jul21.161626@ece.arizona.edu>
  8. Sender: news@svin02.info.win.tue.nl
  9. Reply-To: devet@info.win.tue.nl
  10. Followup-To: comp.unix.admin
  11. Organization: Eindhoven University of Technology, the Netherlands
  12. Lines: 91
  13.  
  14. In article <1992Jul21.161626@ece.arizona.edu> mshah@ece.arizona.edu (Munil
  15. A. Shah) writes:
  16.  
  17. >    I want to transfer many files by anonymous ftp. And I want to do
  18. >it during the night by running a script. I am really poor with writing
  19. >a script. How can I specify ftp commands(login name,password,get,etc..)
  20. >in the script so that they should go run on ftp prompt and not on the shell
  21. >prompt.?
  22.  
  23. I've written some PERL scripts which can do this:
  24.  
  25.     ftp.win.tue.nl:/pub/archives/ftpfiles-1.0beta.tar.Z
  26.  
  27. The program ftpfiles will probably become (partially) obsolete by Lee
  28. McLoughlin's mirror.pl version 2.0. If you need to transfer many files
  29. (whole directory trees), have a look at mirror:
  30.  
  31.     ftp.win.tue.nl:/pub/archives/mirror1.11.tar.Z
  32.  
  33. From the README file:
  34.  
  35. ftpfiles
  36. --------
  37.  
  38. A PERL script for fetching files from UNIX hosts in the background by
  39. anonymous ftp. Example:
  40.  
  41.     ftpfiles ftp.win.tue.nl -r /pub -l $HOME -a README
  42.  
  43. transfers ftp.win.tue.nl:/pub/README to $HOME/README in ASCII mode. This
  44. commando puts itself in the background and sends a message by E-mail. A
  45. manual page is available. Help page when ftpfiles is invoked without
  46. arguments:
  47.  
  48. -----------------------------------------------------------------------------
  49. ftpfiles <host> [ -l <path> | -r <path> | -ls<type> | [ [-a|-b] <file> ] ] ...
  50.  
  51. Usage:
  52.   <host>    : domain name or IP address
  53.   -l <path> : set local directory prefix (default "./")
  54.   -r <path> : set remote directory prefix (default "/")
  55.   -ls<type> : get directory listing; -<type> is passed to the remote /bin/ls
  56.   -a <file> : get file in ascii mode
  57.   -b <file> : get file in binary mode
  58.   <file>    : get file in binary mode (default)
  59.  
  60. -----------------------------------------------------------------------------
  61.  
  62. ftpi
  63. ----
  64.  
  65. A PERL script to extract site:file specifications (e.g.,
  66. ftp.win.tue.nl:/README) from stdin, loads them into an editor for
  67. corrections/selections and invokes ftpfiles. Example usage:
  68.  
  69.     | ftpi
  70.  
  71. from within your news reader when you see a site:file specification.
  72.  
  73.  
  74. Bugs
  75. ----
  76.  
  77. Everything is still in early development. Bug reports welcome. I only tested
  78. this on a SUN SPARC (no other machines available here) with perl 4.0.35
  79.  
  80.  
  81. Future
  82. ------
  83.  
  84. Future extension:
  85.  
  86. - queuing requests until it is night at the remote site;
  87.  
  88. Acknowledgements
  89. ----------------
  90.  
  91. Based on:
  92. chat2.pl  by Randal L. Schwartz <merlyn@iwarp.intel.com>
  93. ftp.pl    by Alan R. Martello <al@ee.pitt.edu>
  94.  
  95. Inspired by and some code taken from:
  96. mirror.pl by Lee McLoughlin <lmjm@doc.ic.ac.uk>
  97.  
  98. Author's address
  99. ----------------
  100.  
  101. Arjan de Vet <devet@win.tue.nl>
  102. Department of Mathematics and Computing Science
  103. Eindhoven University of Technology
  104. the Netherlands
  105.