Computing.Net > Forums > Unix > automating ftp process

automating ftp process

Reply to Message Icon

Original Message
Name: Srinath
Date: August 17, 2001 at 11:22:38 Pacific
Subject: automating ftp process
Comment:

Hi,
I am trying to automate a ftp process that would pull data from a source machine to a target m/c.It should not prompt for inputs(would use something like ftp -n) and then pass userid/password and mget commands thru a file or something like that? I have done this before but i totally forgot how i did it? Any ideas??


Report Offensive Message For Removal


Response Number 1
Name: WolfieK
Date: August 17, 2001 at 13:00:55 Pacific
Reply: (edit)

Hi Srinath,

create a file .netrc in the user's (root ?) homedir:

###########
machine remote_machine login userid password passw
macdef init
put ( or get ) filename
quit

########################
please regard, the last line (the line after 'quit') MUST BE A BLANK LINE.

start the ftp via command line, cronjob, at-job etc etc.:

ftp remote_machine


Report Offensive Follow Up For Removal

Response Number 2
Name: Anil
Date: December 20, 2001 at 01:45:12 Pacific
Reply: (edit)

hi,
$> chmod 600 .netrc
should be the fap mode.



Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: automating ftp process

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge