<?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: cannot get 'pwd'  script error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174233#M161685</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is /home/ac/log linked to another directory?&lt;BR /&gt;If so try using -follow in that command.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 26 Jan 2004 14:17:00 GMT</pubDate>
    <dc:creator>Jeff Schussele</dc:creator>
    <dc:date>2004-01-26T14:17:00Z</dc:date>
    <item>
      <title>find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174232#M161684</link>
      <description>I know I posted earlier about this error, and the fix was to just cd to the directory first, then do a find, but if I have it working correctly on one machine and not another, I need to know why? Same permission, owners, groups...&lt;BR /&gt;&lt;BR /&gt;Here is the problem...&lt;BR /&gt;I have an HP 11.00 system.&lt;BR /&gt;I am running into this problem that when I run a script it returns an error...&lt;BR /&gt;find: cannot get 'pwd'&lt;BR /&gt;&lt;BR /&gt;This is from the command...&lt;BR /&gt;find /home/ac/log -name "archbu.log.*" -type f -mtime +7 -exec /bin/rm -r {} ";"&lt;BR /&gt;&lt;BR /&gt;I have tried it with \; at the end as well, and still no go. &lt;BR /&gt;The funny thing is, is that I have this identicle script on another identicle server, and it works perfect. All permission's are the same.&lt;BR /&gt;&lt;BR /&gt;This script is being run from roots crontab...&lt;BR /&gt;su acadmin -c /home/ac/scripts/backup/d2t_archbu.sh&lt;BR /&gt;&lt;BR /&gt;I know if I cd to the directory first, I know it will work, but why can't it work with cd'ing to the directory, like the other server. &lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jan 2004 14:09:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174232#M161684</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-01-26T14:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174233#M161685</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is /home/ac/log linked to another directory?&lt;BR /&gt;If so try using -follow in that command.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jan 2004 14:17:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174233#M161685</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-26T14:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174234#M161686</link>
      <description>Oh &amp;amp; you might also want to use -path or -print to force the entire fully pathed filename to output into the rm command if it's not a linked dir.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 26 Jan 2004 14:19:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174234#M161686</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-01-26T14:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174235#M161687</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Do you use the automounter ? If so the homedir is not mounted before you use the cd command.&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Mon, 26 Jan 2004 14:20:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174235#M161687</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2004-01-26T14:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174236#M161688</link>
      <description>I HAVE FOUND MY PROBLEM!!!&lt;BR /&gt;&lt;BR /&gt;I changed the permissions on /rootuser, since root was running the crontab, and everything works fine.&lt;BR /&gt;&lt;BR /&gt;WOW, what alitte gotcha!&lt;BR /&gt;&lt;BR /&gt;Thank you all.</description>
      <pubDate>Mon, 26 Jan 2004 14:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174236#M161688</guid>
      <dc:creator>Ratzie</dc:creator>
      <dc:date>2004-01-26T14:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174237#M161689</link>
      <description>Hi,&lt;BR /&gt;the problem is really that find tries to read in the CURRENT directory, no matter whether this is relevant for the action to be taken or not. The outcome of your command will depend on the directory from which you execute the command. If you cd to any directory in which your user has read access the error will not appear.&lt;BR /&gt;I have just tried thie:&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;# ls -ld .&lt;BR /&gt;d-wx--x--x   2 jxk        users           96 Jan 26 20:09 .&lt;BR /&gt;# find /tmp -type f -name "btmp.stat"&lt;BR /&gt;find: cannot get 'pwd'&lt;BR /&gt;# cd ..&lt;BR /&gt;# ls -ld .&lt;BR /&gt;drwxr-xrwx  23 jxk        users         2048 Jan 26 20:09 .&lt;BR /&gt;# find /tmp -type f -name "btmp.stat"&lt;BR /&gt;find: cannot open /tmp/.AgentSockets&lt;BR /&gt;find: cannot open /tmp/syslogtp&lt;BR /&gt;find: cannot open /tmp/tp-sc&lt;BR /&gt;find: cannot open /tmp/hp11templ&lt;BR /&gt;find: cannot open /tmp/fbatp&lt;BR /&gt;find: cannot open /tmp/shitp&lt;BR /&gt;find: cannot open /tmp/oper&lt;BR /&gt;find: cannot open /tmp/msg&lt;BR /&gt;find: cannot open /tmp/app&lt;BR /&gt;find: cannot open /tmp/opcmsg13&lt;BR /&gt;find: cannot open /tmp/shi&lt;BR /&gt;find: cannot open /tmp/wnt&lt;BR /&gt;/tmp/btmp.stat&lt;BR /&gt; &lt;BR /&gt;as can be seen it is not relevant for the find command whether it can read the current dir or not. But to explain why this is so... well, that is a challenge. &lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;&lt;BR /&gt;p.s. I still think you should finish your find command by the escaped semicolon.</description>
      <pubDate>Mon, 26 Jan 2004 14:34:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174237#M161689</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-01-26T14:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: find: cannot get 'pwd'  script error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174238#M161690</link>
      <description>sorry the first command in my example was lost. It was:&lt;BR /&gt;# pwd&lt;BR /&gt;/home/jxk/newdir&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jan 2004 14:42:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/find-cannot-get-pwd-script-error/m-p/3174238#M161690</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2004-01-26T14:42:26Z</dc:date>
    </item>
  </channel>
</rss>

