<?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: find command not working correctly in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770360#M261091</link>
    <description>The command is fine. It should delete files in /var/tmp that have mtime more than a day old. What exactly was deleted and what not?</description>
    <pubDate>Tue, 11 Apr 2006 23:31:11 GMT</pubDate>
    <dc:creator>RAC_1</dc:creator>
    <dc:date>2006-04-11T23:31:11Z</dc:date>
    <item>
      <title>find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770358#M261089</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I noticed that the /usr/tmp directory was deleted - this is a link to /var/tmp. I eventually found that a cron job was deleting it.&lt;BR /&gt;The cron job was simply "find /usr/tmp -mtime +1 -exec rm {} \;"&lt;BR /&gt;Not only was the /usr/tmp directory deleted but also the files in the directory were not deleted as expected.&lt;BR /&gt;The only way I could get this to work properly was to do the find command against the "base" directory (/var/tmp) instead.&lt;BR /&gt;&lt;BR /&gt;So my question is simply, is this normal behaviour or is there a bug in the system. I am running HP-UX 11.23&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2006 23:20:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770358#M261089</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-11T23:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770359#M261090</link>
      <description>Hi Mike, &lt;BR /&gt;&lt;BR /&gt;/var/tmp is required for some applications to work properly. So, dont attempt to delete it.&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 11 Apr 2006 23:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770359#M261090</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-04-11T23:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770360#M261091</link>
      <description>The command is fine. It should delete files in /var/tmp that have mtime more than a day old. What exactly was deleted and what not?</description>
      <pubDate>Tue, 11 Apr 2006 23:31:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770360#M261091</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-11T23:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770361#M261092</link>
      <description>Hi RAC,&lt;BR /&gt;&lt;BR /&gt;As I said originally, the command "find /usr/tmp -mtime +1 -exec rm {} \;" deletes the /usr/tmp link and does not delete the files in the directory.&lt;BR /&gt;But if I run the command "find /var/tmp -mtime +1 -exec rm {} \;", it works correctly.&lt;BR /&gt;/usr/tmp is standard on 11.23 and is a link to /var/tmp&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2006 23:35:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770361#M261092</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-11T23:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770362#M261093</link>
      <description>I think you need to add -follow to find command. It will follow a link then.&lt;BR /&gt;man find for details.</description>
      <pubDate>Tue, 11 Apr 2006 23:41:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770362#M261093</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-11T23:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770363#M261094</link>
      <description>Hi RAC,&lt;BR /&gt;&lt;BR /&gt;I'll check it out and update later.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2006 23:44:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770363#M261094</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-11T23:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770364#M261095</link>
      <description>Mike&lt;BR /&gt;&lt;BR /&gt;What happens if you add the option &lt;BR /&gt;"-type f" to your command.&lt;BR /&gt;&lt;BR /&gt;Darrel</description>
      <pubDate>Tue, 11 Apr 2006 23:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770364#M261095</guid>
      <dc:creator>Darrel Louis</dc:creator>
      <dc:date>2006-04-11T23:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770365#M261096</link>
      <description>Hi Darrel,&lt;BR /&gt;&lt;BR /&gt;I haven't tried!!&lt;BR /&gt;All I tried was changing the /usr/tmp to /var/tmp in the find command and it worked correctly.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2006 23:48:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770365#M261096</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-11T23:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770366#M261097</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I tried the "-type l" and "-follow" args to the find command and it makes no difference.&lt;BR /&gt;The link directory is removed and therefore the files in the directory are left behind.&lt;BR /&gt;&lt;BR /&gt;Is this a bug or am I doing something stupid?&lt;BR /&gt;Has anyone else had this problem?&lt;BR /&gt;&lt;BR /&gt;Cheers.</description>
      <pubDate>Wed, 12 Apr 2006 20:55:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770366#M261097</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-12T20:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770367#M261098</link>
      <description>I tested it on 11.23 and had no problems.&lt;BR /&gt;My setup is as follows.&lt;BR /&gt;/usr/tmp link to /var/tmp which is again a link to /tmp&lt;BR /&gt;I used following command.&lt;BR /&gt;find /usr/tmp -follow -mtime +1 &lt;BR /&gt;What exact command you are using now?</description>
      <pubDate>Wed, 12 Apr 2006 22:48:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770367#M261098</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-12T22:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770368#M261099</link>
      <description>Hi RAC,&lt;BR /&gt;&lt;BR /&gt;If I run the command "find /usr/tmp -follow -mtime +1" it displays correctly.&lt;BR /&gt;The problem is when I run the command "find /usr/tmp -follow -mtime +1 -exec rm {} \;".&lt;BR /&gt;It deletes the /usr/tmp directory!!&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Apr 2006 22:55:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770368#M261099</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-12T22:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770369#M261100</link>
      <description>What if you add -type f</description>
      <pubDate>Wed, 12 Apr 2006 23:01:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770369#M261100</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-12T23:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770370#M261101</link>
      <description>You probably really should add a '-type f' (that is 'f' as in 'f'ile) to your command.  That way it won't delete the link.&lt;BR /&gt;&lt;BR /&gt;find /usr/tmp -type f -follow -mtime +1 -exec rm {} \;</description>
      <pubDate>Wed, 12 Apr 2006 23:03:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770370#M261101</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-04-12T23:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770371#M261102</link>
      <description>Thanks Patrick,&lt;BR /&gt;&lt;BR /&gt;Your command certainly doesn't delete the /usr/tmp directory, but unfortunately it also doesn't delete any matching files in the directory.&lt;BR /&gt;If I use your command, and change the /usr/tmp to /var/tmp, then the matching files in the directory do get deleted.&lt;BR /&gt;&lt;BR /&gt;The "catch" lies in the fact that the directory /usr/tmp is a link to /var/tmp.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Apr 2006 23:10:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770371#M261102</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-12T23:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770372#M261103</link>
      <description>Is /var/tmp link to /tmp?</description>
      <pubDate>Wed, 12 Apr 2006 23:19:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770372#M261103</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-12T23:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770373#M261104</link>
      <description>Hi RAC,&lt;BR /&gt;&lt;BR /&gt;No, /var/tmp is a directory "on it's own" - not a link.&lt;BR /&gt;&lt;BR /&gt;[root@lando:/var]# ls -l | grep tmp&lt;BR /&gt;drwxrwxrwt   6 root       root          8192 Apr 13 14:05 tmp&lt;BR /&gt;&lt;BR /&gt;[root@lando:/usr]# ls -l | grep tmp&lt;BR /&gt;lrwxrwxrwt   1 root       sys              8 Feb 24 14:06 tmp -&amp;gt; /var/tmp&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;</description>
      <pubDate>Wed, 12 Apr 2006 23:27:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770373#M261104</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-12T23:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770374#M261105</link>
      <description>also, how about ading -depth to find command?&lt;BR /&gt;&lt;BR /&gt;find /usr/tmp -depth -follow -mtime +1</description>
      <pubDate>Wed, 12 Apr 2006 23:33:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770374#M261105</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-04-12T23:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770375#M261106</link>
      <description>Hi Mike,&lt;BR /&gt;try adding / at the end of the dire name:&lt;BR /&gt;find /usr/tmp/ -mtime +1 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;in this way find should remove the file in the directory and not the link&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Thu, 13 Apr 2006 05:19:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770375#M261106</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-04-13T05:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770376#M261107</link>
      <description>Hi Art,&lt;BR /&gt;&lt;BR /&gt;No, that didn't make any difference!&lt;BR /&gt;Same results - /usr/tmp directory deleted.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Apr 2006 08:09:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770376#M261107</guid>
      <dc:creator>Mike Ingram_1</dc:creator>
      <dc:date>2006-04-13T08:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: find command not working correctly</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770377#M261108</link>
      <description>Well, my solution would be to use the correct directory name.  Since /usr/tmp is a link to /var/tmp, just use /var/tmp in the find command.&lt;BR /&gt;&lt;BR /&gt;I believe /usr/tmp is a "transition link", which means it was originally provided for compatibility reasons in the HP-UX 9.x to HP-UX 10.x transition.  Since it is a transition link , anything referencing /usr/tmp really should be changed to /var/tmp.  Why?  Because it is entirely possible that at some point in time all the transition links will go away.&lt;BR /&gt;&lt;BR /&gt;They have been around since HP-UX 10.x came out, one would hope that most people have started using the new directory layouts by now.&lt;BR /&gt;&lt;BR /&gt;By the way, you can get a list of all 'transition links' on your system with the '/opt/upgrade/bin/tllist' command.&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Apr 2006 08:18:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-command-not-working-correctly/m-p/3770377#M261108</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-04-13T08:18:40Z</dc:date>
    </item>
  </channel>
</rss>

