<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843920#M91791</link>
    <description>Do you want the second box not to ask for a password (not recommended) or do you want to automatically supply one via a scripted ftp?&lt;BR /&gt;&lt;BR /&gt;If the latter then the trick is to run ftp with the -n flag to disable auto-login. You can then supply the user command (with the password) as part of your command stream.&lt;BR /&gt;&lt;BR /&gt;I suggest that you use the forums search facility for more information, this is a popular subject.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
    <pubDate>Wed, 13 Nov 2002 13:59:14 GMT</pubDate>
    <dc:creator>John Palmer</dc:creator>
    <dc:date>2002-11-13T13:59:14Z</dc:date>
    <item>
      <title>ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843919#M91790</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I need to ftp a file from one UNIX box to other UNIX box without humman intervation. I do not need the second box to ask for a user name and password.&lt;BR /&gt;&lt;BR /&gt;Help.&lt;BR /&gt;&lt;BR /&gt;Augusto</description>
      <pubDate>Wed, 13 Nov 2002 13:56:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843919#M91790</guid>
      <dc:creator>augusto cossa</dc:creator>
      <dc:date>2002-11-13T13:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843920#M91791</link>
      <description>Do you want the second box not to ask for a password (not recommended) or do you want to automatically supply one via a scripted ftp?&lt;BR /&gt;&lt;BR /&gt;If the latter then the trick is to run ftp with the -n flag to disable auto-login. You can then supply the user command (with the password) as part of your command stream.&lt;BR /&gt;&lt;BR /&gt;I suggest that you use the forums search facility for more information, this is a popular subject.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;John</description>
      <pubDate>Wed, 13 Nov 2002 13:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843920#M91791</guid>
      <dc:creator>John Palmer</dc:creator>
      <dc:date>2002-11-13T13:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843921#M91792</link>
      <description>Hi Augusto,&lt;BR /&gt;&lt;BR /&gt;The rcp command might be a good option.&lt;BR /&gt;If the username and password are the same on&lt;BR /&gt;both systems, rcp should do the job without having to enter a password.&lt;BR /&gt;&lt;BR /&gt;Eileen</description>
      <pubDate>Wed, 13 Nov 2002 14:11:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843921#M91792</guid>
      <dc:creator>Eileen Millen</dc:creator>
      <dc:date>2002-11-13T14:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843922#M91793</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Do a man on .netrc&lt;BR /&gt;&lt;BR /&gt;This may be what you are looking for.&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Wed, 13 Nov 2002 14:19:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843922#M91793</guid>
      <dc:creator>Christopher McCray_1</dc:creator>
      <dc:date>2002-11-13T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843923#M91794</link>
      <description>Create a .netrc file in the users home directory on the machine that you want to initiate the ftp from. Here is an example of a .netrc file:&lt;BR /&gt;&lt;BR /&gt;machine machine_name_you_want_to_ftp_to&lt;BR /&gt;login your_login_name&lt;BR /&gt;password password_on_target&lt;BR /&gt;&lt;BR /&gt;then be sure that the file is only readable by you. If .netrc is readable by anyone else it is ignored:&lt;BR /&gt;&lt;BR /&gt;chmod 400 .netrc&lt;BR /&gt;&lt;BR /&gt;Then create a shell script to do the transfer unattended:&lt;BR /&gt;&lt;BR /&gt;#!/usr/sbin/sh&lt;BR /&gt;ftp -v machine_name &amp;gt; ftp.log &amp;lt;&amp;lt; -EOF&lt;BR /&gt;asc&lt;BR /&gt;put file_name_to_transfer&lt;BR /&gt;quit&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;chmod it so it executes.&lt;BR /&gt;The -v option tells ftp to work verbose so it will actually put something in ftp.log for you to check status or have it mailed to you.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Nov 2002 15:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843923#M91794</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2002-11-13T15:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: ftp command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843924#M91795</link>
      <description>A far better method than trying to shell script your way through this is to use the Perl Net::FTP module. My big question to you is "How do you know that your transfer worked?" How do you know the file was completely sent? You don't. You can check stderr of ftp but that is a pain. All you really need to do is look at the status value in Net::FTP and for a transfer, 2 is good.&lt;BR /&gt;&lt;BR /&gt;Do something like this:&lt;BR /&gt;ftp.pl myfile1 myfile2&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "FTP ok"&lt;BR /&gt;  else&lt;BR /&gt;    echo "FTP failed"&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;If the exit status of ftp.pl = 0 then myfile1 and myfile2 were sucessfully transferred. The login can be embedded withing the login command of the script or you can simply supply the login and .netrc will be read for the passwd.&lt;BR /&gt;&lt;BR /&gt;You can download the Net::FTP module from &lt;A href="http://www.perl.com/CPAN." target="_blank"&gt;www.perl.com/CPAN.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I never script these transfers in the shell anymore; Perl does it so much cleaner.&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Nov 2002 15:40:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-command/m-p/2843924#M91795</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-11-13T15:40:31Z</dc:date>
    </item>
  </channel>
</rss>

