本文主要复制了lp命令原文解释,并机器翻译注释了部分命令。

文章稍长,注意红字

注意红字

注意红字

原文主要介绍lp命令的参数和描述。常见命令包括:

lp filename(打印filename)

-d 打印机名称(指定打印机)

-P 1,2-5,6 (指定页码范围)

-o sides=two-sided-long-edge(选项,长边翻转,竖直打印)

-o number-up (指定一页几版)

……有趣的打印命令详见下文

lp命令原文:通过命令行,man lp得到:

NAME
       lp - print files

SYNOPSIS  大纲;概要;梗概
       lp  
       [  -E  ] 
       [ -U username ] 
       [ -c ] 
       [ -d destination[/instance] ] 
       [ -h hostname[:port] ] 
       [ -m ] [ -n num-copies ]
       [ -o option[=value] ]  
       [  -q priority  ] 
       [ -s ] 
       [ -t title ] 
       [ -H handling ] 
       [ -P page-list ]
       [ -- ]
       [ file(s) ]
       
       lp 
       [ -E ] 
       [ -U username ] 
       [ -c ] 
       [ -h hostname[:port] ] 
       [ -i job-id ]
       [ -n num-copies ] 
       [ -o option[=value] ] 
       [ -q priority ] 
       [ -t title ] 
       [ -H handling ] 
       [ -P page-list ]

DESCRIPTION  描述;产品描述;说明;品名;产品说明
       lp submits files for printing or alters a pending job. 
       提交要打印的文件或更改挂起的作业
       Use a  filename of "-" to force printing from the standard input.
        使用文件名“-”强制从标准输入进行打印。

THE DEFAULT DESTINATION
   默认目的地(默认打印机)

CUPS  provides many ways to set the default destination.
       提供了许多设置默认目标的方法。
       The LPDEST and PRINTER environment variables are consulted first.  If neither are set,
       the  current  default  set using the lpoptions(1) command is used, fol‐
       lowed by the default set using the lpadmin(8) command.
OPTIONS 选项
       The following options are recognized by lp:

--   Marks the end of options; use this to  print  a  file  whose  name
            begins with a dash (-).

-E   Forces encryption when connecting to the server.

-U username
            Specifies the username to use when connecting to the server.

-c   This  option is provided for backwards-compatibility only. On sys‐
            tems that support it, this option forces  the  print  file  to  be
            copied  to  the  spool  directory before printing.  In CUPS, print
            files are always sent to the scheduler via IPP which has the  same
            effect.

-d destination
            Prints files to the named printer.
            将文件打印到指定的打印机
       -h hostname[:port]
            Chooses an alternate server.
            选择备用服务器。
       -i job-id
            Specifies an existing job to modify.

-m   Sends an email when the job is completed.
            
       -n copies
            Sets the number of copies to print.
            设置要打印的份数
       -o "name=value [ ... name=value ]"
            Sets one or more job options.  See "COMMON JOB OPTIONS" below.
            设置一个或多个作业选项。请参阅下面的“常见工作选项”。
       -q priority
            Sets  the  job  priority  from  1  (lowest) to 100 (highest).  The
            default priority is 50.
            将作业优先级从1(最低)设置为100(最高)。这个默认优先级为50。

-s   Do not report the resulting job IDs (silent mode.)
            不报告生成的作业ID(静默模式)
       -t "name"
            Sets the job name.
            设置作业名称

-H hh:mm

-H hold

-H immediate

-H restart

-H resume
            Specifies when the job should be printed.  A  value  of  immediate
            will print the file immediately, a value of hold will hold the job
            indefinitely, and a UTC time value (HH:MM) will hold the job until
            the  specified  UTC  (not local) time.  Use a value of resume with
            the -i option to resume a held job.  Use a value of  restart  with
            the -i option to restart a completed job.
            指定打印作业的时间。值immediate将立即打印文件,
            值hold将无限期保留作业,而UTC时间值(HH:MM)将保留作业直到指定的UTC
            (非本地)时间。将resume的值与-i选项一起使用可恢复保留的工作。将值
            restart与-i选项一起使用可重新启动已完成的作业。
        -P page-list
            Specifies which pages to print in the document.  The list can con‐
            tain a list of numbers and ranges (#-#) separated by commas, e.g.,
            "1,3-5,16".   The  page  numbers refer to the output pages and not
            the document's original  pages  -  options  like  "number-up"  can
            affect the numbering of the pages.
            指定要在文档中打印的页面。列表可以包含数字和范围的列表(#-#),用逗
            号分隔,例如“1,3-5,16”。页码指的是输出页面,而不是文档的原始页面,
            “编号向上”之类的选项会影响页面的编号。

COMMON JOB OPTIONS 常见作业选项

Aside  from  the  printer-specific options reported by the lpoptions(1)
       command, the following generic options are available:
        除了lpoptions(1)命令报告的打印机特定选项外,还提供以下通用选项:
        
       -o collate=true
            Prints collated copies.
            打印已校对的副本

-o fit-to-page
            Scales the print file to fit on the page.
            缩放打印文件以适合页面。

-o job-hold-until=when
            Holds the job until the  specified  local  time.   "when"  can  be
            "indefinite"  to  hold the until released, "day-time" to print the
            job between 6am and 6pm local  time,  "night"  to  print  the  job
            between  6pm  and  6am local time, "second-shift" to print the job
            between 4pm and 12am local time, "third-shift" to  print  the  job
            between  12am and 8am local time, or "weekend" to print the job on
            Saturday or Sunday.
            将作业保留到指定的本地时间。“当“可”无限期“持有直到发布,”白天时间“
            打印作业在当地时间早上6点到晚上6点之间,“晚上”打印作业在当地时间下
            午6点到早上6点之间,“第二班”打印作业在当地时间下午4点到12点之间,
            “第三班”打印作业在当地时间上午12点到8点之间,或“周末”在周六或周日
            打印作业。

-o job-hold-until=hh:mm
            Holds the job until the specified time in hours and minutes UTC.
            将作业保留到指定的时间(UTC小时和分钟)。

-o job-priority=priority
            Set the priority to a value from  1  (lowest)  to  100  (highest),
            which  influences  when  a  job  is  scheduled  for printing.  The
            default priority is typically 50.
            将优先级设置为1(最低)到100(最高)之间的值,这会影响计划打印作业的时间。
            默认优先级通常为50。

-o job-sheets=name
            Prints a cover page (banner) with the document.  The "name" can be
            "classified",  "confidential",  "secret", "standard", "topsecret",
            or "unclassified".
            打印包含文档的封面(横幅)。“名称”可以是“机密”、“机密”、“机密”、
            “标准”、“绝密”或“非机密”。

-o job-sheets=start-name,end-name
            Prints cover pages (banners) with the document.
            打印带有文档的封面(横幅)。

-o media=size
            Sets the page size to size. Most printers  support  at  least  the
            size names "a4", "letter", and "legal".
            将页面大小设置为“大小”。大多数打印机至少支持大小名称“a4”、“letter”和“legal”。

-o mirror
            Mirrors each page.
            镜像每页

-o number-up={2|4|6|9|16}
            Prints  2,  4,  6,  9, or 16 document (input) pages on each output
            page.
            在每个输出页上打印2、4、6、9或16个文档(输入)页。

-o number-up-layout=layout
            Specifies the layout of pages with the  "number-up"  option.   The
            "layout"  string  can  be  "btlr", "btrl", "lrbt", "lrtb", "rlbt",
            "rltb", "tblr", or "tbrl" - the first two  letters  determine  the
            column order while the second two letters determine the row order.
            "bt" is bottom-to-top, "lr" is left-to-right,  "rl"  is  right-to-
            left, and "tb" is top-to-bottom.
            使用“数字向上”选项指定页面的布局。“layout”字符串可以是“btlr”、“btrl”
            、“lrbt”、“lrtb”、“rlbt”、“rltb”、“tblr”或“tbrl”-前两个字母确定列顺序
            ,后两个字母确定行顺序bt是从下到上,“lr”是从左到右,“rl”是从右到左,
            “tb”是从上到下。
       -o orientation-requested=4
            Prints  the  job  in  landscape (rotated 90 degrees counter-clock‐
            wise).
            横向打印作业(逆时针旋转90度)。

-o orientation-requested=5
            Prints the job in landscape (rotated 90 degrees clockwise).
            横向打印作业(顺时针旋转90度)。

-o orientation-requested=6
            Prints the job in reverse portrait (rotated 180 degrees).
            以反向纵向打印作业(旋转180度)。
       -o outputorder=reverse
            Prints pages in reverse order.
            按相反顺序打印页面。

-o page-border=border
            Prints a border around each document page.  "border" is  "double",
            "double-thick", "single", or "single-thick".
            在每个文档页周围打印边框。““边框”是“双层”、“双层厚”、“单层”或“单层厚”。
       -o page-ranges=page-list
            Specifies which pages to print in the document.  The list can con‐
            tain a list of numbers and ranges (#-#) separated by commas, e.g.,
            "1,3-5,16".   The  page  numbers refer to the output pages and not
            the document's original  pages  -  options  like  "number-up"  can
            affect the numbering of the pages.
            指定要在文档中打印的页面。列表可以包含数字和范围的列表(#-#),用逗
            号分隔,例如“1,3-5,16”。页码指的是输出页面,而不是文档的原始页面选项
            (如“向上编号”)可能会影响页面的编号。

-o sides=one-sided
            Prints on one side of the paper.
            在纸的一面打印。

-o sides=two-sided-long-edge
            Prints on both sides of the paper for portrait output.
            在纸张的两面打印,以便输出肖像。

-o sides=two-sided-short-edge
            Prints on both sides of the paper for landscape output.
            打印在纸张的两面,用于横向输出。

CONFORMING TO 遵循
       Unlike  the System V printing system, CUPS allows printer names to con‐
       tain any printable character except SPACE, TAB,  "/",  or  "#".   Also,
       printer and class names are not case-sensitive.
        与System V打印系统不同,CUPS允许打印机名称包含除空格、制表符、“/”或“#”
        以外的任何可打印字符。此外,打印机和类名不区分大小写。
       The  -q  option accepts a different range of values than the Solaris lp
       command, matching the IPP job priority values (1-100,  100  is  highest
       priority) instead of the Solaris values (0-39, 0 is highest priority).
        q选项接受的值范围与Solaris lp命令不同,它匹配的是IPP作业优先级值
        (1-100100是最高优先级),而不是Solaris值(0-39,0是最高优先级)。

EXAMPLES 示例

Print two copies of a document to the default printer:
        将文档的两个副本打印到默认打印机:
           lp -n 2 filename

Print a double-sided legal document to a printer called "foo":
        将双面法律文件打印到名为“foo”的打印机上:
           lp -d foo -o media=legal -o sides=two-sided-long-edge filename

Print a presentation document 2-up to a printer called "foo":
        将演示文档2-up打印到名为“foo”的打印机上:
           lp -d foo -o number-up=2 filename

SEE ALSO 另请参见

cancel(1),   lpadmin(8),   lpoptions(1),   lpq(1),   lpr(1),   lprm(1),
       lpstat(1), CUPS Online Help (http://localhost:631/help)

COPYRIGHT
       Copyright © 2007-2016 by Apple Inc.版权所有©2007-2016苹果公司。

2 May 2016                           CUPS                                lp(1)

Linux lp命令(-o选项,-d目标打印机,-p页码范围)原文和部分机器翻译相关推荐

  1. linux lp命令,Linux lp 命令 command not found lp 命令详解 lp 命令未找到 lp 命令安装 - CommandNotFound ⚡️ 坑否...

    显示行号 | 选择喜欢的代码风格 默认 GitHub Dune LakeSide Plateau Vibrant Blue Eighties Tranquil lp 命令用来打印文件或修改排队的打印任 ...

  2. linux lp命令,lp命令_Linux lp 命令用法详解:打印文件或修改排队的打印任务

    lp命令用于打印文件,或者修改排队的打印任务.与lpr命令类似,lp命令既支持文件输入也支持标准输入.它与lpr的不同之处在于它有一个不同(稍微复杂点)的参数选项设置. 语法lp(选项)(参数) 选项 ...

  3. linux常用命令和选项

    相信使用过linux的朋友或多或少都有接触过linux的命令吧!linux的命令重多,而且每一个命令又有许多的选项,感觉非常难以记忆.其实只要掌握了一定的方法只后那么其实也是很easy的.下面就让我们 ...

  4. linux命令 选项,Linux常用命令及选项

    基础命令 type command  查看指定的命令是内部命令还是外部命令 which  -a | --skip-alias  command  显示命令路径 | 查看命令本身而非别名 whereis ...

  5. linux ls命令 --time-style选项 日期时间格式控制

    语法格式: s -l --time-style=xxx命令可以显示时间的格式,xxx:full-iso, long-iso, iso, locale, +FORMAT, ls -l --time-st ...

  6. linux date命令_Linux date命令示例

    linux date命令 Unix/Linux date command is a command used for displaying the system's date and time. In ...

  7. Python3 Linux相关命令大全

    1.文件管理相关 cat cat(英文全拼:concatenate)命令用于连接文件并打印到标准输出设备上. https://www.runoob.com/linux/linux-comm-cat.h ...

  8. Linux基础命令---lp打印机命令

    lp lp指令用来打印文件,也可以修改存在的打印任务.使用该指令可以指定打印的页码.副本等.此命令的适用范围:RedHat.RHEL.Ubuntu.CentOS.Fedora.openSUSE.SUS ...

  9. Linux打印命令lp详解

    lp 在类Unix系统上(一般为Linux跟Mac平台),使用lp命令来打印文件. lp命令在Linux跟Mac平台,使用的是cups服务(没有其它的),来支持打印. CUPS 可以参考这篇文章 lp ...

最新文章

  1. 配置BIND 9 DNS Views 的原理和需求
  2. CDN和智能DNS原理和应用 (原)
  3. Python 自定义函数和参数类型
  4. [HAOI2016]食物链
  5. c语言按照姓名查询员工信息,输入10个职工信息,按号码大小排序,再使用查找函数找职工的姓…...
  6. 信息学奥赛一本通 1890:【15NOIP提高组】跳石头 | 洛谷 P2678 [NOIP2015 提高组] 跳石头
  7. Java 实例 - 测试两个字符串区域是否相等
  8. 【2017-05-25】WebForm母版页
  9. C# ashx生成的验证码
  10. AngularJS 简介
  11. 2021-07-30
  12. python办公自动化实例(四):批量生成CAD图纸
  13. 大气压力换算公式_气压单位换算表(压力单位换算公式大全)
  14. CSS图片文字排版01
  15. 深入理解Risk aversion||风险偏好||Risk utility function
  16. 加速度传感器灵敏度表示的几种方式LSB/g,count/g,V/g,V/°,请给出几种方式之间的说明及转换公式
  17. Spark 的共享变量之累加器和广播变量
  18. 360路由器插件_主打游戏加速 360安全路由P4C体验
  19. 2021-09-29 Unity WebGL平台开发遇到的坑
  20. Ubuntu 用GParted调整分区大小

热门文章

  1. Geek的办公桌长什么样?
  2. java 点 转义字符_关于java的转义字符
  3. 基于51单片机AT89C51的小型音乐喷泉控制系统设计
  4. word中“居中”,“标准”不能解决(公式/图片)和文字不在一行的处理办法
  5. 小学计算机科学技术,关于小学计算机科学与技术课改分析的几点思考
  6. JsonNode常用方法
  7. 判断下列说法的正误_判断下列说法的正误。(1)《蝉》中写到蝉的叫声使人“很烦”‘聒聒”,...
  8. Unity使用RenderTexture在手机上显示黑屏的情况
  9. 记录vue中promis使用方法
  10. java8的LocalDateTime还没搞懂?一文轻松解决掉你的烦恼