Print working command under Linux

zhaozj2021-02-12  172

Using a spooling method under Linux, the file does not send it directly to the printer when the user needs to print a file, but it is sent to the spool directory, then send these data to the background process responsible for printing. Enter the printer. Linux defines a print buffer for each printer, and the printer daemon often scans the print buffer to see new files that do not print. If there is, you will print the files in the buffer in order of advanced first out. In addition to printing on a local printer, Linux system can remotely printed over a network printer. A command Linux system for printing provides a set of commands for printing. In general, print commands use the default printer; if the user defines the Printer environment variable, the print command uses this variable defined printer; in addition, the user can specify the printer to use on the command line. The LPR command lpr command is a offline print command, which places the print job in the print buffer queue. Each printer specified for the Linux system has its own print buffer directory, and the Minfree file in each directory specifies the number of disk blocks that hold the print file. LPR Trounes with the LPD daemon, the LPD scan / etc / printcap file, query the cache directory corresponding to the printer, and then control the print, the data you need to print is sent to the actual printer. If there is no specified file, the LPR uses standard input. The format of the lpr command is: lpr [-pprinter] [#num] [Other Options] [Name ...] command The meaning of the options is as follows :-P Specify the printer. If this option is not used, the printer specified by default printer or environment variable print is used. -m is printed, send email. - # NUM prints NUM share. The LPQ command LPQ is a buffer queue check command, which checks the print file in the buffer through the LPD, report the status of the specified job or all the jobs of the specified user. The LPQ command without any parameters displays any job in the queue. An important information in the display result of the LPQ command is the job identification number (Job ID), which identifies a specific job. If the user wants to cancel a pending job, you must specify this identity in the command. The format of the LPQ command is: lpq [-l] [-pprinter] [Job #] [User ...] command The meaning of the options is as follows :- Specify a printer, otherwise the printer specified by default printer or environment variable print . -l Print information for all files that make up the job. For each job submitted, the LPQ report user name, the level of the queue, the job ID, the job identification, and the total size. The lprm command lprm command is used to remove the print job from the buffer queue, and the user can use this command to remove one or more print jobs belonging to yourself from the buffer queue. The format of the lprm command is: lprm [-pprinter] [-] [job #] [user ...] command The meaning of each option is as follows :- Specifies a printer, otherwise the printer specified by default printer or environment variable print is used. - Delete all user print jobs. User Delete Query belongs to the user user User (only superusers can do this).

转载请注明原文地址:https://www.9cbs.com/read-6993.html

New Post(0)