<?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: Abandoned files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153377#M455129</link>
    <description>"My question is, how do i know the absolute path of a file say i.e SDBM_File.pm "&lt;BR /&gt;&lt;BR /&gt;since you started find in "/", I'll bet that's where you will find the file.</description>
    <pubDate>Thu, 29 Jan 2009 18:11:43 GMT</pubDate>
    <dc:creator>OldSchool</dc:creator>
    <dc:date>2009-01-29T18:11:43Z</dc:date>
    <item>
      <title>Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153366#M455118</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a script to check for abandoned files on our HP-UX server. Attaching the script for reference.&lt;BR /&gt;&lt;BR /&gt;Now, we are asked to assign the user and group as "root" for these files. We have abandoned files aroung 3000+ on some servers. Can someone provide a script to do this rather than doing it one file at a time.&lt;BR /&gt;&lt;BR /&gt;Any input is really appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank You..&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ashish A. Lahori&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:33:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153366#M455118</guid>
      <dc:creator>AL_3001</dc:creator>
      <dc:date>2009-01-29T09:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153367#M455119</link>
      <description>just add this to the end of the script&lt;BR /&gt;&lt;BR /&gt;for file in $(cat /var/tmp/abandoned_files.txt)&lt;BR /&gt;do&lt;BR /&gt;   echo "Changing Permission of file $file to root.\n"&lt;BR /&gt;   chown root:root $file&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 09:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153367#M455119</guid>
      <dc:creator>bright image</dc:creator>
      <dc:date>2009-01-29T09:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153368#M455120</link>
      <description>Check this out&lt;BR /&gt;find / -local \( -nouser -o -nogroup \) -exec chown root:root  {} \; 2&amp;gt;/dev/null |grep -v "total 0"&lt;BR /&gt;&lt;BR /&gt;Sagar</description>
      <pubDate>Thu, 29 Jan 2009 09:42:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153368#M455120</guid>
      <dc:creator>Sagar Sirdesai</dc:creator>
      <dc:date>2009-01-29T09:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153369#M455121</link>
      <description>You absolutely don't want to use root:root for these files.  Better to make up a dummy user.  You could use bin:bin.&lt;BR /&gt;&lt;BR /&gt;You need to change your find so you don't invoke ls.  Or you need to add -d so ll on directories don't list the files under them:&lt;BR /&gt;awk '{print $9}' /var/tmp/abandoned_files.txt | xargs chown bin:bin</description>
      <pubDate>Thu, 29 Jan 2009 09:44:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153369#M455121</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-29T09:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153370#M455122</link>
      <description>&amp;gt;bright: for file in $(&amp;lt; /var/tmp/abandoned_files.txt)&lt;BR /&gt;&lt;BR /&gt;If lots of files, "for" may not work.  No need for evil cat.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Sagar: find / -local \( -nouser -o -nogroup \) -exec chown root:root {} \; 2&amp;gt;/dev/null |grep -v "total 0"&lt;BR /&gt;&lt;BR /&gt;No need for that grep (ll output) and that stderr redirection.  Also replace that \; with "+" for performance.</description>
      <pubDate>Thu, 29 Jan 2009 09:50:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153370#M455122</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-29T09:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153371#M455123</link>
      <description>just realised after seeing Dennis' reply:&lt;BR /&gt;&lt;BR /&gt;the for loop should be&lt;BR /&gt;&lt;BR /&gt;for file in $(awk '{print $9}'/var/tmp/abandoned_files.txt)&lt;BR /&gt;&lt;BR /&gt;or the other find commands suggested will work as well - although these will have to search the filesystem again.</description>
      <pubDate>Thu, 29 Jan 2009 09:54:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153371#M455123</guid>
      <dc:creator>bright image</dc:creator>
      <dc:date>2009-01-29T09:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153372#M455124</link>
      <description>Thanks for the reply dennis - do you know what the limit on a for loop is?</description>
      <pubDate>Thu, 29 Jan 2009 09:55:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153372#M455124</guid>
      <dc:creator>bright image</dc:creator>
      <dc:date>2009-01-29T09:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153373#M455125</link>
      <description>&amp;gt;bright: for file in $(awk '{print $9}'/var/tmp/abandoned_files.txt)&lt;BR /&gt;&lt;BR /&gt;No need for a for-loop because you can put these files on chmod directly:&lt;BR /&gt;chmod bin:bin &lt;BR /&gt;$(awk '{print $9}' /var/tmp/abandoned_files.txt)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;do you know what the limit on a for loop is?&lt;BR /&gt;&lt;BR /&gt;I thought it is at least 1 Mb.</description>
      <pubDate>Thu, 29 Jan 2009 10:16:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153373#M455125</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-29T10:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153374#M455126</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;I have made a seperate script to assign the abandoned file ownership to bin:bin. However, I get the below error:&lt;BR /&gt;---------------------------------&lt;BR /&gt;# ./aban_chk.sh&lt;BR /&gt;Usage: chmod [-A] [-R] [ugoa]+-=[rwxXstugo][,...] file ...&lt;BR /&gt;./aban_chk.sh[2]: .cshrc:  not found.&lt;BR /&gt;---------------------------------&lt;BR /&gt;&lt;BR /&gt;Attaching the script in the .txt file.&lt;BR /&gt;&lt;BR /&gt;Kindly assist.&lt;BR /&gt;&lt;BR /&gt;Thanks..&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ashish&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 11:35:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153374#M455126</guid>
      <dc:creator>AL_3001</dc:creator>
      <dc:date>2009-01-29T11:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153375#M455127</link>
      <description>Dennis/ Gurus,&lt;BR /&gt;&lt;BR /&gt;One more question, few of the abandoned files seen in file abandoned_files.txt is attached.&lt;BR /&gt;&lt;BR /&gt;My question is, how do i know the absolute path of a file say i.e SDBM_File.pm . &lt;BR /&gt;&lt;BR /&gt;Kindly assist.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ashish</description>
      <pubDate>Thu, 29 Jan 2009 12:05:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153375#M455127</guid>
      <dc:creator>AL_3001</dc:creator>
      <dc:date>2009-01-29T12:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153376#M455128</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;having no absolute filename in your list, you can only guess.&lt;BR /&gt;You'll have to record the full pathname, when creating the list at first.&lt;BR /&gt;For example, change constructs like&lt;BR /&gt;cd /this/dir/name&lt;BR /&gt;find . -option ........&lt;BR /&gt;to&lt;BR /&gt;find /this/dir/name -option ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Thu, 29 Jan 2009 17:29:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153376#M455128</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2009-01-29T17:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153377#M455129</link>
      <description>"My question is, how do i know the absolute path of a file say i.e SDBM_File.pm "&lt;BR /&gt;&lt;BR /&gt;since you started find in "/", I'll bet that's where you will find the file.</description>
      <pubDate>Thu, 29 Jan 2009 18:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153377#M455129</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-01-29T18:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153378#M455130</link>
      <description>Hi Gurus,&lt;BR /&gt;&lt;BR /&gt;How can I search files using a find coming with date syntax in the search.&lt;BR /&gt;&lt;BR /&gt;For Eg:&lt;BR /&gt;-------------------------------------&lt;BR /&gt;-rw-r-----   1 root       root           814 Jun  9  1997 .cshrc&lt;BR /&gt;-rw-r-----   1 root       root           347 Jun  9  1997 .exrc&lt;BR /&gt;-rw-r-----   1 root       root           341 Jun  9  1997 .login&lt;BR /&gt;-rw-r-----   1 root       root           446 Jun  9  1997 .profile&lt;BR /&gt;-------------------------------------&lt;BR /&gt;&lt;BR /&gt;Eg: In the /var/tmp/abandonedfiles.txt file i see the above 4 files with relative path. Can i search these files with the timestspa as Jun 9 19997 in my find command?&lt;BR /&gt;&lt;BR /&gt;Assistance required.&lt;BR /&gt;&lt;BR /&gt;Thank You..&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ashish A. Lahori</description>
      <pubDate>Fri, 30 Jan 2009 08:37:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153378#M455130</guid>
      <dc:creator>AL_3001</dc:creator>
      <dc:date>2009-01-30T08:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153379#M455131</link>
      <description>&amp;gt;Usage: chmod [-A] [-R] [ugoa]+-=[rwxXstugo][,...] file ...&lt;BR /&gt;&lt;BR /&gt;Sorry, I didn't realize the forum split the two lines.  When I saw it, I assumed you would figure it out.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;how do i know the absolute path of a file&lt;BR /&gt;&lt;BR /&gt;As I mentioned, you are going to have to redo that find and use "-exec ls -l -d".  Or just remove -exec.&lt;BR /&gt;&lt;BR /&gt;Or you can ignore them since they come from the directory and you can rescan after you chown the files.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;OldSchool: since you started find in "/", I'll bet that's where you will find the file.&lt;BR /&gt;&lt;BR /&gt;No, the files would start with "/".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Can I search these files with the timestamps as Jun 9 1997 in my find command?&lt;BR /&gt;&lt;BR /&gt;Why bother?  These files are repeated with the absolute path:&lt;BR /&gt;grep "Jun.*9.*1997.*\.cshrc" /var/tmp/abandoned_files.txt</description>
      <pubDate>Fri, 30 Jan 2009 09:36:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153379#M455131</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-01-30T09:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Abandoned files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153380#M455132</link>
      <description>Thanks for the advice gurus...</description>
      <pubDate>Thu, 19 Feb 2009 11:51:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/abandoned-files/m-p/5153380#M455132</guid>
      <dc:creator>AL_3001</dc:creator>
      <dc:date>2009-02-19T11:51:17Z</dc:date>
    </item>
  </channel>
</rss>

