Wednesday, March 10, 2010

利用指令列印檔案

給未來的裕翔

當有兩台以上printer, 要指定某台來列印時


可以先以lpstat -a得知所有可用printer的名稱

ex: (訊息太長, 後面我用......截掉)


Deskjet-D2500-series accepting requests since ......
HP-LaserJet-P3005 accepting requests since ......


若此時我想以HP-LaserJet-P3005這台printer列印/etc/issue

則可以lpr -P HP-LaserJet-P3005 /etc/issue

-P就是拿來指明要接哪一台printer


(不過印出來的字, 不知為啥最左邊都會被切掉一點點)

當然, 如果只有一台印表機

直接lpr /etc/issue即可

No comments:

Post a Comment