The Linux lp Printing Command
Table of Contents -n copies Sets the number of copies to print. -o sides=one-sided/two-sided-long-edge/two-sided-short-edge -d destination Prints files to the named printer. -t “name” Sets the job name. Print in Color Mode Print files in color one-timelp -d ${the_printer} -o ColorModel=CMYK ${the_file}
Set printer default to colorsudo lpoptions -p ${the_printer} -o ColorModel=CMYK
Frequently used commands print all files in current folder: print all files in all subfolders:lp -d ${the_printer} */**
pipelines: ps -ef | lp
Set the system’s default printer: lpadmin -d ${the_printer}
lpstat -d Shows the current default destination. -a [printer(s)] Shows the accepting state of printer queues. If no printers are specified then all printers are listed. Check the system’s default printer display or set printer options and defaults -d destination[/instance]Sets the user default printer to destination. If instance is supplied then that particular instance is used. This option overrides the system default printer for the current user. lpoptions -d ${the_printer} -l | grep -i color
Merge PDF Files then print on both sides Install command line tool: pdftk sudo apt-get install pdftk
Merge PDF Filespdftk file1.pdf file2.pdf fiel3.pdf cat output outputfile.pdf