<?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: System Cleanup Warning/Alerting Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722063#M63371</link>
    <description>Well, the reality is that I just became an administrator here a few months ago, and this terrible mess was already out of control way before then.  &lt;BR /&gt;&lt;BR /&gt;However, my view is: "If it is broken or seems broken try to fix it".  I do not think it's too late, but I will need active participation from users; eventually I may need to be a little merciless, but I am not thinking about getting there yet.&lt;BR /&gt;&lt;BR /&gt;For now, I will need some active participation and then as the number of dumped junk files decreases, organization may finally come back under control.  Bill, thanks for your input though!  &lt;BR /&gt;&lt;BR /&gt;We are getting the opportunity to start fresh on a new production server, and this one I am working on will become a test/development server.  Lessons learned here will serve the future environment.</description>
    <pubDate>Sun, 12 May 2002 21:41:13 GMT</pubDate>
    <dc:creator>MAD_2</dc:creator>
    <dc:date>2002-05-12T21:41:13Z</dc:date>
    <item>
      <title>System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722059#M63367</link>
      <description>OK, anyone out there has a script that will do something like this (I do not want to re-invent the wheel, so I would really appreciate it if shared):&lt;BR /&gt;&lt;BR /&gt;1.  Find files that are older than x days (let's use 180 days for example).&lt;BR /&gt;2.  Also look for files with common patterns such as (.dmp, .log, .txt, core*, .out, etc.)&lt;BR /&gt;3.  Break down listings of these files by owner and email their own list to each user account to inform them that the files were created so long ago and he/she need to review if these need to be removed.&lt;BR /&gt;&lt;BR /&gt;I need to do some major maintenance in our system and many users have created files and left them all over the place and I don't want to personally remove them without consulting with their creators.&lt;BR /&gt;&lt;BR /&gt;My major concern is to targe big output files that are no longer of any use by their owners or anyone else and are just taking precious space.  Thanks,</description>
      <pubDate>Sun, 12 May 2002 16:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722059#M63367</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-12T16:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722060#M63368</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You could walk a list, by example, like this:&lt;BR /&gt;&lt;BR /&gt;# for USER in user1 user2 user3&lt;BR /&gt;&amp;gt; do&lt;BR /&gt;&amp;gt; find /tmp \( -type f -name "*.log" -a -user $USER -a -mtime +180 \) &amp;gt; $HOME/${USER}.files&lt;BR /&gt;&amp;gt; if [ -s "$HOME/${USER}.files" ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo "no files matching criteria for $USER"&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; mailx -s "Old File List" $USER &amp;lt; $HOME/${USER}.files&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;&amp;gt; done&lt;BR /&gt;&lt;BR /&gt;Have a look at the man pages for 'find' for more information.  As written, the example looks at the /tmp directory for files ('type f') whose name ends in '.log'.  The files must also belong to $USER and have been modified in 180 or more days.  Note that a space surrounds the escaped parentheses.  Note also that the wildcarded 'name' argument is escaped with double quote marks to prevent the shell from expanding the name before the 'find' command processes it.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sun, 12 May 2002 19:28:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722060#M63368</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-12T19:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722061#M63369</link>
      <description>Excellent James, I can work with this.&lt;BR /&gt;&lt;BR /&gt;Thanks, I just hope I get more input from others!</description>
      <pubDate>Sun, 12 May 2002 20:07:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722061#M63369</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-12T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722062#M63370</link>
      <description>I would start with a set of rules for all users: /var/tmp and /tmp are *TEMPORARY* storage -- period.  Give users a week to cleanup their junk and then be ruthless in your cleanup. Make no apologies since the purchase of additional disks for all these junk files is not an option. (Naturally, you have verified backups of the system, so with great effort, the missing files can be restored.&lt;BR /&gt;&lt;BR /&gt;NOTE: if umask has never been set, then everything you have created as root is contaminated! The reason is that root has created dozens, perhaps hundreds of directories and files that have world-writable permissions--very bad.  And you can safely assume that every file and directory has been trashed in one way or another. To see what this looks like:&lt;BR /&gt;&lt;BR /&gt;find / /opt /usr -xdev -perm -002 -exec ls -ld {} \;&lt;BR /&gt;&lt;BR /&gt;And what this means is that users have scattered all of their files all over the system. So cleanup will be complicated by the open permissions in so many directories. But I would still be ruthless to put the storage space under control. The vast majority of the removed files will be junk and if someone really needs their special file from /tmp, you can restore it (in the near future).</description>
      <pubDate>Sun, 12 May 2002 21:10:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722062#M63370</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-05-12T21:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722063#M63371</link>
      <description>Well, the reality is that I just became an administrator here a few months ago, and this terrible mess was already out of control way before then.  &lt;BR /&gt;&lt;BR /&gt;However, my view is: "If it is broken or seems broken try to fix it".  I do not think it's too late, but I will need active participation from users; eventually I may need to be a little merciless, but I am not thinking about getting there yet.&lt;BR /&gt;&lt;BR /&gt;For now, I will need some active participation and then as the number of dumped junk files decreases, organization may finally come back under control.  Bill, thanks for your input though!  &lt;BR /&gt;&lt;BR /&gt;We are getting the opportunity to start fresh on a new production server, and this one I am working on will become a test/development server.  Lessons learned here will serve the future environment.</description>
      <pubDate>Sun, 12 May 2002 21:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722063#M63371</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2002-05-12T21:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: System Cleanup Warning/Alerting Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722064#M63372</link>
      <description>Mynor,&lt;BR /&gt;&lt;BR /&gt;While I think your approach is admirable if not downright noble, I think you will find the "active participation" of users to be frustratingly elusive.  By all means, give it a try and I wish you luck with it, but I think ultimately you're going to have to go to Bill's approach simply to save your sanity.&lt;BR /&gt;&lt;BR /&gt;Best of luck,&lt;BR /&gt;Pete</description>
      <pubDate>Mon, 13 May 2002 10:03:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/system-cleanup-warning-alerting-script/m-p/2722064#M63372</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-05-13T10:03:54Z</dc:date>
    </item>
  </channel>
</rss>

