What is the command to print a file from a terminal?
To print out a file type:
You can preview the file using pr command. Example:
pr filename.extention | more
If you decided to cancel the printing job, you will first need to identify its job ID. To examine the print queue type use the lpstat command.
Once you know what is the job ID of your printing job, you can type
the cancel command to cancel it.
There is a command to print out files in a postrcript format. The output
looks nice and, in fact, saves paper.
How can I print something single-sided?
By default, printing in the Lab is done using both sides of the page. However, it is also possible to print single-sided. To do so, use the command
lp -o sides=one-sided filename
where filename is the name of the file you want to print.
What kind of files can I print?
You can print any text files, scripts and any programs that you
write. Our printers understand a formatting language called PostScript.
PostScript files can also be printed with the lp command.
Many programs have their own printing options. These options actually
generate PostScript output and send it to the printer.
Please, do not attempt to print executable (like a.out) files
or any other files that contain binary or hexadecimal data.
A few words should be said about printing man pages.
If you are using a certain command extensively, you will probably
spend a lot of time reading its man page. In this case, it makes sense
to print it out if it is not too long.
The following site has instructions on how to print man pages in PostScript format.