How to print a plain text file to printers from a terminal in Linux

0 votes
asked Mar 31, 2014 by EricZhiqiangMa

How to quickly print a plain text file to printers from a terminal in Linux?

1 Answer

0 votes
answered Mar 31, 2014 by EricZhiqiangMa

The lp command can print a plain text file to a printer.

My favorite command:

cat text-file | lp -o media=a4 -o cpi=12 -o lpi=7.2 -o page-left=48 -o page-right=48 -o page-top=48 -o page-bottom=48

It is better to put the options into a script.

Welcome to Questions and Answers, where you can ask questions and receive answers from other members of the community.
...