1834441 Members
2395 Online
110067 Solutions
New Discussion

Idea

 
Tibi Baraboi_1
Advisor

Idea

Does anybody tried to move the files from /var/spool/lp/request/printer_old

to

/var/spool/lp/request/printer_new ?

It should work.

Regards,
4 REPLIES 4
Ian Dennison_1
Honored Contributor

Re: Idea

Thats why the 'lpalt' command was invented.

I think you will find that there is also a definition file for the print job, held in another directory.

Share and Enjoy! Ian
Building a dumber user
Tibi Baraboi_1
Advisor

Re: Idea

Sometimes is just easier to handle files than using commands which are doing almost the same.
For example to delete old spooler request we can use something like

lpstat -i lp_name | grep ^lp.. | awk '{print $1}' | xargs cancel


but it is easier to delete the files from /var/spool/lp/requests/lp_name

Any idea how to do it faster ?
Thanks in advance
Ian Dennison_1
Honored Contributor

Re: Idea

Tibi,

Create an alias for that command on your .profile called 'printerclear' or something.

I have always tried to use the HP-UX commands rather than fiddle with the resultant files, as HP can conceivably change the way the system does things internally. Using the commands is a future-proof way of doing things (you will get an upgrade notification when the command changes, but not necessarily when the internals change).

Why not automate the script to check for overdue printouts, cancel them over a certain period and email you the results? Do you have Openview?

Share and Enjoy! Ian
Building a dumber user
Tibi Baraboi_1
Advisor

Re: Idea

You are right.
I will schedule a job to check all the jobs older that 2 days and to delete them.
It is the best way to keep the spoolers clean.
It was a mistake that I posted. I wanted to reply to one posted message but I am new and I created a new message instead :-).
Sorry...
Regards,