Putting Those Commands to Work
If you click on the screen shot below, you can see how I've accomplished printing from a Linux command line. I'm working as root, but you don't have to if you don't want to or don't have root or superuser privileges on the machine to which you have access. However, I do suggest practicing as root to work with the lpc command. You can practice by creating short test text (.txt) files to print; create at least three. I've done everything within a terminal such as using the touch command to create the file and the vi editor with which I often work and am quite comfortable. Again, you don't have to do this to work with Linux printing on the command line; however, you should have knowledge of the most basic Unix commands because, in this article, I explain only the ones that specifically have to do with Linux printing.
Next, I issued the lpc command which changed the prompt to lpc> after which I typed help and received a little assistance from the system which listed five more commands I could use. You can also see how I issued ? to pretty much get the same list to which the comment, "Commands may be abbreviated. Commands are:" was added. Typing exit or quit will take you back to your original prompt while status will report on the status of printers as you can see I've done for the one HP printer I have connected to this machine running Fedora 8.
To print a document or several documents, use the lp command, specify the name of the printer, and the name of the document. For example, lp -ddeskjet_3320 test1.txt test2.txt test3.txt. I could also have achieved the same results by using wildcard capabilities; so, test1.txt test2.txt test3.txt could have simply been *.txt which would have "grabbed" all of the .txt files in the Desktop directory. Be careful with the wild card or you could end up having to cancel a lot of jobs. You can't just type in the name of your printer, rather you must use the name reported by the system as shown in the screen shot which was used during printer configuration. I couldn't have issued the command using dskjt3320 or any variation of the printer name, but rather I had to use the exact name reported in the status. The -d is the option to pass to the command just before naming the printer; you can think of it as standing for document/s. You can also see that I requested another status during printing which revealed "1 entries" in the report. If you would like to continue learning Linux printing, you'll want to advance to knowing how to view the documents in queue, cancel print jobs, manage print spooling, the lpd daemon, printer configuration, and much more. The commands covered here are only the beginning. Again, with this knowledge of Linux printing, you could at least print out needed documents from a command line if no GUI was available.