<?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: .snapshot in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159610#M319802</link>
    <description>&amp;gt;Is the below command right?&lt;BR /&gt;&lt;BR /&gt;There is no -prune in chown, only in find(1).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;slydmin: find . -name '*' | egrep -w '.snapshot' | xargs chown -R wic -&lt;BR /&gt;&lt;BR /&gt;This is close but you need some corrections:&lt;BR /&gt;find /project4 | fgrep -v .snapshot | xargs chown wic&lt;BR /&gt;&lt;BR /&gt;You also might be able to use ! -name .snapshot and -prune with -exec.&lt;BR /&gt;And this will work if not too many files:&lt;BR /&gt;$ cd /project4&lt;BR /&gt;$ chown -R wic $( ls !(.snapshot) )&lt;BR /&gt;&lt;BR /&gt;&amp;gt;you had it right.  your command should work&lt;BR /&gt;&lt;BR /&gt;I don't see how?</description>
    <pubDate>Wed, 12 Mar 2008 06:17:23 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2008-03-12T06:17:23Z</dc:date>
    <item>
      <title>.snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159607#M319799</link>
      <description>Hello ,&lt;BR /&gt;I have to chown recursively a directory and need to leave just one directory underneath it called .snapshot.&lt;BR /&gt;Is it possible.Is the below command right?&lt;BR /&gt;Thanks Much&lt;BR /&gt;&lt;BR /&gt;chown -R wic /project4 -prune .snapshot</description>
      <pubDate>Tue, 11 Mar 2008 21:43:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159607#M319799</guid>
      <dc:creator>navin</dc:creator>
      <dc:date>2008-03-11T21:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: .snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159608#M319800</link>
      <description>cd to project4 and run the following &lt;BR /&gt;&lt;BR /&gt;find . -name '*'  | egrep -w '.snapshot' | xargs chown -R wic -&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;-S</description>
      <pubDate>Tue, 11 Mar 2008 21:50:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159608#M319800</guid>
      <dc:creator>slydmin</dc:creator>
      <dc:date>2008-03-11T21:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: .snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159609#M319801</link>
      <description>Oops I must have made a mistake... &lt;BR /&gt;&lt;BR /&gt;u had it right...your command should work&lt;BR /&gt;&lt;BR /&gt;i have been of no help :)</description>
      <pubDate>Tue, 11 Mar 2008 22:03:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159609#M319801</guid>
      <dc:creator>slydmin</dc:creator>
      <dc:date>2008-03-11T22:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: .snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159610#M319802</link>
      <description>&amp;gt;Is the below command right?&lt;BR /&gt;&lt;BR /&gt;There is no -prune in chown, only in find(1).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;slydmin: find . -name '*' | egrep -w '.snapshot' | xargs chown -R wic -&lt;BR /&gt;&lt;BR /&gt;This is close but you need some corrections:&lt;BR /&gt;find /project4 | fgrep -v .snapshot | xargs chown wic&lt;BR /&gt;&lt;BR /&gt;You also might be able to use ! -name .snapshot and -prune with -exec.&lt;BR /&gt;And this will work if not too many files:&lt;BR /&gt;$ cd /project4&lt;BR /&gt;$ chown -R wic $( ls !(.snapshot) )&lt;BR /&gt;&lt;BR /&gt;&amp;gt;you had it right.  your command should work&lt;BR /&gt;&lt;BR /&gt;I don't see how?</description>
      <pubDate>Wed, 12 Mar 2008 06:17:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159610#M319802</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-12T06:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: .snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159611#M319803</link>
      <description>Actually right after I replied, I tested the command on /tmp area. It seems to work with -prune. &lt;BR /&gt;&lt;BR /&gt;My initial thought was, hey only find have --prune option, so I posted that xargs command, ofcourse that did not work as expected.&lt;BR /&gt;&lt;BR /&gt;But "chown someuser * -prune .somedir"&lt;BR /&gt;actually works (after cding to the correct directory) on my system. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Mar 2008 17:42:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159611#M319803</guid>
      <dc:creator>slydmin</dc:creator>
      <dc:date>2008-03-12T17:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: .snapshot</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159612#M319804</link>
      <description>&amp;gt;I tested the command on /tmp area. It seems to work with -prune.&lt;BR /&gt;&lt;BR /&gt;It doesn't work for me.  -prune is just a file.&lt;BR /&gt;Basically I got errors because the chown were done twice for the name after -prune and I didn't own it the second time.&lt;BR /&gt;&lt;BR /&gt;Besides doing the easy find | fgrep -v | xargs chown, you can work much harder:&lt;BR /&gt;$ find . \( ! -path "./.snapshot" -a ! -path "./.snapshot/*" \) | xargs chown ...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Mar 2008 06:36:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/snapshot/m-p/4159612#M319804</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-03-13T06:36:10Z</dc:date>
    </item>
  </channel>
</rss>

