LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2016, 01:52 PM   #1
cocojambo
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled
Clearing old jobs from CUPS server


Hi there!

I want to use this command to delete printing jobs older than 30 days.
find /var/spool/cups/ -iname 'd*' -mtime +30 -delete

Do I need to do a "service cups restart" after I delete the files?

Thanks!
 
Old 02-17-2016, 04:12 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
You can configure cups to only keep 30 days by changing the following line in your cups.conf file and restarting cups.

PreserveJobFiles 30d

http://www.cups.org/documentation.ph...upsd-conf.html

That should automatically take care of deleting files if you want a more permanent solution. To answer your question as far as I know you need to restart cups.
 
Old 02-18-2016, 09:23 AM   #3
cocojambo
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks!

Last edited by cocojambo; 02-18-2016 at 09:41 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cups cancelling jobs on its own..... markie83 Linux - Server 1 10-09-2013 07:23 PM
CUPS - Completed Jobs AlanSecker Linux - Desktop 3 12-31-2006 12:35 PM
CUPS/SAMBA's not clearing the printer queue xstefanox Linux - Networking 0 01-16-2006 04:36 AM
Cancelling Jobs in CUPS AcerKev Linux - Networking 2 12-29-2005 01:54 PM
Clearing CUPS print job? Jonah86 Linux - Newbie 2 05-24-2004 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration