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

How to use Linux's lp command to print a file

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

Today, I would like to share with you how to use Linux's lp command to print documents, the content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

Lp prints files or modifies queued print tasks

Supplementary note 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 lp (option) (parameter) option-E: force encryption when connecting to the print server;-U: specify the user name to be used when connecting to the print server;-d: specify the target printer to receive the print task;-I: specify an existing print task number;-m: send email when the print is complete;-n: specify the number of copies to print;-t: specify the name of the print task -H: specifies the time when the print task starts;-P: specifies the page number to be printed. Parameter file: the file to be printed.

Instance to print a file / etc/motd on the printer lp0 connected to the device dlp0, enter:

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

Lp-c-m-n30-dlp0:lpd0 / etc/motd to use the back-end flags-f and-a with the job title blah to print / etc/motd file, enter:

Lp-t "blah"-o-f-o-a / etc/motd to queue the MyFile file and return the job number, enter:

Lp myfile to queue the MyFile file and disable the job number, enter:

Lp-s myfile exit status

The command returns the following exit values:

0: all input files were processed successfully.

0: no output device is available, or an error has occurred.

These are all the contents of the article "how to use Linux's lp command to print a file". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to 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

Development

Wechat

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

12
Report