<?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: mput command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378223#M197028</link>
    <description>Ftp is called file transfer protocol to transfer the file's format. mput is used to put multiple files on the destination server. If you want to tranfer the files which is under /tmp/ directory then,&lt;BR /&gt;&lt;BR /&gt; ftp server&lt;BR /&gt; ftp&amp;gt; user &lt;USER&gt; &lt;PASSWD&gt;&lt;BR /&gt; ftp&amp;gt; mkdir /tmp/test/&lt;BR /&gt; ftp&amp;gt; mput /tmp/*&lt;BR /&gt;&lt;BR /&gt; where * used to select every file.&lt;BR /&gt; &lt;BR /&gt; If you do like this, every file under /tmp/ get selected and prompt's for permission.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;We can do shell operation's with ftp easily as,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ftp&amp;gt; !&lt;SHELL command=""&gt;&lt;BR /&gt;&lt;BR /&gt; examample&amp;gt;&lt;BR /&gt; &lt;BR /&gt; ftp&amp;gt; !touch /tmp/testfile;tar -cvf /tst.tar testfile&lt;BR /&gt;&lt;BR /&gt; Else, go to the shell prompt from ftp prompt as,&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt; ftp&amp;gt; !&lt;BR /&gt; $ &lt;EXECUTE your="" shell="" actions=""&gt;&lt;BR /&gt; $ exit&lt;BR /&gt; ftp&amp;gt; &lt;BR /&gt;&lt;BR /&gt; you can do this on local shell.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; If you want to make it in a script then,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ------ /tmp/scriptfile ----&lt;BR /&gt; user test passwd&lt;BR /&gt; lcd /tmp/test/&lt;BR /&gt; !tar -cvf test.tar "*.c"&lt;BR /&gt; put test.tar&lt;BR /&gt; bye&lt;BR /&gt; ---------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ftp -i -n &lt;SERVER&gt; &lt;/SERVER&gt;&lt;BR /&gt; Else as,&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; ftp -i -n &lt;SERVER&gt; &amp;lt;&amp;lt;-EOF &lt;BR /&gt; user test passwd&lt;BR /&gt; lcd /tmp/test/&lt;BR /&gt; !tar -cvf test.tar "*.c"&lt;BR /&gt; put test.tar&lt;BR /&gt; bye&lt;BR /&gt; EOF&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;-Muthu  &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;/SERVER&gt;&lt;/EXECUTE&gt;&lt;/SHELL&gt;&lt;/PASSWD&gt;&lt;/USER&gt;</description>
    <pubDate>Mon, 13 Sep 2004 23:01:19 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2004-09-13T23:01:19Z</dc:date>
    <item>
      <title>mput command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378220#M197025</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to do ftp of a complete directory. Also I should use "mput" to FTP the directory. But the mput command doesn't allow to "mput" a directory. If it is just a file it is working fine, but doesn't work for a directory. Is there any option I can use to "mput" a directory.&lt;BR /&gt; &lt;BR /&gt;I can't do a tar and untar as on the ftp prompt "tar" doesn't work. Mean to say when I run FTP iam on the destination server where my directory needs to be copied. &lt;BR /&gt;I need to do this with a script. I can do this manully, But I want to write a script.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Siva</description>
      <pubDate>Mon, 13 Sep 2004 19:54:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378220#M197025</guid>
      <dc:creator>Siva_11</dc:creator>
      <dc:date>2004-09-13T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: mput command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378221#M197026</link>
      <description>Shoulds like you need shell access.&lt;BR /&gt;&lt;BR /&gt;It might work like this:&lt;BR /&gt;&lt;BR /&gt;ftp &amp;lt;&amp;lt; EOF&lt;BR /&gt;userid&lt;BR /&gt;password&lt;BR /&gt;lcd &lt;SOURCE&gt;&lt;BR /&gt;cd &lt;TARGET&gt;&lt;BR /&gt;mput *&lt;BR /&gt;mkdir &lt;SUBDIR&gt;&lt;BR /&gt;cd &lt;SUBDIR&gt;&lt;BR /&gt;lcd &lt;FULLPATH of="" next="" set="" of="" files=""&gt;&lt;BR /&gt;mput *&lt;BR /&gt;&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thing is, it would be much easier with shell access and a tar file.  ssh or telnet over and then do tar xvf something.tar&lt;BR /&gt;&lt;BR /&gt;You could also do it by setting up rcp or scp (from secure shell) and doing this from target system:&lt;BR /&gt;&lt;BR /&gt;scp -rp /source targetost:/targetdir&lt;BR /&gt;&lt;BR /&gt;Even if prompted for a password this would do the job with less code and more securely.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/FULLPATH&gt;&lt;/SUBDIR&gt;&lt;/SUBDIR&gt;&lt;/TARGET&gt;&lt;/SOURCE&gt;</description>
      <pubDate>Mon, 13 Sep 2004 20:29:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378221#M197026</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-09-13T20:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: mput command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378222#M197027</link>
      <description>ftp is not a shell. It is a multiplatform file transfer program and the complete list of commands supported by the client is found with the ? command. The server's ftp may not support all of the client's commands. So while mput * looks like it might work with multiple directories and their contents, there are a huge number of compatibility issues. Some mainframes do not have hierarchical directories and others do. There is no option in mput to control descending into lower level subdirectories.&lt;BR /&gt; &lt;BR /&gt;So ftp does not transfer anything except files. Directories must be individually created. Your script will have to determine what directories need to be created, then run ftp to create them, followed by ftp to cd to each directory, use mput * to send all the files and repeat as needed.</description>
      <pubDate>Mon, 13 Sep 2004 21:53:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378222#M197027</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-09-13T21:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: mput command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378223#M197028</link>
      <description>Ftp is called file transfer protocol to transfer the file's format. mput is used to put multiple files on the destination server. If you want to tranfer the files which is under /tmp/ directory then,&lt;BR /&gt;&lt;BR /&gt; ftp server&lt;BR /&gt; ftp&amp;gt; user &lt;USER&gt; &lt;PASSWD&gt;&lt;BR /&gt; ftp&amp;gt; mkdir /tmp/test/&lt;BR /&gt; ftp&amp;gt; mput /tmp/*&lt;BR /&gt;&lt;BR /&gt; where * used to select every file.&lt;BR /&gt; &lt;BR /&gt; If you do like this, every file under /tmp/ get selected and prompt's for permission.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;We can do shell operation's with ftp easily as,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ftp&amp;gt; !&lt;SHELL command=""&gt;&lt;BR /&gt;&lt;BR /&gt; examample&amp;gt;&lt;BR /&gt; &lt;BR /&gt; ftp&amp;gt; !touch /tmp/testfile;tar -cvf /tst.tar testfile&lt;BR /&gt;&lt;BR /&gt; Else, go to the shell prompt from ftp prompt as,&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt; ftp&amp;gt; !&lt;BR /&gt; $ &lt;EXECUTE your="" shell="" actions=""&gt;&lt;BR /&gt; $ exit&lt;BR /&gt; ftp&amp;gt; &lt;BR /&gt;&lt;BR /&gt; you can do this on local shell.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; If you want to make it in a script then,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ------ /tmp/scriptfile ----&lt;BR /&gt; user test passwd&lt;BR /&gt; lcd /tmp/test/&lt;BR /&gt; !tar -cvf test.tar "*.c"&lt;BR /&gt; put test.tar&lt;BR /&gt; bye&lt;BR /&gt; ---------------------------&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; ftp -i -n &lt;SERVER&gt; &lt;/SERVER&gt;&lt;BR /&gt; Else as,&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt; ftp -i -n &lt;SERVER&gt; &amp;lt;&amp;lt;-EOF &lt;BR /&gt; user test passwd&lt;BR /&gt; lcd /tmp/test/&lt;BR /&gt; !tar -cvf test.tar "*.c"&lt;BR /&gt; put test.tar&lt;BR /&gt; bye&lt;BR /&gt; EOF&lt;BR /&gt;&lt;BR /&gt;HTH.&lt;BR /&gt;-Muthu  &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;/SERVER&gt;&lt;/EXECUTE&gt;&lt;/SHELL&gt;&lt;/PASSWD&gt;&lt;/USER&gt;</description>
      <pubDate>Mon, 13 Sep 2004 23:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/mput-command/m-p/3378223#M197028</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-09-13T23:01:19Z</dc:date>
    </item>
  </channel>
</rss>

