<?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: Deleting spool files by creation date in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400240#M200656</link>
    <description>Pete,&lt;BR /&gt;&lt;BR /&gt;Thank you for your solutions.  I got the first method to work.  However, for the second method even with the changes, I am still getting an error:  &lt;BR /&gt;&lt;BR /&gt; # find /ifas/xport/.spool -type f -name O*.data -mtime +1 | xargs rm{}&lt;BR /&gt;xargs: rm{} not found&lt;BR /&gt;&lt;BR /&gt;I've tried it with a space betwwen rm and the {} and without...</description>
    <pubDate>Thu, 14 Oct 2004 14:31:14 GMT</pubDate>
    <dc:creator>Helga Skelly</dc:creator>
    <dc:date>2004-10-14T14:31:14Z</dc:date>
    <item>
      <title>Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400234#M200650</link>
      <description>Our software runs batch jobs that produce "tail sheets".  These tail sheets list warnings and errors.  We are deferring the tail sheets in order to avoid paper waste.  This presents another problem in that they need to be managed properly on the system.  Periodically, we woudl like to remove tail sheets more than 90 days old.  Is it possible to accomplish this in a script?  Is anyone doing this and would you be willing to share your script file?</description>
      <pubDate>Thu, 14 Oct 2004 11:48:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400234#M200650</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T11:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400235#M200651</link>
      <description>I do not have the script ready, but find can be used easily in your case. You can set it through cron ti run at certain time and move files to other location/delete/what eer you want.&lt;BR /&gt;&lt;BR /&gt;The command would be as follows.&lt;BR /&gt;&lt;BR /&gt;find /path -type -mtime +90 -exec mv {} /dest \;&lt;BR /&gt;&lt;BR /&gt;This would move files more than 90 days old to /dest dir.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 14 Oct 2004 11:52:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400235#M200651</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-10-14T11:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400236#M200652</link>
      <description>Helga,&lt;BR /&gt;&lt;BR /&gt;It's rather simple with the find command:&lt;BR /&gt;&lt;BR /&gt;find /dirname -type f -name file_name* -mtime +30 -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;find /dirname -type f -name file_name* -mtime +30 | xargs rm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 14 Oct 2004 11:52:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400236#M200652</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-10-14T11:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400237#M200653</link>
      <description>Hi, Pete&lt;BR /&gt;&lt;BR /&gt;I've been trying your first method.  I am logged in as root: &lt;BR /&gt;&lt;BR /&gt;find /ifas/xport/.spool -type f -name O*.data -mtime +90 -exec rm {}\;&lt;BR /&gt;&lt;BR /&gt;I keep getting an error: &lt;BR /&gt;find: -exec not terminated with ';'&lt;BR /&gt;I do have the ';' at the end of the command line.  &lt;BR /&gt;&lt;BR /&gt;When I tried your second method, I got the error:&lt;BR /&gt;Usage: rm [-Rfir] file ...&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?</description>
      <pubDate>Thu, 14 Oct 2004 13:22:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400237#M200653</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T13:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400238#M200654</link>
      <description>You need a space between {} and \;&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 14 Oct 2004 13:37:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400238#M200654</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-10-14T13:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400239#M200655</link>
      <description>Helga,&lt;BR /&gt;&lt;BR /&gt;Anil is exactly right for the first method and I left something out of the second method.  I think the second should be &lt;BR /&gt;find /ifas/xport/.spool -type f -name O*.data -mtime +90 | xargs rm {}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Oct 2004 13:45:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400239#M200655</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2004-10-14T13:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400240#M200656</link>
      <description>Pete,&lt;BR /&gt;&lt;BR /&gt;Thank you for your solutions.  I got the first method to work.  However, for the second method even with the changes, I am still getting an error:  &lt;BR /&gt;&lt;BR /&gt; # find /ifas/xport/.spool -type f -name O*.data -mtime +1 | xargs rm{}&lt;BR /&gt;xargs: rm{} not found&lt;BR /&gt;&lt;BR /&gt;I've tried it with a space betwwen rm and the {} and without...</description>
      <pubDate>Thu, 14 Oct 2004 14:31:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400240#M200656</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T14:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400241#M200657</link>
      <description>This is what I fo from cron:&lt;BR /&gt;&lt;BR /&gt;0 5 * * 1 [ -d /var/adm/lp/XEBEC ] &amp;amp;&amp;amp; /usr/local/bin/print.clean.receive &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;BR /&gt;&lt;BR /&gt;The -d just makes sure the directory exists (cause I use MC/SG).&lt;BR /&gt;&lt;BR /&gt;# cat /usr/local/bin/print.clean.receive&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;# Script to remove old print jobs&lt;BR /&gt;# Geoff Wild&lt;BR /&gt;# April 4 2002&lt;BR /&gt;#&lt;BR /&gt;find /var/spool/lp/receive -name '*PRD'  -mtime +7 -exec rm {} \; &amp;gt;/tmp/lp.receive.log&lt;BR /&gt;find /var/spool/lp/receive -name '*QA'  -mtime +7 -exec rm {} \; &amp;gt;&amp;gt;/tmp/lp.receive.log&lt;BR /&gt;find /var/spool/lp/receive -name '*DEV'  -mtime +7 -exec rm {} \; &amp;gt;&amp;gt;/tmp/lp.receive.log&lt;BR /&gt;find /var/spool/lp/receive -name '*VPR'  -mtime +7 -exec rm {} \; &amp;gt;&amp;gt;/tmp/lp.receive.log&lt;BR /&gt;find /var/adm/lp/XEBEC -name '*ftplog'  -mtime +7 -exec rm {} \; &amp;gt;&amp;gt;/tmp/lp.receive.log&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Oct 2004 15:11:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400241#M200657</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-14T15:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400242#M200658</link>
      <description>Thank you all for your assistance.  I am still having problems using the command successfully.  I'm no longer getting errors, but the files are not deleting.  I am logged in as root, trying to delete spoolfiles in the /ifas/xport/.spool directory.  Here is what I tried (not using dates, but the same idea using the find command in conjuction with a rm command):&lt;BR /&gt;&lt;BR /&gt;# pwd&lt;BR /&gt;/&lt;BR /&gt;# find /ifas/xport/.spool -type f -name O*.data -exec rm{} \;&lt;BR /&gt;# ll /ifas/xport/.spool&lt;BR /&gt;total 54&lt;BR /&gt;-rw-rw----   1 bsi        bsi              0 Oct 13 14:05 -t&lt;BR /&gt;-rw-rw----   1 bsi        bsi           9272 Oct 13 14:57 O3027.data&lt;BR /&gt;-rw-rw----   1 bsi        bsi           5271 Oct 13 16:44 O3058.data&lt;BR /&gt;-rw-rw----   1 bsi        bsi           9797 Oct 13 16:50 O3065.data&lt;BR /&gt;drwxrwxrwx   2 bsi        bsi             96 Jun 12  1999 tailsheets&lt;BR /&gt;-rw-rw----   1 bsi        bsi             14 Oct 15  2000 testfile&lt;BR /&gt;# &lt;BR /&gt;&lt;BR /&gt;Could someone please take a look at this?</description>
      <pubDate>Thu, 14 Oct 2004 15:47:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400242#M200658</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T15:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400243#M200659</link>
      <description>Put the O*.data in quotes:&lt;BR /&gt;&lt;BR /&gt;"O*.data"&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Thu, 14 Oct 2004 15:52:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400243#M200659</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-14T15:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400244#M200660</link>
      <description>I tried the quotes, but the files still did not delete...&lt;BR /&gt;&lt;BR /&gt;# pwd&lt;BR /&gt;/&lt;BR /&gt;# whoami&lt;BR /&gt;root&lt;BR /&gt;# find /ifas/xport/.spool -type f -name "O*.data" -exec rm{} \;&lt;BR /&gt;# ll /ifas/xport/.spool&lt;BR /&gt;total 54&lt;BR /&gt;-rw-rw----   1 bsi        bsi              0 Oct 13 14:05 -t&lt;BR /&gt;-rw-rw----   1 bsi        bsi           9272 Oct 13 14:57 O3027.data&lt;BR /&gt;-rw-rw----   1 bsi        bsi           5271 Oct 13 16:44 O3058.data&lt;BR /&gt;-rw-rw----   1 bsi        bsi           9797 Oct 13 16:50 O3065.data&lt;BR /&gt;drwxrwxrwx   2 bsi        bsi             96 Jun 12  1999 tailsheets&lt;BR /&gt;-rw-rw----   1 bsi        bsi             14 Oct 15  2000 testfile&lt;BR /&gt;# &lt;BR /&gt;Do you have any other suggestions I could try?</description>
      <pubDate>Thu, 14 Oct 2004 16:00:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400244#M200660</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400245#M200661</link>
      <description>Yes - you need a space after the rm&lt;BR /&gt;&lt;BR /&gt;before the {}&lt;BR /&gt;&lt;BR /&gt;find /ifas/xport/.spool -type f -name "O*.data" -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...geoff</description>
      <pubDate>Thu, 14 Oct 2004 16:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400245#M200661</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-14T16:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting spool files by creation date</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400246#M200662</link>
      <description>Yes!  It worked!  Thank you so much, Geoff.</description>
      <pubDate>Thu, 14 Oct 2004 16:08:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-spool-files-by-creation-date/m-p/3400246#M200662</guid>
      <dc:creator>Helga Skelly</dc:creator>
      <dc:date>2004-10-14T16:08:48Z</dc:date>
    </item>
  </channel>
</rss>

