<?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: gzip command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046542#M135539</link>
    <description>Thanks Clay!&lt;BR /&gt;&lt;BR /&gt;You were on the money!&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 11 Aug 2003 16:53:13 GMT</pubDate>
    <dc:creator>Dan Maul</dc:creator>
    <dc:date>2003-08-11T16:53:13Z</dc:date>
    <item>
      <title>gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046539#M135536</link>
      <description>I have a dir full of debug logs and I would like to gzip the entire dir.&lt;BR /&gt;Can someone Please help me with the commands.&lt;BR /&gt;My unix skills are limited.  Please forgive.</description>
      <pubDate>Mon, 11 Aug 2003 16:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046539#M135536</guid>
      <dc:creator>Dan Maul</dc:creator>
      <dc:date>2003-08-11T16:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046540#M135537</link>
      <description>It really couldn't be simpler:&lt;BR /&gt;&lt;BR /&gt;cd mydir&lt;BR /&gt;gzip *.log &lt;BR /&gt;&lt;BR /&gt;That would gzip all the files with ending with .log and replace them with .log.gz.&lt;BR /&gt;&lt;BR /&gt;man gzip for details.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 16:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046540#M135537</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-08-11T16:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046541#M135538</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# gzip -rv /logdir&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 11 Aug 2003 16:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046541#M135538</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2003-08-11T16:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046542#M135539</link>
      <description>Thanks Clay!&lt;BR /&gt;&lt;BR /&gt;You were on the money!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Aug 2003 16:53:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046542#M135539</guid>
      <dc:creator>Dan Maul</dc:creator>
      <dc:date>2003-08-11T16:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046543#M135540</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You can use the following.&lt;BR /&gt;&lt;BR /&gt;ls -al |grep -v ^d |awk '{print $9}'|while read a ;do gzip $a;echo "$a zipped" ;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(before executing just make sure ls -al |grep ^d is displaying all the file names which you need to be zipped other than sub directory names )&lt;BR /&gt;&lt;BR /&gt;explanation.&lt;BR /&gt;&lt;BR /&gt;ls -al |grep -v ^d   --&amp;gt; will extact all the files other than directories(I have taken in to consideration that you may have sub dir in side that dir)&lt;BR /&gt;&lt;BR /&gt;awk '{print $9}'  --&amp;gt;will extract the ninth field from the ls -al out put which will be the file names.&lt;BR /&gt;&lt;BR /&gt;then the file names are parsed into a while ,do ,done loop.&lt;BR /&gt;&lt;BR /&gt;this will zip all the files other than directories .&lt;BR /&gt;&lt;BR /&gt;if u have some specific file patter then&lt;BR /&gt;for example *.log &lt;BR /&gt;&lt;BR /&gt;ls *.log |while read a ;do gzip $a;echo "$a zipped" ;done&lt;BR /&gt;will do .&lt;BR /&gt;&lt;BR /&gt;regds,&lt;BR /&gt;baiju</description>
      <pubDate>Mon, 11 Aug 2003 16:54:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046543#M135540</guid>
      <dc:creator>blal</dc:creator>
      <dc:date>2003-08-11T16:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046544#M135541</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Asume that your log files are in:&lt;BR /&gt;    /mnt/log/archive&lt;BR /&gt;&lt;BR /&gt;gzip -r /mnt/log/archive&lt;BR /&gt;&lt;BR /&gt;Will gzip all the files.  &lt;BR /&gt;This works like the compressdir command&lt;BR /&gt;&lt;BR /&gt;Assume that you have  directory tree  that you want to&lt;BR /&gt;compress up and leave in place:&lt;BR /&gt;&lt;BR /&gt;               |-bin----------|-runhpterm2---&lt;BR /&gt;               |-hithere-----&lt;BR /&gt;               |-test2-------&lt;BR /&gt;               |&lt;BR /&gt;               |              |-OO081701.DBF-&lt;BR /&gt;               |              |-OO081801.DBF-&lt;BR /&gt;User-----|              |-OO081901.DBF-&lt;BR /&gt;               |              |-OO082001.DBF-&lt;BR /&gt;               |              |-OO082101.DBF-&lt;BR /&gt;               |-data---------|-OO082201.DBF-&lt;BR /&gt;                              |-OO082301.DBF-&lt;BR /&gt;                              |-OO082401.DBF-&lt;BR /&gt;                              |-OO100201.DBF-&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;gzip -r  /home/User&lt;BR /&gt;&lt;BR /&gt;will do files in all the directories.&lt;BR /&gt;&lt;BR /&gt;Ror</description>
      <pubDate>Tue, 12 Aug 2003 16:59:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046544#M135541</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2003-08-12T16:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: gzip command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046545#M135542</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Not related to your problem as that has been amply answered above.  But when transporting the files (I assume you will e-mail these files somewhere/to someone) remember if using FTP to use BINARY transfer, otherwise those files will end up corrupted!!&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Tue, 12 Aug 2003 19:45:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gzip-command/m-p/3046545#M135542</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2003-08-12T19:45:41Z</dc:date>
    </item>
  </channel>
</rss>

