Printing with lpr or lprng without two copy

William Knox wknox at mitre.org
Wed Jan 5 13:55:15 GMT 2000


I knew I shouldn't have sent any e-mail out before having my morning cup
of coffee ;-)

The only other idea would then be to write a small wrapper that calls
lpr for you and which won't return until the job is finished printing
and the samba file can be safely removed. However, a clean and easy way
to do this doesn't leap to my still not yet properly caffeinated mind.

Risko Gergely wrote:
> 
> Hello!
> 
> On Wed, 5 Jan 2000, William Knox wrote:
> 
> > Risko,
> > Have you tried the following as a print command:
> >
> > lpr -s -P%p %s; rm -f %s
> >
> > ? I use this without any problems (minus the -s flag, which I will look
> > into - I always thought that duplicating the file was a waste, but had
> > never come across this option for some reason). Let me know if this
> > works for you.
> > --
> >                       Bill Knox
> >                       Operating Systems Programmer/Analyst
> >                       The MITRE Corporation
> I think if we delete the file after spooling, the symlink won't work in
> lpr spool directory. A good solution if we create a hard link (but this
> isn't supported by lpr) and give the -r flag. Because hard link won't bad
> if we delete the original file from /tmp.
> 
> Any other ideas?
> 
> Please CC to me!
> 
> Risko Gergely

-- 
			Bill Knox
			Operating Systems Programmer/Analyst
			The MITRE Corporation


More information about the samba mailing list