<?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: Compress a file before ftp in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901912#M283129</link>
    <description>Hi Mac,&lt;BR /&gt;you can use the rexec command:&lt;BR /&gt;rexec host [-l username] [-n] command&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
    <pubDate>Wed, 22 Nov 2006 03:37:09 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2006-11-22T03:37:09Z</dc:date>
    <item>
      <title>Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901896#M283113</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have a script that ftp's to over 100 deifferent servers in turn, gets a specific file, renames it and drops it onto a local backup server. The files vary in size from 4mb to 150mb. I am within a secure intranet to security with ftp is not an issue. I want to auto compress the file before I ftp it over the network, either as a seperate script or as a command contained within my original.&lt;BR /&gt;&lt;BR /&gt;Can anyone help?&lt;BR /&gt;&lt;BR /&gt;the current script is as follows:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hostFile=/data01/global_backup/scripts/GLOBAL_hostFile.txt&lt;BR /&gt;while read ip sd&lt;BR /&gt;do&lt;BR /&gt;echo "connecting to $sd on $ip"&lt;BR /&gt;ftp -dv $ip &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;get /global/prd/cycle/export/full_export.dmp /data01/global_backup/files/monday/$sd.full_export.dmp&lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;if [ $? -ne 0 ]; then&lt;BR /&gt;echo "Had a problem connecting to $sd on $ip"&lt;BR /&gt;else&lt;BR /&gt;echo "Connected to $sd on $ip"&lt;BR /&gt;fi&lt;BR /&gt;done &amp;lt; ${hostFile}</description>
      <pubDate>Tue, 21 Nov 2006 09:20:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901896#M283113</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T09:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901897#M283114</link>
      <description>Hi Mac,&lt;BR /&gt;&lt;BR /&gt;I found the following link and I think it might help.&lt;BR /&gt;&lt;BR /&gt;S.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=840556&amp;amp;admit=-682735245+1164119155839+28353475" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=840556&amp;amp;admit=-682735245+1164119155839+28353475&lt;/A&gt;</description>
      <pubDate>Tue, 21 Nov 2006 09:27:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901897#M283114</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-11-21T09:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901898#M283115</link>
      <description>thanks for the reply, my problem is that I have more than 80 servers to connect to in turn.  I have edited the .netrc file to contain the user password details to enable autologin.  This only seems to work with ftp, is there anyway I can include a telnet session in the script to compress the file in the same script prior to the ftp transfer?</description>
      <pubDate>Tue, 21 Nov 2006 09:37:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901898#M283115</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T09:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901899#M283116</link>
      <description>echo "connecting to $sd on $ip"&lt;BR /&gt;remsh gzip &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;add .gz extension to your ftp get in your script&lt;BR /&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 21 Nov 2006 10:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901899#M283116</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-21T10:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901900#M283117</link>
      <description>for some reason when I add the line:&lt;BR /&gt;&lt;BR /&gt;remsh gzip {filename}&lt;BR /&gt;&lt;BR /&gt;it does not connect using that command, it seems to pass it by and run the get command direct, falling over because the .gz file is not there yet.</description>
      <pubDate>Tue, 21 Nov 2006 10:52:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901900#M283117</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T10:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901901#M283118</link>
      <description>appears to be a small typo in Christian's reply. try:&lt;BR /&gt;&lt;BR /&gt;remsh $sd gzip &lt;FILENAME&gt;&lt;BR /&gt;&lt;BR /&gt;needs to know server to run command on&lt;BR /&gt;&lt;/FILENAME&gt;</description>
      <pubDate>Tue, 21 Nov 2006 11:00:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901901#M283118</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-11-21T11:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901902#M283119</link>
      <description>or it might be $ip (if $sd isn't the dns name)</description>
      <pubDate>Tue, 21 Nov 2006 11:03:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901902#M283119</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2006-11-21T11:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901903#M283120</link>
      <description>not a typo, i avoid putting actual working commands because a lot of people rely on this forum to do their job for them.&lt;BR /&gt;&lt;BR /&gt;I put just enough for a knowledgable user to figure it out.&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Nov 2006 11:03:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901903#M283120</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-21T11:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901904#M283121</link>
      <description>again thanks for the reply guys - i already tried both the $sd and $ip before asking, it seems that the redhat box I am running the script from doesn't understand the remsh command.....</description>
      <pubDate>Tue, 21 Nov 2006 11:06:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901904#M283121</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T11:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901905#M283122</link>
      <description>You can substitute ssh to remsh ( which is a lot better and secure ) but you would have to deploy you ssh keys to all your servers to enable passwordless remote execution.&lt;BR /&gt;Which is a good thing to do if you have not already done so.&lt;BR /&gt;&lt;BR /&gt;man ssh&lt;BR /&gt;&lt;BR /&gt;Chris&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Nov 2006 11:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901905#M283122</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-21T11:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901906#M283123</link>
      <description>PS: I'm not sure, but I think in redhat remsh is called rsh&lt;BR /&gt;&lt;BR /&gt;You may try that....</description>
      <pubDate>Tue, 21 Nov 2006 11:17:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901906#M283123</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-21T11:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901907#M283124</link>
      <description>got the rsh part - but for some reason it falls over on the login, doesnt want to use the details included in the .netrc.</description>
      <pubDate>Tue, 21 Nov 2006 11:45:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901907#M283124</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T11:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901908#M283125</link>
      <description>I don't have access to a Redhat box to check the rsh use of .netrc, try man rsh on your Redhat box for more info.&lt;BR /&gt;&lt;BR /&gt;You really should try to implement ssh in your environment. .netrc files are considered a security risk and will not survive a SOX audit. In fact their use is prohibited at most security conscious sites.</description>
      <pubDate>Tue, 21 Nov 2006 11:52:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901908#M283125</guid>
      <dc:creator>Christian Tremblay</dc:creator>
      <dc:date>2006-11-21T11:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901909#M283126</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;.netrc is used for ftp only - rsh uses a .rhosts or /etc/hosts.equiv file on the remote host to check for logins without the need of an interactive login.&lt;BR /&gt;&lt;BR /&gt;Even for ssh connections (which I recommend) you will have to add data to all involved clients you want to connect to.&lt;BR /&gt;If you setup sftp, you could reuse your script(s) nearly unchanged.&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Tue, 21 Nov 2006 12:14:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901909#M283126</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-11-21T12:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901910#M283127</link>
      <description>it seems that rexec uses the .netrc file as well, could i use that to initiate the gzip command?</description>
      <pubDate>Tue, 21 Nov 2006 12:17:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901910#M283127</guid>
      <dc:creator>MacMcDonald</dc:creator>
      <dc:date>2006-11-21T12:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901911#M283128</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;you could set up your ftp server to allow the execution of some commands, i.E. compression via script or likewise.&lt;BR /&gt;&lt;BR /&gt;Get manpage of ftp and dig into the &lt;BR /&gt;"site exec"&lt;BR /&gt;section&lt;BR /&gt;&lt;BR /&gt;i.E. here: &lt;A href="http://docs.hp.com/en/B2355-60105/ftpd.1M.html" target="_blank"&gt;http://docs.hp.com/en/B2355-60105/ftpd.1M.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Watch it, there are scurity issues with this setup !&lt;BR /&gt;&lt;BR /&gt;Volker</description>
      <pubDate>Tue, 21 Nov 2006 14:23:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901911#M283128</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2006-11-21T14:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compress a file before ftp</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901912#M283129</link>
      <description>Hi Mac,&lt;BR /&gt;you can use the rexec command:&lt;BR /&gt;rexec host [-l username] [-n] command&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Wed, 22 Nov 2006 03:37:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/compress-a-file-before-ftp/m-p/3901912#M283129</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-11-22T03:37:09Z</dc:date>
    </item>
  </channel>
</rss>

