<?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: how can I chown, tar, gzip a directory in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659812#M47996</link>
    <description>Thank you very much for all your quick response.</description>
    <pubDate>Wed, 06 Feb 2002 15:07:36 GMT</pubDate>
    <dc:creator>Ragni Singh</dc:creator>
    <dc:date>2002-02-06T15:07:36Z</dc:date>
    <item>
      <title>how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659808#M47992</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have a directory that I would like to chown. Then I would like to tar up the dir using relative path and then gzip the dir. Is there a single command that I can use to do all 3 of these please. Any help will be greatly appreciated.</description>
      <pubDate>Wed, 06 Feb 2002 14:57:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659808#M47992</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2002-02-06T14:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659809#M47993</link>
      <description>That depends on your definition of a single command.&lt;BR /&gt;&lt;BR /&gt;You could write a simple script like:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;chown user dir_name&lt;BR /&gt;tar -cvf dir_name.tar ./dir_name&lt;BR /&gt;gzip dir_name.tar&lt;BR /&gt;&lt;BR /&gt;Be sure to save the script, do a chmod on it to make it executable and then execute it from the command line.&lt;BR /&gt;&lt;BR /&gt;# chmod u+x script_name&lt;BR /&gt;# ./script_name&lt;BR /&gt;&lt;BR /&gt;Once it is done:&lt;BR /&gt;&lt;BR /&gt;# ll dir_name.tar.gz&lt;BR /&gt;&lt;BR /&gt;Should show you your gzip'ed tar file.</description>
      <pubDate>Wed, 06 Feb 2002 15:02:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659809#M47993</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-02-06T15:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659810#M47994</link>
      <description>To chown just the directory do:&lt;BR /&gt;&lt;BR /&gt;chown user:group /dir/path&lt;BR /&gt;&lt;BR /&gt;to chown every file in the directory do:&lt;BR /&gt;&lt;BR /&gt;chown user:group /dir/path/*&lt;BR /&gt;&lt;BR /&gt;to chown every fine in the directory, and every sub-directory and every file in every sub-directory do:&lt;BR /&gt;&lt;BR /&gt;chown -R user:group /dir/path/*&lt;BR /&gt;&lt;BR /&gt;to tar do:&lt;BR /&gt;&lt;BR /&gt;tar /dirpath/targetfile /dirpathsource/*&lt;BR /&gt;&lt;BR /&gt;then to gzip the file you just created with tar:&lt;BR /&gt;&lt;BR /&gt;gzip /dirpath/targetfilefromabove &amp;gt;newfile.gz&lt;BR /&gt;&lt;BR /&gt;obviously, you have to rename all the directory and file references to what's on your system. And while not required, using the .gz extention on the gzip file is recommended.&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;mark</description>
      <pubDate>Wed, 06 Feb 2002 15:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659810#M47994</guid>
      <dc:creator>Mark Greene_1</dc:creator>
      <dc:date>2002-02-06T15:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659811#M47995</link>
      <description>Example:- (in /opt, wanted to process dir "ov")&lt;BR /&gt;&lt;BR /&gt;# chown root:sys ov; tar cvf ov.tar ov; gzip ov.tar&lt;BR /&gt;&lt;BR /&gt;Not actually a single command but all commands are in one line. Not sure if this is what you're asking about.</description>
      <pubDate>Wed, 06 Feb 2002 15:07:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659811#M47995</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-02-06T15:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659812#M47996</link>
      <description>Thank you very much for all your quick response.</description>
      <pubDate>Wed, 06 Feb 2002 15:07:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659812#M47996</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2002-02-06T15:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: how can I chown, tar, gzip a directory</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659813#M47997</link>
      <description>Hi Sanman,&lt;BR /&gt;&lt;BR /&gt;In keeping with the one line command and to save disk space, use this:&lt;BR /&gt;tar cvf - ./relpath_dir | gzip &amp;gt;output_tarfile.gz&lt;BR /&gt;&lt;BR /&gt;The "intermediate" tarfile is not stored on disk, only the gzipped one.  Also, when gzipping a file, the input file is left on disk until the gzip is finished.  Thus even more space is used.&lt;BR /&gt;&lt;BR /&gt;The reverse process is:&lt;BR /&gt;gzip -dc output_tarfile.gz | tar xf -&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Wed, 06 Feb 2002 16:06:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-can-i-chown-tar-gzip-a-directory/m-p/2659813#M47997</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-02-06T16:06:18Z</dc:date>
    </item>
  </channel>
</rss>

