PRINT(1,C) AIX Commands Reference PRINT(1,C)
-------------------------------------------------------------------------------
print
PURPOSE
Enqueues a file.
SYNTAX
+------------------------------+ +---- -bp=2 ----+
print ---| +---- 0 ----+ |---| one of |--->
+- queueargname -|1 |-+ | +-----------+ |
+- :device -+ +-| -bp -bp=0 |-+
| -nb -bp=1 |
| -bp=2 |
+-----------+
+------------------------------------+ +------------+
>---| +--------------------------------+ |---| 3 |---|
+-| -cp -pr=num -rm |-+ | +- -fi --+ |
^| -from=name2 -of=file -tl=title || +-| |-+
|| -nc=num -ot=text -to=name || ^+- file -+|
|| -no -q || +----------+
|+--------------------------------+|
+----------------------------------+
+-------------------------------+ +-------------+
print ---| +------------+ |---| one of |--- file ---|
+- queueargname -| 2|-+ | +---------+ | ^ |
+- -su=user -+ +-| -ca |-+ +--------+
| -ap=num |
+---------+
+- -dg -+
print ---| 2|---|
+- -rr -+
one of
+------------------------------+ +-----+2
print ---| +---- 0 ----+ |---| -dd |---|
+- queueargname -|1 |-+ | -dk |
+- :device -+ | -du |
+-----+
-----------------
1 Do not put a blank between these items.
2 Only members of the system group can use these flags.
3 Only specify -fi once.
Processed November 8, 1990 PRINT(1,C) 1
PRINT(1,C) AIX Commands Reference PRINT(1,C)
Warning: See restrictions, Chapter 18, AIX Programming Tools and Interfaces.
DESCRIPTION
The print command is a general purpose utility for enqueing requests to a
shared resource, typically a printer device. With the print command you can
enqueue print requests, cancel print requests, alter the priority of a print
request, display the status of print queues and devices, enqueue backup
requests, enqueue restore requests, and display the table of contents of a
backup. For information on how to establish default print, backup, and restore
queues, see Managing the AIX Operating System.
To enqueue, cancel, or reprioritize files on a specific queue, specify its
corresponding queueargname. Each printer queue on the system has a stanza
entry in the /etc/qconfig file containing various parameters. One of these is
the argname parameter. The print command compares the queueargname which you
specify with a matching argname parameter found in the /etc/qconfig file in
order to determine which queue to send your print request to. Entering the
print command with the -q flag will show the status of the various printer
devices and queues, along with each queue's corresponding argname. If more
than one device services a queue, you can also request a particular device by
specifying queueargname:device. If you do not specify a queueargname at all,
the job will be sent to the default printer queue. If you do not specify a
file, print will copy standard input into a file and enqueue it for printing.
For further information, see qconfig in the AIX Operating System Technical
Reference.
Print requests may have operator messages associated with them. The messages
can be used to tell another user who is operating the printer to load a special
form into the printer before allowing this job to print. These messages are
specified with the -of and -ot flags. When qdaemon, the daemon that processes
print requests, is ready to begin a request that has an associated message, the
system displays the message on the console of the machine where qdaemon is
running. The text of the message is accompanied by a prompt that tells the
printer operator how to signal the request to continue or cancel the request.
Notes:
1. Before you can print, backup, or restore a file, you must have read access
to it. To remove a file, you must also have write access to the directory
that contains the file.
2. If you want to continue changing the file after you issue the print
command but before it is printed, you must use the -cp flag.
3. When enqueing files on a printer, flags and file names can be interspersed
in any order.
4. Blanks between flags and their arguments are not permitted.
Processed November 8, 1990 PRINT(1,C) 2
PRINT(1,C) AIX Commands Reference PRINT(1,C)
5. If the printer must receive data in a specific format (for example,
postscript), you must provide a printing backend to process files and send
them to the printer.
6. Japanese character output is supported by IBM 5575, 5227, and 5327
printers attached to PS/2 or PS/55 model 5570 computers.
FLAGS
If you give print a list of file names, it enqueues them all for printing on
the default printer.
-ap=num Changes to num the priority of the named file. The file must
have been submitted for printing prior to entering the print
command with this flag. See "-pr" on page 4 for a
description of priorities.
-bp=num
-bp
-nb Controls the printing of burst pages according to the value
of num as follows:
0 Does not print headers or trailers.
1 Prints one header page before each file. No trailer
appears.
2 Prints a header page at the beginning and a trailer page
at the end of each file.
The header stanza in the qconfig file defines the default
treatment of burst pages.
Specifying only -bp is the same as specifying -bp=2.
Specifying -nb is the same as specifying -bp=0.
-ca Cancels the printing of the named files.
-cp Copies the file. Ordinarily, to save disk space, print
remembers the name of the file, but does not actually copy
the file itself. Use the -cp flag if you want to continue
changing the file while you are waiting for the current copy
to be printed.
-fi Causes print to act as a filter. The print command
automatically reads standard input if you do not specify
files as arguments. However, if you do specify file
arguments, you can use the -fi flag to force print to read
standard input at the appropriate time.
Processed November 8, 1990 PRINT(1,C) 3
PRINT(1,C) AIX Commands Reference PRINT(1,C)
-nc=num Prints num copies of the file. Normally a file is printed
only once.
-no Notifies you when your job is finished. If the -to flag is
also used, print notifies the user for whom the request is
intended (see the -to flag on page 4).
-of=file Submits an operator message with a print request. The
specified file contains the text of the message.
-ot=text Submits an operator message with a print request. The
specified text contains the text of the message.
-pr=num Sets the priority of the named file to num. Higher numbers
assign higher priority. The default priority is 15. The
maximum priority is 20 for most users and 30 for the users
with superuser authority and members of the system group
(group 0).
-q Displays the status of the printers and queues, along with
each queue's corresponding argname. The environment variable
LC_TIME controls the appearance of the time field.
-rm Removes the file after it has been successfully printed.
-tl=title Puts title on the header page and displays it when the -q
flag is specified. Normally the job title is the name of the
file. If print reads from standard input, the job title is
STDIN.# where # is the process ID of the print command.
-to=name Labels the output for delivery to name. Normally the output
is labeled for delivery to the person issuing the print
request.
In addition to the previous flags that are available to all users, the print
command accepts the following flags when they are entered by users that have
superuser authority or users that are members of the system group:
-dd Turns off the device associated with queue. The qdaemon no
longer sends jobs to the device, and entering "print -q"
shows its status as "OFF". Any job currently running on the
device is allowed to finish.
-dg Kills the qdaemon after all currently running jobs are
finished. Use of this flag is the only clean way to bring
the qdaemon down. Use of the kill command may cause
problems, such as jobs hanging up in the queue.
-dk Acts the same as -dd, except current jobs are killed. They
remain in the queue, and are run again when the device is
turned on.
Processed November 8, 1990 PRINT(1,C) 4
PRINT(1,C) AIX Commands Reference PRINT(1,C)
-du Turns on the device associated with queue. The qdaemon sends
jobs to it again and entering "print -q" shows its status as
"READY".
Note: If more than one device is associated with a queue,
you must specify the device as well as the queue when
you use the -dd, -dk, and -du flags. Devices are
numbered, starting at zero, in the order that they
appear in the qconfig file. For example, "-lp:0"
designates the first device on the lp queue. "-lp"
designates the same device only if there is no other
device on that queue.
-from=name Labels the output as though name had submitted it. You can
only use this flag with superuser authority.
-rr Forces the qdaemon to reread the qconfig file after all
currently running jobs are finished. With this flag, a user
with superuser authority can change the qconfig file without
having to kill and restart the qdaemon.
-su=user Cancels or changes the priority on another user's job when
used with the -ca or the -ap flags. For example, a job
"report" submitted by user "ann" can be cancelled as follows:
print -su=ann -ca report
The print command passes flags it does not recognize to the backend that does
the printing. Thus, for each queue there are flags not described above that
can be included on the print command line. See "piobe" for a list of these
flags.
EXAMPLES
1. To print a file on the default printer:
print memo
2. To print a file with page numbers:
pr prog.c | print
The pr command puts a heading at the top of each page that includes the
date the file was last modified, the name of the file, and the page number.
The print command then prints the file.
3. To see if a file is still waiting to be printed:
print -q
Processed November 8, 1990 PRINT(1,C) 5
PRINT(1,C) AIX Commands Reference PRINT(1,C)
This command displays the status of the queues and printers. If a file has
not been printed yet, it appears in the queue status listing. If you piped
data to print, as in Example 2, it is listed as "PRIMARY.OUTPUT".
4. To stop printing a file:
print -ca chapter1
This command cancels the request you made earlier to print the file
"chapter1". If the file is currently being printed, the printer stops
immediately. If the file has not been printed yet, it is removed from the
queue so that it will not be printed. If the file is not in the queue,
print displays the message:
no such request from you -- perhaps it's done?
5. To disconnect a printer from the queueing system:
print -a:2 -dd
This command stops print requests from being sent to the third printer that
serves the "-a" queue. If a file is currently being printed, it is allowed
to finish. You must be a member of the system group (group "0") to run
this command.
Note: The printers serving a given queue are numbered starting with zero
in the order that they appear in the /etc/qconfig file.
FILES
/etc/qdaemon Queueing daemon.
/usr/lpd/qdir/* Queue requests.
/usr/lpd/stat/* Information on the status of the devices.
/usr/spool/qdaemon/* Temporary copies of enqueued files.
/etc/qconfig Queue configuration file.
RELATED INFORMATION
See the following commands: "backup," "piobe," "pr," "qdaemon, lp," and
"restore."
See the qconfig file in AIX Operating System Technical Reference.
See the discussion of print in Managing the AIX Operating System.
See "Introduction to International Character Support" in Managing the AIX
Operating System.
Processed November 8, 1990 PRINT(1,C) 6