⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0298-0300.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>



<HEAD>

<TITLE>Linux Complete Command Reference:User Commands:EarthWeb Inc.-</TITLE>

</HEAD>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311046 //-->

<!-- TITLE=Linux Complete Command Reference//-->

<!-- AUTHOR=Red Hat//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=01 //-->

<!-- PAGES=0001-0736 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->



<P><CENTER>

<a href="0296-0297.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0301-0302.html">Next</A></CENTER></P>







<A NAME="PAGENUM-298"><P>Page 298</P></A>





<P>If file is not specified, the file

/usr/dict/words is used, only alphanumeric characters are compared, and the case of

alphabetic characters is ignored.

</P>



<P><B>OPTIONS</B></P>



<TABLE>



<TR><TD>

_d

</TD><TD>

Dictionary character set and order; that is, only alphanumeric characters are compared.

</TD></TR><TR><TD>

_f

</TD><TD>

Ignore the case of alphabetic characters.

</TD></TR><TR><TD>

-a

</TD><TD>

Use the alternate dictionary

/usr/dict/web2.

</TD><TR><TR><TD>

_t

</TD><TD>

Specify a string termination character; that is, only the characters in

string up to and including the first occurrence of

termchar are compared.

</TD></TR></TABLE>



<P>The look utility exits 0 if one or more lines were found and displayed,

1 if no lines were found, and &gt;1 if an error occurred.

</P>



<P><B>FILES</B></P>



<TABLE>



<TR><TD>

/usr/dict/words

</TD><TD>

The dictionary

</TD></TR><TR><TD>

/usr/dict/web2

</TD><TD>

The alternate dictionary

</TD></TR></TABLE>



<P><B>SEE ALSO</B></P>



<!-- CODE SNIP //-->

<PRE>grep(1), sort(1)

</PRE>

<!-- END CODE SNIP //-->



<P><B>Compatibility</B></P>



<P>The original manual page stated that tabs and blank characters participated in comparisons when the

-d option was specified. This was incorrect and the current man page matches the historic implementation.

</P>



<P><B>HISTORY</B></P>



<P>look appeared in version 7 AT&amp;T UNIX.

</P>



<P>14 June 1993

</P>



<H3><A NAME="ch01_ 149">

lpq

</A></H3>



<P>lpq&#151;Spool queue examination program

</P>



<P><B>SYNOPSIS</B></P>



<!-- CODE SNIP //-->

<PRE>lpq [-l] [-P printer] [job # ...] [user ...]

</PRE>

<!-- END CODE SNIP //-->



<P><B>DESCRIPTION</B></P>



<P>lpq examines the spooling area used by lpd(8) for printing FILES on the line printer, and reports the status of the specified

jobs or all jobs associated with a user. lpq invoked without any arguments reports on any jobs currently in the queue.

</P>



<P><B>OPTIONS</B></P>



<TABLE>



<TR><TD>

-P

</TD><TD>

Specify a particular printer; otherwise the default line printer is used (or the value of the

PRINTER variable in the ENVIRONMENT). All other arguments supplied are interpreted as usernames or job numbers to filter out only

those jobs of interest.

</TD></TR><TR><TD>

-l

</TD><TD>

Information about each of the FILES comprising the job entry is printed. Normally, only as much information

as will fit on one line is displayed.

</TD></TR></TABLE>



<P>For each job submitted&#151;in other words, each time

lpr(1) is invoked&#151;lpq reports the user's name, current rank in

the queue, the names of FILES comprising the job, the job identifier (a number that may be supplied to

lprm(1) for removing a specific job), and the total size in bytes. Job ordering is dependent on the algorithm used to scan the spooling directory and

is supposed to be FIFO (First in First Out). Filenames comprising a job may be unavailable (when

lpr(1) is used as a sink in a pipeline) in which case the file is indicated as

(standard input).

</P>



<A NAME="PAGENUM-299"><P>Page 299</P></A>





<P>If lpq warns that there is no daemon present (due to some malfunction, for example), the

lpc(8) command can be used to restart the printer daemon.

</P>



<P><B>ENVIRONMENT</B></P>





<P>If the following ENVIRONMENT variable exists, it is used by

lpq:

</P>



                                                                                                            <P>PRINTER     Specifies an alternate default printer

<P><B>FILES</B></P>



<TABLE>



<TR><TD>

/etc/printcap

</TD><TD>

To determine printer characteristics

</TD></TR><TR><TD>

/var/spool/*

</TD><TD>

The spooling directory, as determined from printcap

</TD></TR><TR><TD>

/var/spool/*/cf*

</TD><TD>

Control FILES specifying jobs

</TD></TR><TR><TD>

Pa/var/spool/*/lock

</TD><TD>

The lock file to obtain the currently active job

</TD></TR><TR><TD>

/usr/share/misc/termcap

</TD><TD>

For manipulating the screen for repeated display

</TD></TR></TABLE>



<P><B>SEE ALSO</B></P>



<!-- CODE SNIP //-->

<PRE>lpr(1), lprm(1), lpc(8), lpd(8)

</PRE>

<!-- END CODE SNIP //-->



<P><B>HISTORY</B></P>



<P>lpq appeared in BSD 3.

</P>



<P><B>BUGS</B></P>



<P>Due to the dynamic nature of the information in the spooling directory,

lpq may report unreliably. Output formatting is sensitive to the line length of the terminal; this can result in widely spaced columns.

</P>



<P><B>DIAGNOSTICS</B></P>





<P>Unable to open various FILES. The lock file is malformed. Garbage FILES when there is no daemon active, but FILES in

the spooling directory.

</P>



<P>BSD 4.2, 9 May 1991

</P>



<H3><A NAME="ch01_ 150">

lpr

</A></H3>



<P>lpr&#151;Offline print

</P>



<P><B>SYNOPSIS</B></P>



<!-- CODE SNIP //-->

<PRE WIDTH="1">lpr [-P printer] [-# num] [-C class] [-J job] [-T title] [-U user]

[-i [numcols]] [-1234 font] [-w num] [-cdfghlnmprstv] [name ...]

</PRE>

<!-- END CODE SNIP //-->



<P><B>DESCRIPTION</B></P>



<P>lpr uses a spooling daemon to print the named FILES when facilities become available. If no names appear, the standard

input is assumed.

</P>



<P>The following single-letter OPTIONS are used to notify the line printer spooler that the FILES are not standard text FILES.

The spooling daemon will use the appropriate filters to print the data accordingly.

</P>



<TABLE>



<TR><TD>

_c

</TD><TD>

The FILES are assumed to contain data produced by

cifplot(1).

</TD></TR><TR><TD>

_d

</TD><TD>

The FILES are assumed to contain data from TeX (DVI format from Stanford).

</TD></TR><TR><TD>

_f

</TD><TD>

Use a filter that interprets the first character of each line as a standard FORTRAN carriage control character.

</TD></TR><TR><TD>

_g

</TD><TD>

The FILES are assumed to contain standard plot data as produced by the plot routines. (SEE ALSO plot for the

filters used by the printer spooler.)

</TD></TR></TABLE>



<A NAME="PAGENUM-300"><P>Page 300</P></A>







<TABLE>



<TR><TD>

_l

</TD><TD>

Use a filter that allows control characters to be printed and suppresses page breaks.

</TD></TR><TR><TD>

_n

</TD><TD>

The FILES are assumed to contain data from

ditroff (device independent troff).

</TD><TR><TR><TD>

_p

</TD><TD>

Use pr(1) to format the FILES (equivalent to print).

</TD><TR><TR><TD>

_t

</TD><TD>

The FILES are assumed to contain data from

troff(1) (cat phototypesetter commands).

</TD><TR><TR><TD>

_v

</TD><TD>

The FILES are assumed to contain a raster image for devices like the Benson Varian.

</TD></TR></TABLE>



<P>These OPTIONS apply to the handling of the print job:

</P>



<TABLE>



<TR><TD>

_P

</TD><TD>

Force output to a specific printer. Normally, the default printer is used (site-dependent), or the value of

the ENVIRONMENT variable PRINTER is used.

</TD></TR><TR><TD>

_h

</TD><TD>

Suppress the printing of the burst page.

</TD></TR><TR><TD>

_m

</TD><TD>

Send mail upon completion.

</TD></TR><TR><TD>

_r

</TD><TD>

Remove the file upon completion of spooling or upon completion of printing (with the

-s option).

</TD></TR><TR><TD>

_s

</TD><TD>

Use symbolic links. Usually, FILES are copied to the spool directory. The

-s option will use symlink(2) to link data FILES rather than trying to copy them so large FILES can be printed. This means the FILES should not be modified

or removed until they have been printed.

</TD></TR></TABLE>



<P>The remaining OPTIONS apply to copies, the page display, and headers:

</P>



<TABLE>



<TR><TD>

-# num

</TD><TD>

The quantity num is the number of copies desired of each file named. For example,

</TD></TR></TABLE>



<!-- CODE SNIP //-->

<PRE>     lpr _#3 foo.c bar.c more.c

</PRE>

<!-- END CODE SNIP //-->



<TABLE>



<TR><TD>

</TD><TD>

would result in three copies of the file

foo.c, followed by three copies of the file bar.c, and so on. On

the other hand,

</TD></TR></TABLE>



<!-- CODE SNIP //-->

<PRE>     cat foo.c bar.c more.c | lpr _#3

</PRE>

<!-- END CODE SNIP //-->



<TABLE>



<TR><TD>

</TD><TD>

will give three copies of the concatenation of the FILES. Often a site will disable this feature to encourage

use of a photocopier instead.

</TD></TR><TR><TD>

1234 font

</TD><TD>

Specifies a font to be mounted on font position

i. The daemon will construct a .railmag file

referencing the font pathname.

</TD></TR><TR><TD>

-C Ar class

</TD><TD>

Job classification to use on the burst page. For example

</TD></TR></TABLE>



<!-- CODE SNIP //-->

<PRE>lpr _C EECS foo.c

</PRE>

<!-- END CODE SNIP //-->



<TABLE>



<TR><TD>

</TD><TD>

causes the system name&#151;the name returned by

hostname(1)&#151;to be replaced on the burst page by

EECS, and the file foo.c to be printed.

</TD></TR><TR><TD>

-J Ar job

</TD><TD>

Job name to print on the burst page. Normally, the first file's name is used.

</TD></TR><TR><TD>

-T Ar title

</TD><TD>

Title name for pr(1), instead of the filename.

</TD></TR><TR><TD>

-U user

</TD><TD>

Username to print on the burst page, also for accounting purposes. This option is only honored if the

real user ID is daemon (or that specified in the printcap file instead of daemon), and is intended for

those instances where print filters wish to requeue jobs.

</TD></TR><TR><TD>

-i numcols

</TD><TD>

The output is indented. If the next argument is numeric

numcols, it is used as the number of blanks to be printed before each line; otherwise, eight characters are printed.

</TD></TR><TR><TD>

-w Ns Ar num

</TD><TD>

Uses num as the page width for

pr(1).

</TD></TR></TABLE>



<P><B>ENVIRONMENT</B></P>



<P>If the following ENVIRONMENT variable exists, it is used by

lpr:

</P>



<P>PRINTER     Specifies an alternate default printer

</P>



<P><B>FILES</B></P>





<TABLE>



<TR><TD>

etc/passwd

</TD><TD>

Personal identification.

</TD></TR><TR><TD>

/etc/printcap

</TD><TD>

Printer capabilities database.

</TD></TR><TR><TD>

/usr/sbin/lpd*

</TD><TD>

Line printer daemons.

</TD></TR><TR><TD>

/var/spool/output/*

</TD><TD>

Directories used for spooling.

</TD></TR></TABLE>







<P><CENTER>

<a href="0296-0297.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0301-0302.html">Next</A></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->







</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -