<?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: quick script to houseclean old files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654711#M46922</link>
    <description>James,&lt;BR /&gt;&lt;BR /&gt;Delete dat files that have not been modified for 7 days.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;find /the/dir -type f -name *.dat -mtime +7 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;man find&lt;BR /&gt;&lt;BR /&gt;...jcd...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 29 Jan 2002 14:32:26 GMT</pubDate>
    <dc:creator>Joseph C. Denman</dc:creator>
    <dc:date>2002-01-29T14:32:26Z</dc:date>
    <item>
      <title>quick script to houseclean old files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654710#M46921</link>
      <description>Good Morning,&lt;BR /&gt;&lt;BR /&gt;Their was a question that arose. We are beginning on a new Unix venture and our application developer needs to write a script to control old files. He needs to check the age of a group of files, if the age exceeds a certain # of days then perform a remove. How could we accomplish this.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;-barry donovan&lt;BR /&gt;pfpc global fund services</description>
      <pubDate>Tue, 29 Jan 2002 14:25:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654710#M46921</guid>
      <dc:creator>James Barry Donovan</dc:creator>
      <dc:date>2002-01-29T14:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: quick script to houseclean old files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654711#M46922</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;Delete dat files that have not been modified for 7 days.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;find /the/dir -type f -name *.dat -mtime +7 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;man find&lt;BR /&gt;&lt;BR /&gt;...jcd...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 29 Jan 2002 14:32:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654711#M46922</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2002-01-29T14:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: quick script to houseclean old files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654712#M46923</link>
      <description>Hi &lt;BR /&gt;I am not sure if it resolve your problem but try to use next command (lets say we are interested in file located in folder /folder)&lt;BR /&gt;&lt;BR /&gt;#find /folder -atime +30 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;it finds all files older than 30 days in /folder and erase it.&lt;BR /&gt;&lt;BR /&gt;hope it help</description>
      <pubDate>Tue, 29 Jan 2002 14:37:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654712#M46923</guid>
      <dc:creator>Sebastian Galeski_1</dc:creator>
      <dc:date>2002-01-29T14:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: quick script to houseclean old files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654713#M46924</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Try something like this.&lt;BR /&gt;&lt;BR /&gt;DIR=/home/mydir&lt;BR /&gt;&lt;BR /&gt;find ${DIR} -type f -mtime +10 -name '*.dat' -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;That will find all regular files (-type f) older than 10 days (-mtime +10) that end with '.dat' (-name '*.dat') and then call rm on that file.&lt;BR /&gt;&lt;BR /&gt;Man find for details and make sure that you do something like -exec echo {} \; as a test before you substitute the rm command in the real thing.&lt;BR /&gt;&lt;BR /&gt;Regards, Clay</description>
      <pubDate>Tue, 29 Jan 2002 14:38:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654713#M46924</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-01-29T14:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: quick script to houseclean old files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654714#M46925</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Use the 'find' command with '-mtime' option.&lt;BR /&gt;&lt;BR /&gt;For eg:&lt;BR /&gt;&lt;BR /&gt;# find /test -xdev -type f -mtime +10 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;This will delete the files which are not modified within last 10 days from /test.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Shiju</description>
      <pubDate>Tue, 29 Jan 2002 14:41:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/quick-script-to-houseclean-old-files/m-p/2654714#M46925</guid>
      <dc:creator>Helen French</dc:creator>
      <dc:date>2002-01-29T14:41:45Z</dc:date>
    </item>
  </channel>
</rss>

