Home

Printing

What is the command to print a file from terminal?
How can I print something single-sided?
What kind of files can I print?


What is the command to print a file from a terminal?
To print out a file type:
     lp filename.extension 

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.

     lpstat

Once you know what is the job ID of your printing job, you can type
the cancel command to cancel it.

     cancel job_number

There is a command to print out files in a postrcript format. The output
looks nice and, in fact, saves paper.

     enscript filename.extension

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.

  • Home
  • Hours
  • Help
  • Links
  • Login

Help

Most questions people have are already answered in this section of the site. If your question is not answered here, you are welcome to e-mail us at help@cs.newpaltz.edu.

Frequently Asked Questions

  • General
  • Using Computers in the Lab
    • General
    • Troubleshooting
    • Printing
    • Connecting to the New Paltz N: Drive
  • Programming
    • General
    • Eclipse
  • Remote Access
    • Available Hosts
    • Getting Started with PuTTY
    • Getting Started with WinSCP
    • Getting started with NX Client
    • Other PuTTY and WinSCP settings
    • Remote Programming Environments
    • Remote access from a Linux client
    • Some graphical software that is available
  • Xming
    • Using Xming to run graphical applications
    • Xming Troubleshooting
  • Email
  • Web Pages
  • MySQL