Книга: Fedora™ Unleashed, 2008 edition
Using Basic Print Commands
Using Basic Print Commands
After configuring your printer, you can print from the desktop, using any printer-capable graphical clients. If you do not use the desktop but prefer to use or access your Fedora system via a text-based interface, you can enter a number of print commands from the command line, too. The main CUPS commands used to print and control printing from the command line are as follows:
? lp
— The line-printer spooling command; used to print documents that use a specific printer
? lpq
— The line-printer queue display command; used to view the existing list of documents waiting to be printed
? lpstat
— Displays server and printer status information
? lprm
— The line-printer queue management command; used to remove print jobs from a printer's queue
? lpc
— The line-printer control program; used by the root operator to manage print spooling, the lpd
daemon, and printer activity
These commands offer a subset of the features provided by CUPS, but can be used to start and control printers and print queues from the command line.
You print files (documents or images) by using the lp
command, along with a designated printer and filename. For example, to print the file mydoc.txt
with the printer named lp, use the lp
command, its -d
command-line option, and the printer's name, like this:
# lp -dlp mydoc.txt
- 1. Basic microprocessor systems
- Console Print Control
- Basic Functions
- Appendix A. Detailed explanations of special commands
- What NAT is used for and basic terms and expressions
- Caveats using NAT
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces
- Basics of the iptables command
- Commands
- Data Binding Using the GridView Control
- Using the kill Command to Control Processes
- Модификаторы спецификации преобразования, используемые в функции printf( )