web-dev-qa-db-ja.com

追加のCUPSプリンター情報を一覧表示します

コマンドラインツールを使用して、プリンターの説明やプリンターの場所などのプリンター情報を表示するにはどうすればよいですか?

lpstat -tは、プリンターの名前、クラス、およびデバイスをリストしますが、プリンターの説明や場所はリストしません。 httpまたはGUIインターフェイスを使用せずにこの情報を取得する方法はありますか?

3
Hubert Kario

この情報はlpstat -l -p printernameで取得できます。

[root@Valley ~]# lpstat -l -p zebra2
printer zebra2 is idle.  enabled since Tue Jun  8 15:50:35 2010
        Form mounted:
        Content types: any
        Printer types: unknown
        Description: Zebra 105SL in shipping
        Alerts: none
        Location: Shipping
        Connection: direct
        On fault: no alert
        After fault: continue
        Users allowed:
                (all)
        Forms allowed:
                (none)
        Banner required
        Charset sets:
                (none)
        Default pitch:
        Default page size:
        Default port settings:
6
ewwhite

これはもう少しグローバルです。すべてがgrepステートメントを排除するからです。

for i in $( lpstat -v | awk '{ print $3 }' | tr ':' ' ' ) ; do lpstat -l -p $i | grep 'printer\|Location' ; done
0
Jefferson Davis