How to print in unix

how to print in unix

Subscribe to RSS

How do I print from Unix and Linux? Command Line Printing. If you're logged into a unix server or linux terminal, you may print text files or postscript Images. If you would like to print an image file from Unix or Linux, you will need to open the file in an imaging Save Paper by Compressing. UNIX lets you do everything any other operating system does, and that includes printing files and documents. The following table shows you how to print whether youre on a System V UNIX or using Linux or BSD UNIX. To Do This Type This on System V UNIX Type This on Linux or BSD UNIX Print .

The various implementations of Unix handle printing tasks in different ways. This document will not cover AIX print commands. The following sections explain how to do a number of printing tasks. If your system uses both flavors of printing commands, experiment to see which commands work the best for you. At IU, the laser printers in the Student Technology Centers and the Residential Technology Centersas well as printers in offices, cannot print using normal Unix print commands. Instead, try the ansiprt command.

To print a file from a BSD-compatible system, use the lpr command. The general syntax for BSD is:. Replace [switches] with optional command line switches. Switches allow you to specify certain options, such as a particular printer or output format. Replace filename with the name of the file you want to print. For example, to print a file named myfile. To send a print job to a printer other than the default printer, you need to specify how to build nice pecs name.

With BSD commands, do this using the -P flag. For example, to print myfile. Note: Do not include a space between the -P and the printer's name. BSD also allows you to suppress the printing of a banner page with the -h option; to do this, enter:. You can also use the lpr command in a pipeline to print the output from other Unix commands. For example, to print out a long listing of the contents of the current directory with BSD, enter:.

Public printers will often be tagged with their names. If you are printing a PostScript file, make what costs are assigned to merchandise inventory that the printer you're using is PostScript compatible before you issue the command. On some BSD-compatible operating systems, lpr can also print.

With BSD printing commands, use lpq to list the jobs files waiting to be printed for a particular printer. To find what jobs are queued on the default printer, at the Unix prompt, enter:. The listing returned by lpq reports the rank, owner, job number, filename, and file size of each print job in the queue or actually printing.

With BSD, the lprm command lets you cancel the printing of a file. To remove a print job, first use the lpq command to find the job number of the print request you want to cancel. Then use the lprm command to kill the job by specifying the job number. For example, if you want to kill job number on printer ps99enter:. Note: Unless you have system administration privileges, you can remove only print jobs that you have submitted, not jobs submitted by other users.

In System V, use the -d flag to do this. You can also use the lp command in a pipeline to print the output from other Unix commands. For example, to print out a long listing of the contents of the current directory with System V, enter:. With System V, use the lpstat command to list the jobs for how to print in unix particular printer. Using lpstat prints the status of all your print requests made by lp to the default or designated printer.

To see the status of print jobs you have sent to the queue of the default printer that are still waiting, enter:. To check what jobs are pending for a particular printer, use the lpstat -P command. For example, to view the queue for printer ps99enter:. With System V, use the cancel command to stop the printing of a file. To cancel a job, even if it's already printing, use the lpstat command to find the job number. Then use the cancel command to kill that job. For example, if you want to kill the job psenter:.

This is document adzr in the Knowledge Base. Last modified on Skip to: content search login. Knowledge Base Search. Log in. Options Help Chat with a consultant. Include archived documents. This content has been archivedand is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

Contact us.

Using System V commands

Jan 18, To send a print job to a printer other than the default printer, you need to specify its name. In System V, use the -d flag to do this. For example, to print to a printer named ps99, enter: lp -d ps99 You can also use the lp command in a pipeline to print the output from other Unix commands. For example, to print out a long listing of the contents of the current directory . Aug 27, To print value of HOME variable use echo command or printf command as follows: echo "$HOME" echo "$var". OR. printf "%s\n" "$HOME". OR. printf "Hi, %s! You are using %s shell\n" "$USER" "$SHELL". Sample outputs from bash shell on OS X Unix based system: /Users/vivek Hi, vivek! Jan 06, While all of these examples show how awk works on a file, it can also read its input from a Unix pipeline, like this: $ cat foo | awk '{ print $3, $1 }' 3 1 c a Using a field separator with awk. If you need to specify a field separator such as when you want to parse a pipe-delimited or CSV file use the -F option, like this.

Today's Posts. Quick Links. Search Forums. Show Threads. Show Posts. Registered User. Join Date: May Join Date: Sep Do you have a acrobat reader on your box? Solaris 10 print to pdf. We are using quite old solaris app and would like to generate files instead of printing to paper.

Thanks in advance, Adam 3 Replies. Thank you 8 Replies. Hopefully this is the correct place to post this, if not please let me know. I don't really care if it is paid or freeware, I am just trying to get it to work.

I did see a product called BullZip and I am going to Shell Programming and Scripting. Batch job in unix server to move the pdf file from unix to windows. Hi Experts, I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers.

Could some body provide the inputs for this. How to read pdf file in UNIX environment? Is there any possible way to read this file? I need to give this file as input Thanks, Geetha 4 Replies. I am using SCO Unix to print text file. But the word size is too large, it is always over page A4 when I print.

Does Any one know how to use command change word size and make it fit on the page to print text file. I use command: lp -d printer name textFileName 16 Replies. Writing to pdf in Unix? Is there an easy way to print to a pdf file in Unix? Now I'm using lpr command to print to a network printer , but I need to have a pdf version of the file as well! Can someone help me? How to view ps and pdf file under unix. Vicky 2 Replies. Print to file in UNIX. I ask this about a Tru64 system that I do not have access to Is it possible to use lpr to print to file?

Thanks, kristy 2 Replies. How to print multi page to one for pdf in unix?? I find it will waste a lot of paper if I print every pages. So I want to print multipage into one. But I forgot how to do it in unix. Anyone help me!!! RedHat Commands. OpenSolaris Commands. Linux Commands. SunOS Commands. FreeBSD Commands. Full Man Repository. Advanced Search. Contact Us. Forum Rules. Mark Forums Read. Thread Tools. View Public Profile for pdf2ps.

Find all posts by pdf2ps. View Public Profile for vbe. Find all posts by vbe.

How to print in unix: 3 comments

Add a comment

Your email will not be published. Required fields are marked *