<?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 more than three days old print jobs in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802952#M82344</link>
    <description>Thanks. Points awarded under new thread.</description>
    <pubDate>Thu, 19 Dec 2002 15:57:53 GMT</pubDate>
    <dc:creator>Andy Torres</dc:creator>
    <dc:date>2002-12-19T15:57:53Z</dc:date>
    <item>
      <title>deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802941#M82333</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;How to delete more than three days old print job? Is thery any command? Or Do I have to write shell script? If it is shell script means how to compare date?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 10 Sep 2002 03:03:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802941#M82333</guid>
      <dc:creator>SAM_24</dc:creator>
      <dc:date>2002-09-10T03:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802942#M82334</link>
      <description>When a file is printed it'll be spooled to /var/spool/lp/request/&lt;PRINTERNAME&gt; before it is sent to the printer. 2 files will be created in this directory.&lt;BR /&gt;1) file that start with "c..." (for example c6544venus)&lt;BR /&gt;2) file that start with "d..." (for example c6544venus)&lt;BR /&gt;The first one is a control file and the second one is the data file itself. So if you want to remove a specific print job you would simple delete these 2 files. In your case if you want to delete say all print jobs older than 3 days for printer name "laser5" for example , you would ..&lt;BR /&gt;# cd /var/spool/lp/request/laser5&lt;BR /&gt;# find . -type f -atime +3 -exec rm -f {} \;&lt;BR /&gt;Just one question, why 3 days ? In my opinion there should not be any files left in the spooler directory which are older than 1 day unless there are tons of print jobs which some can take up to a days before it got printed.&lt;/PRINTERNAME&gt;</description>
      <pubDate>Tue, 10 Sep 2002 04:41:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802942#M82334</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-09-10T04:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802943#M82335</link>
      <description>Hi Chan,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply. Great.&lt;BR /&gt;In find command should I use -mtime option? If I use -atime it only lists d* files. mtime option lists both c* &amp;amp; d* files.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Tue, 10 Sep 2002 06:03:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802943#M82335</guid>
      <dc:creator>SAM_24</dc:creator>
      <dc:date>2002-09-10T06:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802944#M82336</link>
      <description>Hi Raj,&lt;BR /&gt;&lt;BR /&gt;Sure, you can use -mtime.  However, I would caution that you check the file name as well.  There are (or may be) some status files like .remotesending or .sendingstatus that should probably be left alone.  Add a -name check to your find to look specifically for c* and d* files and you should be fine.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 10 Sep 2002 09:44:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802944#M82336</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-09-10T09:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802945#M82337</link>
      <description>Hi Raj,&lt;BR /&gt;&lt;BR /&gt;simply deleting the files from /var/spool/lp/request/&lt;PRINTERNAME&gt; does not remove their entries from the /var/spool/lp/outputq file. This means your outputq file grows and grows. This is annoying when restarting the spooler. At startup lp wastes a lot of time looking for files that have already been deleted. &lt;BR /&gt;Depending on the amount of spool you delete this way, it may result in having to wait 20 minutes before you can print anything after bouncing the spooler...&lt;BR /&gt;I know some of my users wouldn't be happy with this.&lt;BR /&gt;I suggest you create a shell script that does a "cancel &amp;lt;$printername&amp;gt;-&amp;lt;$number&amp;gt;", where $printername is the name of the queue you're inspecting (with find) and $number is the numbers in the filename cA1234servername of your spool file. This way you remove the spool properly.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Bart&lt;/PRINTERNAME&gt;</description>
      <pubDate>Wed, 11 Sep 2002 09:40:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802945#M82337</guid>
      <dc:creator>Bart Paulusse</dc:creator>
      <dc:date>2002-09-11T09:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802946#M82338</link>
      <description>That's probably a much better approach - thanks, Bart.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Wed, 11 Sep 2002 09:56:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802946#M82338</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-09-11T09:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802947#M82339</link>
      <description>I'd like to take this to another level if I may.&lt;BR /&gt;&lt;BR /&gt;I scripted a report that shows me the number of print jobs stacked up in our queues and how many of those are more than a day old. It's a nice report to get every morning to show general print server health.&lt;BR /&gt;&lt;BR /&gt;What I'd really like to do is get a report of the one oldest job in each queue. If it's older than [whatever] days I can forward the list to our System Support department so they can investigate with our branches why their jobs aren't getting printed.&lt;BR /&gt;&lt;BR /&gt;I've investigated using the find command on /var/spool/lp/[queue#] and lpstat options and it still eludes me.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 15:28:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802947#M82339</guid>
      <dc:creator>Andy Torres</dc:creator>
      <dc:date>2002-12-19T15:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802948#M82340</link>
      <description>Andy,&lt;BR /&gt;&lt;BR /&gt;I've got one idea for you - start a new thread.  &lt;BR /&gt;&lt;BR /&gt;Refer back to this one by cutting and pasting the URL, if you wish, but adding on to this one, which already has the "magic answer" bunny is not going to be as fruitful.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Thu, 19 Dec 2002 15:31:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802948#M82340</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-12-19T15:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802949#M82341</link>
      <description>Gotcha. Will do. Thanks.</description>
      <pubDate>Thu, 19 Dec 2002 15:32:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802949#M82341</guid>
      <dc:creator>Andy Torres</dc:creator>
      <dc:date>2002-12-19T15:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802950#M82342</link>
      <description>New thread:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x08ba7680e012d71190050090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x08ba7680e012d71190050090279cd0f9,00.html&lt;/A&gt;</description>
      <pubDate>Thu, 19 Dec 2002 15:37:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802950#M82342</guid>
      <dc:creator>Andy Torres</dc:creator>
      <dc:date>2002-12-19T15:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802951#M82343</link>
      <description>If you want to find the oldest control and data file pairs, something like this may work:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;cd /var/spool/lp/request&lt;BR /&gt;PRINTERS=$(ls -1)&lt;BR /&gt;&lt;BR /&gt;for P in PRINTERS&lt;BR /&gt;do&lt;BR /&gt;cd $P&lt;BR /&gt;OLDESTPAIR=$(ls -t c* d* | tail -2)&lt;BR /&gt;echo "Oldest files in $P are $OLDESTPAIR&lt;BR /&gt;cd ..&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 15:38:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802951#M82343</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-12-19T15:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802952#M82344</link>
      <description>Thanks. Points awarded under new thread.</description>
      <pubDate>Thu, 19 Dec 2002 15:57:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802952#M82344</guid>
      <dc:creator>Andy Torres</dc:creator>
      <dc:date>2002-12-19T15:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: deleting more than three days old print jobs</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802953#M82345</link>
      <description>If you want to find the oldest control and data file pairs, something like this may work:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;cd /var/spool/lp/request&lt;BR /&gt;PRINTERS=$(ls -1)&lt;BR /&gt;&lt;BR /&gt;for P in PRINTERS&lt;BR /&gt;do&lt;BR /&gt;cd $P&lt;BR /&gt;OLDESTPAIR=$(ls -t c* d* | tail -2)&lt;BR /&gt;echo "Oldest files in $P are $OLDESTPAIR&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Dec 2002 16:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/deleting-more-than-three-days-old-print-jobs/m-p/2802953#M82345</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2002-12-19T16:11:33Z</dc:date>
    </item>
  </channel>
</rss>

