mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-25 02:39:25 +03:00
#321: add lp and lpstat commands (kudos to @Qtrain)
This commit is contained in:
parent
cddacee9d1
commit
08b7e1c0cd
23
pages/common/lp.md
Normal file
23
pages/common/lp.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# lp
|
||||||
|
|
||||||
|
> print files.
|
||||||
|
|
||||||
|
- Print the output of a command to the default printer (see `lpstat` command).
|
||||||
|
|
||||||
|
`echo "test" | lp`
|
||||||
|
|
||||||
|
- Print a file to the default printer.
|
||||||
|
|
||||||
|
`lp {{path/to/filename}}`
|
||||||
|
|
||||||
|
- Print a file to a named printer (see `lpstat` command).
|
||||||
|
|
||||||
|
`lp -d {{printer_name}} {{path/to/filename}}`
|
||||||
|
|
||||||
|
- Print N copies of file to default printer (replace N with desired number of copies).
|
||||||
|
|
||||||
|
`lp -n {{N}} {{path/to/filename}}`
|
||||||
|
|
||||||
|
- Print only certain pages to the default printer (print pages 1, 3-5, and 16).
|
||||||
|
|
||||||
|
`lp -P 1,3-5,16 {{path/to/filename}}`
|
11
pages/common/lpstat.md
Normal file
11
pages/common/lpstat.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# lpstat
|
||||||
|
|
||||||
|
> print status information about printers
|
||||||
|
|
||||||
|
- List printers present on the machine and whether they are enabled for printing.
|
||||||
|
|
||||||
|
`lpstat -p`
|
||||||
|
|
||||||
|
- Print the default printer name.
|
||||||
|
|
||||||
|
`lpstat -d`
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user