print from the command line in mac os x
September 27th, 2008 by Lawrence David
let’s say you want to print all of the pdf files in a directory quickly. Â printing from the command line in these situations can be handy. Â here’s how to do it:
 >> lpstat -aÂ
 will give you a list of all of the installed printer names.
>> lp -d “my_printer_name” ~/my_folder/*.pdfÂ
will send out all of those pdf files to be printed!Â
The default page size to print on seems to be “letter” to switch it e. g. to “a4″ add the option “-o media=”. Example:
>> lp -d “my_printer_name†-o media=A4 ~/my_folder/*.pdf
[...] get the same effect, but I haven’t tried that one. I got my info from Lawrence David, and it worked, so I’m happy with [...]
This assisted me. And for that, I am grateful.
Many thanks. Brillant to see old UNIX stuff still being useful on Mac OS X 10.8.