Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The lpq -a lists, among other things, the name of each file printed.

Rank    Owner    Job     File(s)                         Total Size
active  myuser   2       version.txt                     1024 bytes
1st     myuser   8       691227_1399095378.raw           3072 bytes

It appears that the jobs listed correspond to those shown by lpstat -Wnot-completed. But is there a way to get lpq (or any other CUPS program) to show the filenames of jobs that are completed?

share|improve this question
    
lp man page: unixhelp.ed.ac.uk/CGI/man-cgi?lp -m -- Sends an email when the job is completed. Not sure, if it sends a filename. –  user14039 Apr 27 '12 at 20:09

2 Answers 2

less /var/log/cups/page_log

shows me:

hp-oj-5510 243 stefan [24/Apr/2012:10:36:05 +0200] 1 1STATE: - localhost xy-file-46 - -
hp4p 244 stefan [24/Apr/2012:10:38:33 +0200] 1 1 - localhost Unbenannt1 - -
hp-oj-5510 243 stefan [24/Apr/2012:10:39:09 +0200] 2 1INFO: - localhost xy-file-46 - -
hp-oj-5510 246 stefan [24/Apr/2012:10:40:28 +0200] 1 1STATE: - localhost xy-file-46 - -
hp-oj-5510 246 stefan [24/Apr/2012:10:43:37 +0200] 2 1INFO: - localhost xy-file-46 - -
hp-oj-5510 247 stefan [24/Apr/2012:10:43:50 +0200] 1 1STATE: - localhost Unbenannt1 - -

The file on hp4p wasn't printed, and I don't know details of the file-format.

But the cups webinterface has a section jobs and therein completed jobs, (translated from german - the words may differ).

The link goes to localhost - maybe your server is running on a different machine. Unfortunately the filename is only given without path, but with locate, it might in many cases be possible, to reconstruct which file was printed.

share|improve this answer

So far as I know, if you open the file by firefox, and print it, you can see that the full path filename will be listed in the /var/log/cups/page_log. If you print the file by other app, or by cmd line, then only the file name itself is logged.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.