Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use linux's lp command to print a file or modify a queued print task

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you the use of linux lp command to print files or modify the queue of printing tasks, I believe that most people do not know much, so share this article for you to learn, I hope you will learn a lot after reading this article, let's go to learn the methods!

The lp command is used to print files or to modify queued print tasks. Similar to the lpr command, the lp command supports both file input and standard input. It differs from lpr in that it has a different (slightly more complex) parameter option setting.

Syntax format: lp [parameters]

Common parameters:

-E enforces the use of encryption when connecting to the print server-U specifies the user name to be used when connecting to the print server-d specifies the target printer to receive the print task-I specifies an existing print task number-m sends E-mail-n to specify the number of prints when the print is complete-t specifies the name of the print task-H specifies the start time of the print task-P specifies the page number to be printed

Reference example

To print the file / etc/motd on the printer lp0 connected to the device dlp0:

[root@linuxcool ~] # lp / etc/motd

To print 30 copies of the / etc/motd file using one copy of the file, and notify the user by email that the job is complete:

[root@linuxcool] # lp-c-m-n30-dlp0:lpd0 / etc/motd

To queue the MyFile file and return the job number:

[root@linuxcool ~] # lp myfile above is to use linux's lp command to print files or modify all the contents of the queued print task, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report