printing command

Under Linux / UNIX you use lp command to print files from command prompt. lp is quite useful when GUI is not installed on Linux box to print files. The lp command is simply a front end command that calls the lpr command with appropriate options. Its main use is to allow the running of precompiled binary programs and scripts that assume that the lp command is the official printing command.

Changing papa size is very easy under GUI environment. But how do you change paper size under command prompt? By default lp print to A4 paper size. However sometime you need to print to different paper size from command prompt such as A3 or A5. To print to A3 size, enter:$ lp -o media=A3 /path/to/file Where,

-o media=size : Sets the page size to size. Most printers support at least the size names “a4”, “letter”, and “legal”.