576 Part IV . Running Applications If you (Medical web site)
Friday, August 31st, 2007576 Part IV . Running Applications If you want to specify a particular printer (other than the default), add the -Pprinter option. For example, to print to the lp0 printer, type the following: $ lpr -Plp0 file.ps If you want to print more than one copy of a document, use the -#num option, where num is replaced by the number of copies you want. For example, to print five copies of a file, use: $ lpr -#5 file.ps The lpr command can also accept standard output for printing. For example, you can print the output of a groff command by piping that output to lpr as follows: $ groff -Tps -man /tmp/chown.1 | lpr -Plp0 The enscript command (in the enscript package) is another useful tool for printing plain-text files. It converts the files to PostScript and sends them to a printer or to a specified file. Checking the Print Queues To check the status of print jobs that have been queued, you can use the lpq command. By itself, lpq prints a listing of jobs that are in the queue for the default printer. For example: $ lpq hp is ready and printing Rank Owner Job Files Total Size active root 3 hosts 1024 bytes 1st root 7 (stdin) 625 bytes 2nd root 8 memo1.ps 12273 bytes 3rd chuck 9 bikes.ps 10880 bytes The output from lpq shows the printer status and the files waiting to be printed. Rank lists the order in which they are in the queue. Owner is the user who queued the job. Job shows the job number. The Files column shows the name of the file or standard output (if the file was piped or directed to lpr). Total Size shows how large each file is in bytes. You can add options to lpq to print different kinds of information. By adding -Pprinter, you can see the queue for any available printer. You can also add the job number (to see the status of a particular print job) or a username (to see all queued jobs for a user). Tip
You want to have a cheap webhost for your apache application, then check apache web hosting services.