lpr(line printer remote)是 Linux 和 Unix 系统中用于发送文件进行打印的命令。
该命令会将文件提交到打印队列,使用的为系统设定的默认打印机或用户指定的打印机。
lpr 支持向本地或远程主机发送打印任务。
lpr [参数] [文件...]
常用参数:
打印单个文件:
lpr myfile.txt
选择特定打印机执行打印:
lpr -P myprinter myfile.txt
打印多份副本:
lpr -# 3 myfile.txt
不生成标题页:
lpr -h myfile.txt
设置打印选项(如启用双面打印):
lpr -o sides=two-sided-long-edge myfile.txt
实现双面打印操作:
lpr -o sides=two-sided-long-edge myfile.txt
限定打印页码范围:
lpr -o page-ranges=1-5 myfile.pdf
同时打印多个文件:
lpr file1.txt file2.txt file3.txt
打印整个目录下的所有文件:
lpr -r directory
查看当前打印队列状态信息:
lpstat -o
取消某个打印任务:
cancel job_number
其中 job_number 是待取消任务的编号。
如需了解更多功能,可查阅系统手册页:
man lpr
以上就是linux提交打印任务是什么-lpr命令使用与实例的详细内容,更多请关注php中文网其它相关文章!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号