ITEM: AB1655L

tcpip question



Question:

I have a question on tcpip....SX6 custoner pmr is9x489 b201

Response:

Nick is trying to automate ftp. He wants to set a cron file to transfer a file
on regular bases. Re_queue to command group.

Response:

ENV:
  model 970 at 3.2.5
DESC:
  How do I automate and ftp login and file transfer using cron?
ACT:
  Create an entry in the appropriate user's crontab (in this case root)
to run the file transfer at 10:45 pm:

45 22 * * * /usr/local/bin/the.log.copy.script

  Create the script  /usr/local/bin/the.log.copy.script

containing 
ftp host1.austin.century.com

  Create a .netrc file containing the required login information. See file 
  format for .netrc in infoexplorer for an example.
  Next add a macro definition in the .netrc file.
  Note that there must be a blank line in the file after the macro definition
to terminate the definition.  The documentation for macdef does not state this
correctly.
  Note that the use of the name init for the macro causes it to be executed 
immediately after the successful login to the machine specifed in the 
cron command.  Thus no keyboard interaction is required.
Here is an example .netrc file:
 machine host1.austin.century.com login fred password daisy101
macdef  init
cd /home/catchall
lcd /home/thesource
bin
put some_log_file  todays_log
quit

:eof

  The eof if shown to indicate the presence of the blank line in the file.
  This file will take the file /home/thesource/some_log_file and copy it to 
/home/catchall/todays_log on host1.austin.century.com owned by fred.

NEXT:
  Close pending callback.
TESTCASE:
  na.


Support Line: tcpip question ITEM: AB1655L
Dated: April 1996 Category: N/A
This HTML file was generated 99/06/24~13:30:31
Comments or suggestions? Contact us