zoukankan      html  css  js  c++  java
  • linux之打印技术(基础篇)

    长久以来为linux 提供的打印是lp 系统,打印的时候直接将文件输入设备 使用如下命令。

    (一) 命令

      lp [options] filename

      lpr [options] filename

      

      options 的值可能如下: 

      -n number -   打印几份

      -t title -     打印标题

      -d destination      打印机名称

      -c (default)    打印之前将任务添加到打印队列

       -s(default)    打印之前不讲任务添加到打印队列

      -o option     其它额外信息 

      -P prior      设定打印的优先级别 

    (二)举例

      1> 多文件打印

        # lp 2.txt 3.txt 4.txt  

        request id is 11 (3 file(s))

        注意:打印三个文件,打印ID是11,以后通过这个id可以操控打印

      2> 设定打印优先级别

        #lp lp -d LaserJet -p 90 /etc/aliases

        通过添加“-p 90”,规定了打印作业的优先级为90。它将在优先级低于90的打印作业之前打印,包括没有设置优先级的作业,缺省优先级是50。

      3> 利用管道直接打印

        # cat thesis.txt > /dev/lp
         /dev/lp 是打印设备的一个符号连接  

    (三) 其它打印命令

        linux为了安全管理,只用root 用户可以使用lp/lpr 所以其它命令如lpr, lprm, lpq 命令

  • 相关阅读:
    Kth Largest Element in an Array -- LeetCode
    First Missing Positive -- LeetCode
    Path Sum II (Find Path in Tree) -- LeetCode
    Email List
    Divide Two Integers -- LeetCode
    Delete Node in a Linked List
    Compare Version Numbers -- LeetCode
    Broken Code
    Trapping Rain Water (Bar Height) -- LeetCode
    Count and Say (Array Length Encoding) -- LeetCode
  • 原文地址:https://www.cnblogs.com/wolfrickwang/p/3190630.html
Copyright © 2011-2022 走看看