enq 命令的系统文档

>man enqCommands Reference, Volume 2, d - henq CommandPurposeEnqueues a file.SyntaxTo Process a Fileenq [  - ] [ -B CharacterPair ] [ -c ] [ -C ] [ -G ] [ -j ] [ -m Text ][ -M File ] [ -n ] [ -N Number ] [ -o Option ] [ -P Queue ] [ -r ] [ -RNumber ] [ -t "User" ] [ -T Title ] [ -Y ] [ -Z Name ] FileTo Change the Priority of Print Jobsenq -a Number -# JobNumberTo Display Statusenq [ -q | -A ] [ -L | -W ] [ -e ] [ -# JobNumber ] [ -u Name ] [ -wSeconds ] [ -s]To Change Queue and Queue Daemon Statusenq [ -d ] [ -D ] [ -G ] [ -K ] [ -L ] [ -q | -A ] [ -U ]To Cancel Optionsenq [ -X ] [ -xNumber ] [ -PPrinter ]To Hold, Release or Move a Print Job to Another Queueenq { -h | -p | -Q NewQueue } { -# JobNumber [ -P Queue ] | -u User |-P Queue }To Queue and Hold a Print Jobenq -H File ...DescriptionThe enq command is a general-purpose utility for enqueuing requests toa shared resource, typically a printer device. Use the enq command toenqueue requests, cancel requests, alter the priority of a request, anddisplay the status of queues and devices.The enq command has five different syntax diagrams because all theflags are not meant to work together. Some of these flags are meant forfile processing and accept FileName as an option. The other flags areused for changing the priority of a print job, displaying the status,changing the status of the queue or the queue daemon, and canceling aprint job.To enqueue files on a specific queue, use the -P flag (-P Queue). Ifmore than one device services a queue, you can also request aparticular device by specifying that device (:device) after the name ofthe queue. If you do not specify a device, the job is sent to the firstavailable device. If you do not specify a file, the enq command copiesstandard input into a file and enqueues it for printing.The enq command requests can have operator messages associated withthem. This feature is useful in a distributed environment or on asystem with many users. The messages are used to tell the printeroperator such information as a request to load a special form ordifferent color paper into the printer before allowing the job toprint. These messages are specified with the -m and -M flags. Theqdaemon command processes the enq command requests. When the qdaemon isready to begin a request that has an associated message, the systemdisplays the message on the console of the machine where the qdaemonprocess is running. The text of the message is accompanied by a promptthat tells the printer operator how to signal the request to continueor how to cancel the request.The display generated by the enq -A command contains two entries forremote queues. The first entry contains the client's local queue andlocal device name and its status information. The second entry followsimmediately; it contains the client's local queue name (again),followed by the remote queue name. Any jobs submitted to a remote queueare displayed first on the local side and are moved to the remotedevice as the job is processed on the remote machine.Since the status commands communicate with remote machines, the statusdisplay may occasionally appear to hang while waiting for a responsefrom the remote machine. The command will eventually time-out if aconnection cannot be established between the two machines.Notes:1    Before you can enqueue a file, you must have read access to it. Toremove a file, (see the -r flag) you must also have write accessto the directory that contains the file.2    If you want to continue changing the file after you issue the enqcommand but before it is printed, you must use the -c flag.3    When enqueuing files on a printer, flags can be interspersed inany order.4    The -d and -G flags are acted upon immediately. Syntax errorappearing before these flags on the command line are reported.Syntax errors appearing after these flags on the command line areignored.FlagsFile Processing OptionsIf you give the enq command a list of file names, it enqueues them allfor file processing on the default device or on the specified device.-Causes the enq command to act as a filter. The enq commandautomatically reads standard input if you do not specify a file orfiles. However, if you do specify a file, you can also use thedash (-) to force the enq command to read standard input. The dash(-) is actually not a flag, but a special type of file name.Therefore, it must come after all other flags have been specifiedon the command line.-B CharacterPairControls the printing of burst pages according to the value ofCharacterPair as follows. (n = never, a = always, g = group. Thefirst character is for header, the second character is fortrailer.)HTDescriptionnnNo headers, no trailersnaNo headers, trailer on every filengNo header, trailer at the end of the jobanHeader on every file, no trailersaaHeaders and trailers on every file in the jobagHeader on every file, trailer after jobgnHeader at the beginning of job, no trailergaHeader at beginning of job, trailer after every fileggHeader at beginning of job, trailer at end of jobThe header and trailer stanzas in the /etc/qconfig file define thedefault treatment of burst pages.Note: In a remote print environment, the default is to print aheader page and not a trailer page.-cCopies the file. To save disk space, the enq command remembers thename of the file, but does not actually copy the file itself. Usethe -c flag if you want to continue changing the file while youare waiting for the current copy to be printed.-CSpecifies that the mail command be used instead of the writecommand for error messages and job completion notification. (Usingthis flag is useful for writing PostScript(R) applications sinceit allows better feedback from the printer.) Error messages andjob completion messages (both generated by the piobe command) andany data read from the printer are also sent back by mail.The -C flag only applies to local print jobs. If you want to benotified when a job sent to a remote printer is completed, use the-n flag to receive a mail message.Note: There are some messages that cannot be redirected fromqdaemon and the printer backend in any way. These are systemerrors and are sent directly to the /dev/console file.-jSpecifies that the message Job number is: nnn, where nnn is theassigned job number, be displayed to standard output. This occursonly if the job is submitted to a local print queue.-m TextSubmits an operator message with an enq command request. Thespecified text contains the message.-M FileSubmits an operator message with an enq command request. Thespecified file contains the text of the message.-nNotifies you when your job is finished. If the -t flag is alsoused, the enq command also notifies the user for whom the requestis intended (see the -t flag).-N NumberPrints Number copies of the file. Normally, a file is printed onlyonce.-o OptionSpecifies that flags specific to the backend be passed to thebackend. Thus, for each queue there are flags not described inthis article that can be included on the enq command line. See thepiobe command for a list of these flags.-P QueueSpecifies the queue to which the job is sent. A particular deviceon a queue can be specified by typing -P Queue:Device.-rRemoves the file after it has been successfully printed.-R NumberSets the priority of the current job to Number. This flag is usedat job submission time. Use the -a flag to alter priority afterthe job is submitted. Higher numbers assign higher priority. Thedefault priority is 15. The maximum priority is 20 for most usersand 30 for the users with root user authority.-t "User"Labels the output for delivery to User. Normally the output islabeled for delivery to the user name of the person issuing theenq command request. The value of User must be a single wordmeeting the same requirements of a regular user ID.-T TitlePuts title on the header page and displays it when the -q flag isspecified. Normally the job title is the name of the file. If theenq command reads from standard input, the job title is STDIN.#where # is the process ID of the enq command.-YTells the enq command to ignore the rest of the command line afterthis flag. This is useful for discovering whether a queue is valid(if it is in the /etc/qconfig file). For example, typing enq -Plp4 -Y returns with an exit value of 0 if the line printer lp4 isa valid queue; if otherwise, a nonzero value is returned. Usingthis flag is also good for forcing the qdaemon command to redigestthe /etc/qconfig file.-Z NameSpecifies originator of remote print jobs.Print Job Priority Options-a NumberChanges the priority of the named job to Number. The job must havebeen submitted for printing prior to entering the enq command withthis flag. See the -R flag for a description of priorities. Usethe -# flag to specify the job number. This flag is only valid forlocal print jobs.-# JobNumberSpecifies the job number used by the enq -q command or the enq -acommand, and displays only the job specified in status output.Notes:1    Specify the -P Queue to override the default destinationprinter.2    If jobs 1, 2, and 3 are in the printer queue, and youspecify that you want the status of job 3 while job 1 isrunning, the status information will show job 1 and job 3,not only job 3.3    If you specify a job number that does not exist, the systemdisplays the current job number on the queue instead of anerror message.
Display Status Options-AProvides status for all queues. This is like running the enq -qcommand once for each queue in the qconfig file.-eExcludes status information from queues that are not under thecontrol of the qdaemon command. The status from such queues may bein different formats. The -e flag can be used with any combinationof flags.-LSpecifies the long status. This flag can be used with the -A flagor the -q flag. This flag cannot be used with the -W flag. If the-L flag and -W flag are used simultaneously, the first onespecified takes precedence. Use the -L flag to show multiple filesto be printed in a single print job.-qDisplays the status of the default queue. The LPDEST and PRINTERenvironment variable control the name of the default printer. Ifthe LPDEST environment variable contains a value, that value isalways used first. If the LPDEST variable has no value, the enqcommand uses the PRINTER environment variable. If the PRINTERenvironment variable contains no value, then the enq command usesthe system default.Notes:1    Use the -P Queue flag with the -q flag to display thestatus of a particular queue.2    Any destination command line options override both theLPDEST and the PRINTER environment variables.-sObtains the status of print queues without listing any files.-u NameSpecifies the user name for which to print job status.-w SecondsSpecifies continuous output of the queue status, updating thescreen every Seconds specified until the queue is empty (see thelpq command). When the queue is empty, the process halts. Thisflag is only used with either the -q flag, or the -A flag, or the-L flag.-WSpecifies the wide status format with longer queue names, devicenames, and job numbers. Job number information is available on AIX4.3.2 and later. This flag can be used with the -A flag or the -qflag. It cannot be used with the -L flag. If the -L flag and -Wflag are used simultaneously, the first one specified takesprecedence.Change the queue and queue Daemon Status Options-dRuns the digest command on the /etc/qconfig file. Once the digestis completed, any changes to the /etc/qconfig file are reflectedin the /etc/qconfig.bin file. A user must have root user authorityto run this option.In addition to the previous flags available to all users, the enqcommand accepts the following flags when they are entered by users thathave root user authority. Root user authority means that you are rootor you belong to the printq group.Note: The following flags can only be used on local print jobs.-DDevice DOWN. Turns off the device associated with the queue. Theqdaemon process no longer send jobs to the device, and enteringthe enq -q command shows its status as DOWN. Any job currentlyrunning on the device is allowed to finish.-GDie GRACEFULLY. Ends the qdaemon process after all currentlyrunning jobs are finished. Use of this flag is the only clean wayto bring the qdaemon process down. Use of the kill command maycause problems, such as jobs hanging up in the queue.If the qdaemon process is running under srcmstr (the defaultconfiguration), enq -G does not prevent qdaemon from beingrestarted automatically. You must use the chssys command, whichchanges the default configuration and prevents the automaticrestart of the qdaemon process. The following command:chssys -s qdaemon -Oissued prior to the enq -G command, prevents the automatic restartof qdaemon.The following command:startsrc -s qdaemonrestarts the qdaemon process manually.-KActs the same as the -D flag, except that all current jobs areKILLED. They remain in the queue, and are run again when thedevice is turned on.-LSpecifies the long status. This flag can be used with the -A flagor the -q flag. Use the -L flag to show multiple files to beprinted in a single print job.-UBrings UP the device associated with a queue. The qdaemon processsends jobs to it again and entering the enq -q command shows itsstatus as READY.Note: If more than one device is associated with a queue, you mustspecify the device as well as the queue when you use the -D flag,the -K flag, and the -U flags. For example, entering -P lp:lpddesignates the same device only if there is no other device onthat queue.Cancel Options-XCancels the printing of your jobs. If you have root userauthority, all jobs on the specified queue are deleted. This flagis only valid on local print jobs.-x NumberCancels the printing of the specified job Number.-P PrinterSpecifies the Printer where either all jobs or the selected jobnumber is to be canceled.Attention: If you have root user authority and do not specify aqueue, all jobs on all queues are deleted.Holding and Releasing a Print Job Options-# JobNumberDesignates the number of the print job to be held or released.-hHolds the specified print job.-HQueues and holds the file indicated with the File parameter.-pReleases the specified print job.-P QueueDesignates the print queue to be held or released.-u UserDesignates the user whose print jobs are to be held or released.Moving Print Job Options-# JobNumberDesignates the number of the print job to be moved.-P QueueDesignates the print queue to be moved. The value of the Queuevariable can be a queue name or in the form queue:device name.-Q NewQueueDesignates the target queue where the print job will be moved to.The value of the NewQueue variable can be in the form of a queuename or in the form queue:device name.-u UserDesignates the user whose print jobs are to be moved.SecurityAuditing Events:EventInformationENQUE_adminQueue name, device name, job name, user nameAttention RBAC users and Trusted AIX users: This command can performprivileged operations. Only privileged users can run privilegedoperations. For more information about authorizations and privileges,see Privileged Command Database in Security. For a list of privilegesand the authorizations associated with this command, see the lssecattrcommand or the getcmdattr subcommand.Examples1    To print the file memo on the default printer, enter:enq memo2    To print the file prog.c with page numbers, enter:pr prog.c | enqThe pr command puts a heading at the top of each page thatincludes the date the file was last modified, the name of thefile, and the page number. The enq command then prints the file.3    To print a file with page numbers, reading from standard input,enter: pr x | enq -P bill -n -r fn1 - fn3The dash (-) special file name tells the enq command to read fromstandard input. Normally the enq command will not read fromstandard input if there are file names on the command line. Italso indicates the order in which to print things. The pr commandcreates a page numbered version of the file x and passes it to theenq command, which creates a temporary file containing that outputin the /var/spool/qdaemon file.The enq command creates a job with four files and submits it tothe queue named bill. It will print the fn1 file twice. Then itwill print whatever the output of the pr command was. Lastly itwill print the file fn3. The four files are treated as one job forthe purposes of burst pages. Notification is sent (the -n flag)when the job is complete. Since the -r flag was specified, the fn1and fn3 files are removed at job completion. The temporary filecreated by the dash (-) file is always deleted.The pr command puts a heading at the top of each page thatincludes the date the file was last modified, the name of thefile, and the page number. The enq command then prints the file.4    To print the file report on the next available printer configuredfor the fred queue, enter:enq -P fred report5    To print several files beginning with the prefix sam on the nextavailable printer configured for the fred queue, enter:enq -P fred sam*All files beginning with the prefix sam are included in one printjob. Normal status commands show only the title of the print job,which in this case is the name of the first file in the queueunless a different value was specified with the -T flag. To listthe names of all the files in the print job, use the long statuscommand enq -A -L.6    To check the print queue to see if a file is still waiting to beprinted, enter: enq -qThis command displays the status of the user's default queue. Ifthe file is not yet printed, then it appears in the queue statuslisting. The system default queue is defined as the first queue inthe /etc/qconfig[.bin] file. Users can have their own defaultoverride by setting and exporting the PRINTER environmentvariable.7    To display the status of a nondefault queue, lp0, enter: enq -q -Plp08    To obtain the long queue status, enter: enq -L9    To obtain status on all queues, enter: enq -A10   To obtain long status on all queues, enter: enq -A -L11   To obtain the status of the default queue, in wide format, enter:enq -W12   To obtain the wide status of all queues, enter: enq -W -A13   To stop printing a job (a job is one or more files), enter: enq -x413This command cancels the request you made earlier to print a job.The number was obtained from the listing obtained by entering theenq -q command. If the job is currently being printed, the printerstops immediately. If the job has not been printed yet, it isremoved from the queue so that it will not be printed. If the jobis not in the queue, the enq command displays a message similar tothe following:no such request from you -- perhaps it's done?14   To disconnect a printer from the queuing system, enter: enq -Plp0:dlp0 -DEntering this command stops the enq command requests from beingsent to the printer that serves the lp0 queue. If a file iscurrently printing, it is allowed to finish. You must be able toexecute the qadm command to run this command.Note: The printers serving a given queue are named by the devicestanza name as it appears in the /etc/qconfig[.bin] file.15   To print a file with page numbers using the piobe command backendon the default printer, enter: enq -o -p filenameThe -p flag is not looked at by the enq command. The -o flag tellsthe enq command to pass the next item, which can be in quotes, tothe backend unchanged. So, the enq command passes the -p flag tothe qdaemon process, which in turn passes it to the backend piobe.The -p flag causes piobe to execute the /usr/bin/pr filter toapply page numbers to the document before giving data to thedevice. Multiple options can be given in quotes preceded by one -oflag or without quotes and individually preceded by more than one-o flag.16   Assuming a qconfig file with the following information:qname:device = fredfred:file = /tmp/hellobackend = /usr/bin/sh /usr/bin/diffAnd given the following commands: rm /tmp/hellotouch /tmp/hellopr /etc/hosts|enq -P qname:fred - /etc/hostsThe qdaemon process executes the /usr/bin/diff program with twoarguments, one of which is a temporary file name and the otherbeing the /etc/hosts file. The only difference between the twofiles is that one was run through the pr command. The /tmp/hellofile will contain the differences between the two files. Theqdaemon process does not create the /tmp/hello file if it does notexist.17   The following command: enq -m'i want pink paper for this job'/etc/passwdsends the specified operator message to the operator's consolejust before the print job is to print. The operator must respondto this message to continue or cancel the job. enq -M pink/etc/passwdThis command accomplishes the same thing, only the message iscontained in a file called pink.18   To cancel all jobs in the fred queue, enter: enq -X -P fredIf the user who entered this command has root user authority, allthe jobs from the fred queue are deleted. If the user does nothave root user authority, only the users jobs are deleted fromthat queue.19   To queue the file named MyFile and return the MyFile job number tothe jdf file, enter: enq -j MyFile20   To hold print job number 310, enter: enq -h -#310To release the hold on print job number 310, enter: enq -p -#31021   To hold all the print jobs on queue lp0, enter: enq -h -P lp0To release the lp0 queue, enter: enq -p -P lp022   To hold all print jobs created by fred, enter: enq -h -u fredTo release the print jobs created by fred, enter: enq -p -u fred23   To move job number 318 to queue lp0, enter: enq -Q lp0 -#318The flags that control moving print jobs work in the same way asthe flags that hold the print files. The hold flags and variablesare illustrated in the preceding examples.Files/usr/sbin/qdaemonQueuing daemon./etc/qconfigQueue configuration file./var/spool/lpd/qdir/*Queue requests./var/spool/lpd/stat/*Information on the status of the devices./var/spool/qdaemon/*Temporary copies of enqueued files./etc/qconfig.binDigested, binary version of the /etc/qconfig file.Related InformationThe chquedev command, lsque command, mkque command, rmque command.The qconfig file.Changing or showing queue characteristics in Printers and printing.Printing administration in Printers and printing.Printer-specific information in Printers and printing.Installing support for additional printers in Printers and printing.Print spooler in Printers and printing.Virtual printer definitions and attributes in Printers and printing.Printer colon file conventions in Printers and printing.

enq 命令的帮助.相关推荐

  1. AIX中一些常用的命令汇总

    <oracle大型数据库系统在AIX/unix上的实战详解>集中讨论33:AIX中一些常用的命令程  文平 和若干读者邮件沟通了一些关于AIX命令使用方面的问题,干脆,这里我给大家做一个列 ...

  2. 我希望早几年知道的5个Unix命令

    使用*nix系统已经有一段时间了.但还是有一些命令是被我一直忽略的,真希望我能早几年发现这些命令. 1. man ascii 这个命令会打印出八进制.十六进制和十进制的ASCII码表.难以置信我是一个 ...

  3. oracle查锁及解锁命令

    --查询行锁语句 select sql_text from v$sql a,v$session b where a.sql_id=b.sql_id and b.event='enq: TX - row ...

  4. Linux 命令(142)—— hexdump 命令

    文章目录 1.命令简介 2.命令格式 3.选项说明 4.格式 4.1 格式字符串 4.2 转换字符串 5.常用示例 参考文献 1.命令简介 hexdump 以 ASCII.十进制.十六进制或八进制显示 ...

  5. 【MW】Drop Materialized View Hangs with 'Enq: JI - Contention'

    适用的数据库版本[Release 10.2 to 11.2] 事件:当运行DROP MATERIALIZED VIEW 时 会话hang住. 用下面命令生成跟踪文件(通过任意会话): 点击(此处)折叠 ...

  6. 【故障处理】队列等待之enq: TX - row lock contention

    [故障处理]队列等待之enq: TX - row lock contention 1  BLOG文档结构图 2  前言部分 2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能, ...

  7. 【等待事件】序列等待事件总结(enq: SQ - contention、row cache lock、DFS lock handle和enq: SV - contention)...

    [等待事件]序列等待事件总结(enq: SQ - contention.row cache lock.DFS lock handle和enq: SV - contention) [等待事件]序列等待事 ...

  8. Oracle死锁问题: enq: TX - row lock contention

    前言 这篇文章也是记录近期遇到的问题以及从中学到的知识 ,近期一直在救火,有些问题自认为还是挺有代表性的,有兴趣的话再继续向下看 问题现象 线上反馈,执行批量处理EXCEL数据时,系统一直卡在进度滚动 ...

  9. enq:TM-contention

    7.1 enq:TM-contention 执行dml期间,为防止对与dml相关的对象进行修改,执行dml的进程必须对该表获得TM锁,若在获得TM锁的过程中发生争用, 则等待enq:TM-conten ...

最新文章

  1. mongodb 安装pymongo 驱动
  2. effective c++ 学习
  3. list对oracle结果集排序了_详解SQL窗口函数和分组排序函数
  4. 转大学毕业后拉开差距的原因
  5. 【算法图解|2】JavaScript 如何实现数组扁平化
  6. kvm最小磁盘大于等于5G
  7. VBA编程基础和编程环境(二)
  8. wps 甘特图_项目管理/产品研发/建设施工/计划生成项目进度甘特图表教程
  9. PCIe扫盲——基于WinDriver快速开发PCIe驱动简明教程
  10. JS实现继承的几种方式
  11. CPU占用100% 解决方法 (小莫)
  12. 钱我所欲也,健康我所欲也,舍钱而取健康也
  13. 计算机桌面右键新建展不开,右键新建中没有excel怎么办
  14. .md文件中插入本地图片并显示图片预览
  15. Rockchip开发系列 - 总目录
  16. 这4款数据自动化探索 Python 神器,解决99%的数据分析问题!
  17. ECCV 2022《Tip-Adapter: Training-free Adaption of CLIP for Few-shot Classification》
  18. 《iPad开发从入门到精通》——6.3节站站查询
  19. leetcode 滑动窗口
  20. 机械键盘到底茶轴好还是黑轴好呢?第一次用,需要注意什么?

热门文章

  1. 手机二维码识别软件3秒破译火车票信息
  2. 蓝牙dun协议修改后刷机步骤!
  3. linux php验证码,openwrt路由器搭建PHP并用PHP识别验证码
  4. WMS发展历史与趋势
  5. 【第二十二讲】获取参数名
  6. 如何将pdf转换成ppt,pdf转ppt方法
  7. 基于gradle的dependency-management配置实现多模块springboot依赖库的版本管理
  8. 【Pandas】多种添加行列数据方法
  9. 2016年8月15日 星期一 --出埃及记 Exodus 16:16
  10. 为什么要用malloc申请空间