IMD 1.17: 25/11/2014 15:01:47 Sn: 42359 (BATWINGS) MOTOROLA PHE:8503 (C) 1984 Motorola Inc. SYSTEM V/68 is a Trademark of Motorola Inc. M68000 SOFTWARE 82NNXBSV10 B* SYSTEM V68 OBJECT Release 1, Version 2.8 DISK 24 of 27 "on-line documentation"  ) 0420-;852/,)&#  T~>+~ 77 >+f>+f>+fA0>+f>+p>+pA0>+p>+p>+pA0>+p>+p>+pAP>+p>+>+A>+p>+>+o #&),/2>%8>+qft58;>ADGJMPS>%8>+sR>&8>+sI>& 8>+t~>&8>+t88>+t[88>+u78 8 >+u8 8 >+uU88>+v 88>+v!$88>+w'*-0369<8!8!>+xK?B8&8&>+xAE8'8'>+xH8,8,>+x`KNQTWZ8080>+y]`8283>+yocfilo8686>+zrux{~8:8:>+z8=8=>+z38A8A>+{o8C8C>+{78G8G>+{ 8I8I>+|*8L8L>+|8S8S>+| 8[8[>+}8a8a>+} 8h8h>+}8l8l>+~8o8o>+~8v8v>+~8y8y>+18z8z>+48~8~>+588>+j"88>+5%88>+(+88>+W.188>+L4788>+5:88>+`=@CFI88>+6L88>+7O88>+7R88>+UX[^a88>+ ^dgj88>+ nmps88>+ vy|88>+488>+k88>+ 88>+88>+88>+{88>+88>+ 88>+ E88>+88>+ 88>+Ah=*>+>+488>+i88>+288>+88>+E  88>+88>+ +88>+ 88>+!$88>+'88>+ *-088>+3688>+Z9<?BEHK88>+4N88>+5Q88>+5T88>+4W8 8 >+5Z8 8 >+5]88>+ "`cf88>+ kilo88>+ rux88>+4{88>+8~8!8!>+88$8$>+78&8&>+88)8)>+8-8->+88080>+U8282>+X8686>+/8<8<>+ O8>8>>+("8A8A>+%(8D8D>++.1478I8I>+ :=@8O8O>+CF8Q8Q>+ bILO8S8S>+RUX8X8X>+[^adgjm8[8[>+p8`8`>+svy|8d8d>+8f8f>+8h8i>+8m8m>+8o8o>+w8u8u>+8x8x>+28{8{>+8}8~>+ 88>+ 88>+788>+88>+B 88>+ A#&)88>+ ,/288>+ 58;88>+ ">ADGJMPSV88>+ Y\_b88>+Be88>+1k88>+nq88>+t88>+8wz88>+-}88>+88>+T88>+88>+_88>+88>+_88>+ t88>+ ]88>+A=ج>+>+988>+988>+88>+8 8 >+88>+88>+88>+488>+588>+88>+O88>+48 8 >+88"8">+58#8#>+58$8$>+58%8%>+58'8'>+48(8(>+48*8*>+78+8+>+98-8->+ 8.8.>+58080>+n8181>+.8383>+5 8585>+> 8686>+68888>+^8:8:>+78<8<>+78=8=>+8?8?>+"%8A8A>+;(+8B8B>+4.8D8D>+918E8E>+448G8G>+678H8H>+4:8J8J>+6=8L8L>+;@8M8M>+C8O8O>+4F8Q8Q>+7I8S8S>+L8U8U>+OR8W8W>+U8X8X>+ 48Z8Z>+;8\8\>+58^8^>+8`8`>+48b8b>+68d8d>+8f8f>+O8h8i>+B8j8k>+_8l8l>+48o8o>+68q8q>+68s8s>+68w8w>+88y8y>+68{8{>+88}8}>+888>+488>+688>+488>+88>+788>+588>+488>+888>+n inside a pipeline (e.g., with one or more of .IR cw (1), .IR eqn (1), and .IR tbl (1)), it may cause a harmless ``broken pipe'' diagnostic if the last page of the document is not specified in .IR list . .\" @(#)troff.1 1.6 ...usr  f\^ .BI yh f\^ \|\|] \c \- build a bar chart .br .RB "suppress " a "xes, " b "old, suppress " f\c .RB "rame, suppress " g "rid, " r "egion, " w\c .RB "idth in percent, " x " origin, suppress " x - a\c .RB "xis label, " y " origin, suppress " y - a\c .RB "xis label, " y "-axis " l "ower bound, " y\c .RB "-axis " h "igh bound" .TP 10 .B hist [\|\fB\-\c .BI "a b f g r" i\^\| x f\^ .BI "xa y" f\|\| "ya yl" f\^ .BI yh f\^ \|\|] \c \- build a histogram .br .RB "suppress " a "xes, " b "old, suppress " f\c .RB "rame, suppress " g "rid, " r "egion, " x\c .RB " origin, suppress " x - a\c .RB "xis label, " y " origin, suppress " y - a\c .RB "xis label, " y "-axis " l "ower bound, " y\c .RB "-axis " h "igh bound" .TP 10 .B label [\|\fB\-\c .BI "b c F" file\^ .B h p r\c .I i\^ .B x xu y yr\c \|\|] \c \- label the axis of a \s-1GPS\s+1 file .br .BR b "ar chart input, retain " c "ase, label " F "ile, " .BR h "istogram input, " p "lot input, " r "otation, " .BR x "-axis, " u "pper " x "-axis, " .BR y "-axis, " r "ight " y.TH TRUE 1 .SH NAME true, false \- provide truth values .SH SYNOPSIS .B true .PP .B false .SH DESCRIPTION .I True\^ does nothing, successfully. .I False\^ does nothing, unsuccessfully. They are typically used in input to .IR sh (1) such as: .PP .RS while true .br do .RS .I command .RE done .RE .SH SEE ALSO sh(1). .SH DIAGNOSTICS .I True\^ has exit status zero, .I false\^ nonzero. .\" @(#)true.1 1.2 ...man "-axis" .TP 10 .B pie [\|\fB\-\c .BI "b o p pn" "i " pp "i " r i\^ .BI "v x" "i " y i\^\c \|\|] \c \- build a pie chart .br .BR b "old, values " o "utside pie, value as " p "ercentage(:=100), value as" .BR p "ercentage(:=i), draw " p "ercent of " p ie, .BR r "egion, no " v "alues, " "x " origin, .BR "y " origin .br Unlike other nodes, input is lines of the form .RS 15 [\fB< i e f c\fIc \fB>\fR] value [label] .br .BR i "gnore (don't draw) slice, " e "xplode slice, " .BR f "ill slice, " c "olor slice .IR c =( .BR b "lack, " r "ed, " .BR g "reen, bl" u e) .RE .TP 10 .B plot [\|\fB\-\c .BI "a b c" string\|\| "d f F" file\|\| "g m r" i\^ .BI x f\|\| "xa xi" f\|\| xh f\^ .BI xl f\|\| xn i\| xt\^ .BI y f\|\| "ya yi" f\|\| yh f\^ .BI yl f\|\| yn i\| yt\^\c \|\|] \c \- plot a graph .br .RB "suppress " a "xes, " b "old, plotting " c\c .RB "haracters, " d "isconnected, suppress " f "rame, " F\c .RB "ile containing x vector, suppress " g\c .RB "rid, " m "ark points, " r "egion, " x\c .RB " origin, suppress " x\c .RB - a .TH TSORT 1 .SH NAME tsort \- topological sort .SH SYNOPSIS .B tsort [ file ] .SH DESCRIPTION .I Tsort\^ produces on the standard output a totally ordered list of items consistent with a partial ordering of items mentioned in the input .IR file . If no .I file\^ is specified, the standard input is understood. .PP The input consists of pairs of items (nonempty strings) separated by blanks. Pairs of different items indicate ordering. Pairs of identical items indicate presence, but not ordering. .SH "SEE ALSO" lorder(1). .SH DIAGNOSTICS .TP 15 .B "Odd data" There is an odd number of fields in the input file. .SH BUGS Uses a quadratic algorithm; not worth fixing for the typical use of ordering a library archive file. .\" @(#)tsort.1 1.4 ...u_man "xis label, " "x i" "nterval, " "x h\c"\c .RB "igh bound, " "x l" "ow bound, " n "umber of ticks on " x\c .RB "-axis, suppress " x "-axis " t \c .RB "itle, " y " origin, suppress " y\c .RB - a "xis label, " "y i" "nterval, " "y h\c"\c .RB "igh bound, " "y l" "ow bound, " n "umber of ticks on " y\c .RB "-axis, suppress " y "-axis " t itle .TP 10 .B title [\|\fB\-\c .BI "b c l" string\|\| v string\|\| u string\^ \|\|] \c \- title a vector or a \s-1GPS\s+1 .br .RB "title " b "old, retain " c "ase, " l\c .RB "ower title, " u "pper title, " v "ector title" .RE .PP .IR Generators : .RS 5n .TP 10 .B gas [\|\fB\-c\fIi \fBi\fIf \fBn\fIi \fBs\fIf \fBt\fIf\fR\|\|] \c \- generate additive sequence .br \fBi\fRnterval, \fBn\fRumber, \fBs\fRtart, \fBt\fRerminate .TP 10 .B prime [\|\fB-c\fIi \fBh\fIi \fBl\fIi \fBn\fIi\fR\|\|] \c \- generate prime numbers .br \fBh\fRigh, \fBl\fRow, \fBn\fRumber .TP 10 .B rand [\|\fB\-c\fIi \fBh\fIf\| \fBl\fIf\| \fBm\fIf\| \fBn\fIi \fBs\fIi\fR\|] \c \- generate random sequence .br \fBh\fRig.TH TTY 1 .SH NAME tty \- get the terminal's name .SH SYNOPSIS .B tty [ .B \-l ] [ .B \-s ] .SH DESCRIPTION .I Tty\^ prints the pathname of the user's terminal. The .B \-l option prints the synchronous line number to which the user's terminal is connected, if it is on an active synchronous line. The .B \-s option inhibits printing of the terminal's pathname, allowing one to test just the exit code. .SH EXIT CODES 2 if invalid options were specified, .br 0 if standard input is a terminal, .br 1 otherwise. .SH DIAGNOSTICS The message ``\f3not on an active synchronous line\f1'' means the standard input is not a synchronous terminal and the \fB\-l\fR option is specified. .sp The message ``\f3not a tty\f1'' means the standard input is not a terminal and the \fB\-s\fR option is not specified. .\" @(#)tty.1 1.5  ...man1Eman2man3h, \fBl\fRow, \fBm\fRultiplier, \fBn\fRumber, \fBs\fReed .RE .SH RESTRICTIONS Some nodes have a limit on the size of the input vector. .SH "SEE ALSO" graphics(1G), gps(4). .\" @(#)stat.1g 1.5 .\" @(#)u3b.1 1.2 .so /usr/man/u_man/man1/machid.1 ...sed.1sh.1 size.1 sleep.1 sno.1 sort.1 spell.1spellin.1spline.1gsplit.1stat.1gstrip.1stty.1su.1sum.1sync.1tabs.1tail.1tar.1tbl.1tc.1td.1gtee.1tekset.1gtest.1 time.1!timex.1"toc.1g#touch.1$tplot.1g%tr.1&troff.1'true.1(tsort.1)tty.1*u3b.1+u3b5.1,umask.1-uname.1.unget.1/uniq.10units.11unpack.12uucp.1c3uulog.1c4uuname.1c5uupick.1c6uustat.1c7uuto.1c8uux.1c9val.1:vax.1;vc.1wait.1?wc.1@what.1Awho.1Bwrite.1Cxargs.1Dyacc.1 .TH STRIP 1 .SH NAME strip \- strip symbol and line number information from an object file .SH SYNOPSIS .B strip .RB [ \-l ] .RB [ \-x ] .RB [ \-r ] .RB [ \-s ] .RB [ \-V ] filename(s) .SH DESCRIPTION The .I strip command strips the symbol table and line number information from object files, including archives. When \fIstrip\fP has been performed, no symbolic debugging access is available for that file; therefore, this command is normally run only on production modules that have been debugged and tested. .PP The amount of information stripped from the symbol table can be controlled by using the following options: .PP .TP 9 .BR \-l Strip line number information only; do not strip any symbol table information. .PP .TP 9 .B \-x Do not strip static or external symbol information. .PP .TP 9 .B \-r Reset the relocation indexes into the symbol table. .PP .TP 9 .B \-s Reset the line number indexes into the symbol table (do not remove). Reset the relocation indexes into the symbol table. .PP .TP 9 .B \-V Print the.\" @(#)u3b5.1 1.2 .so /usr/man/u_man/man1/machid.1 .TH SED 1 .SH NAME sed \- stream editor .SH SYNOPSIS .B sed [ .B \-n ] [ .B \-e script ] [ .B \-f sfile ] [ files ] .SH DESCRIPTION .I Sed\^ copies the named .I files\^ (standard input default) to the standard output, edited according to a script of commands. The .B \-f option causes the script to be taken from file .IR sfile ; these options accumulate. If there is just one .B \-e option and no .B \-f option, the flag .B \-e may be omitted. The .B \-n option suppresses the default output. A script consists of editing commands, one per line, of the following form: .sp .RS [ \|address \|[ \|, \|address \|] \|] \|function \|[ \|arguments \|] .RE .sp In normal operation, .I sed\^ cyclically copies a line of input into a .I pattern space\^ (unless there is something left after a .B D command), applies in sequence all commands whose .I addresses\^ select that pattern space, and at the end of the script copies the pattern space to the standard output (except under .BR \-n ) and deletes the pattern space. .PP Some of version of the \fIstrip\fP command executing on the standard error output. .DT .br .PP If there are any relocation entries in the object file and any symbol table information is to be stripped, .I strip complains and terminates without stripping .I filename unless the .B \-r flag is used. .PP If the .IR strip command is executed on a common archive file (see .IR ar (4)) the archive symbol table is removed. The archive symbol table must be restored by executing the .IR ar (1) command with the .B s option before the archive can be link edited by the .IR ld (1) command. .IR Strip (1) instructs the user with appropriate warning messages when this situation arises. .PP The purpose of this command is to reduce the file storage overhead taken by the object file. .SH "FILES" /usr/tmp/str?????? .SH "SEE ALSO" as(1), cc(1), ld(1), ar(4), a.out(4). .SH "DIAGNOSTICS" .PD 0 .TP 30 .B "strip: name: cannot open" .I name cannot be read. .PP .TP 30 .B "strip: name: bad magic" .I name is not an object file. .PP .TP .TH UMASK 1 .SH NAME umask \- set file-creation mode mask .SH SYNOPSIS .B umask [ ooo ] .SH DESCRIPTION The user file-creation mode mask is set to .IR ooo . The three octal digits refer to read/write/execute permissions for .IR owner , .IR group , and .IR others , respectively (see .IR chmod (2) and .IR umask (2)). The value of each specified digit is subtracted from the corresponding ``digit'' specified by the system for the creation of a file (see .IR creat (2)). For example, .B "umask 022" removes .I group\^ and .I others\^ write permission (files normally created with mode .B 777 become mode .BR 755 ; files created with mode .B 666 become mode .BR 644 ). .PP If .I ooo\^ is omitted, the current value of the mask is printed. .PP .I Umask\^ is recognized and executed by the shell. .SH SEE ALSO chmod(1), sh(1), chmod(2), creat(2), umask(2). .\" @(#)umask.1 1.2  the commands use a .I hold space\^ to save all or part of the .I pattern space\^ for subsequent retrieval. .PP An .I address\^ is either a decimal number that counts input lines cumulatively across files, a .B $ that addresses the last line of input, or a context address, i.e., a .BI / "regular expression" / in the style of .IR ed (1) modified thus: .PP .TP 5 \(bu In a context address, the construction \f3\e\fP\f2?regular expression?\^\fP, where .IR ? is any character, is identical to .BI / "regular expression" /\fR.\fP Note that in the context address .BR \exabc\exdefx , the second .B x stands for itself, so that the regular expression is .BR abcxdef . .TP 5 \(bu The escape sequence .B \en matches a new-line character .I embedded\^ in the pattern space. .TP 5 \(bu A period .B . matches any character except the .I terminal\^ new-line character of the pattern space. .TP 5 \(bu A command line with no addresses selects every pattern space. .TP 5 \(bu A command line with one address selects each pattern space th 30 .B "strip: name: relocation entries present; cannot strip" .I name contains relocation entries and the .B \-r flag was not used; therefore, the symbol table information cannot be stripped. '\" \%W\% .\" @(#)strip.1 1.7 .TH UNAME 1 .SH NAME uname \- print name of current \s-1UNIX\s+1 System .SH SYNOPSIS .B uname [ .B \-snrvma ] .SH DESCRIPTION .I Uname\^ prints the current system name of the \s-1UNIX\s+1 System on the standard output file. It is mainly useful to determine what system one is using. The options cause selected information returned by .IR uname (2) to be printed: .TP .B \-s print the system name (default). .TP .B \-n print the nodename (the nodename may be a name that the system is known by to a communications network). .TP .B \-r print the operating system release. .TP .B \-v print the operating system version. .TP .B \-m print the machine hardware name. .TP .B \-a print all the above information. .P Arguments not recognized default the command to the .B \-s option. .SH "SEE ALSO" uname(2). .\" @(#)uname.1 1.2  at matches the address. .TP 5 \(bu A command line with two addresses selects the inclusive range from the first pattern space that matches the first address through the next pattern space that matches the second. (If the second address is a number less than or equal to the line number first selected, only one line is selected.)\ Thereafter the process is repeated, looking again for the first address. .PP Editing commands can be applied only to non-selected pattern spaces by use of the negation function .B ! (below). .PP In the following list of functions the maximum number of permissible addresses for each function is indicated in parentheses. .PP The .I text\^ argument consists of one or more lines, all but the last of which end with .B \e to hide the new-line character. Backslashes in text are treated like backslashes in the replacement string of an .B s command, and may be used to protect initial blanks and tabs against the stripping that is done on every script line. The .I rfile\^ or .I wfile\^ argument.TH STTY 1 .SH NAME stty \- set the options for a terminal .SH SYNOPSIS .B stty [ .B \-a ] [ .B \-g ] [ options ] .SH DESCRIPTION .I Stty\^ sets certain terminal \s-1I/O\s+1 options for the device that is the current standard input; without arguments, it reports the settings of certain options; with the .B \-a option, it reports all of the option settings; with the .B \-g option, it reports current settings in a form that can be used as an argument to another .I stty\^ command. Detailed information about the modes listed in the first five groups below is provided in .IR termio (7). Options in the last group are implemented using options in the previous groups. Note that many combinations of options make no sense, but no sanity checking is performed. The options are selected from the following: .PD 1u .SS Control Modes .TP 10m .BR parenb " (" \-parenb ) enable (disable) parity generation and detection. .TP .BR parodd " (" \-parodd ) select odd (even) parity. .TP .B "cs5 cs6 cs7 cs8" select character size (see .TH UNGET 1 .SH NAME unget \- undo a previous get of an \s-1SCCS\s+1 file .SH SYNOPSIS .B unget .RB [ \-r \s-1SID\s+1] .RB [ \-s ] .RB [ \-n ] files .SH DESCRIPTION Unget undoes the effect of a .B "get \-e" done prior to creating the intended new delta. If a directory is named, .I unget\^ behaves as though each file in the directory were specified as a named file, except that non-\s-1SCCS\s+1 files and unreadable files are silently ignored. If a name of .B \- is given, the standard input is read with each line being taken as the name of an .SM SCCS file to be processed. .P Keyletter arguments apply independently to each named file. .RS 5 .TP 12 .BI \-r \s-1SID\s+1\^ Uniquely identifies which delta is no longer intended. (This would have been specified by .I get\^ as the ``new delta''). The use of this keyletter is necessary only if two or more outstanding .IR get s for editing on the same .SM SCCS file were done by the same person (login name). A diagnostic results if the specified .I \s-1SID\s+1\^ is ambiguo must terminate the command line and must be preceded by exactly one blank. Each .I wfile\^ is created before processing begins. There can be at most 10 distinct .I wfile\^ arguments. .PP .PD 0 .TP 10 (1)\|\f3a\e\fP .br .ns .TP .I text\^ Append. Place .I text\^ on the output before reading the next input line. .TP .RI (2)\|\f3b\fP " label\^" Branch to the .B : command bearing the .IR label . If .I label\^ is empty, branch to the end of the script. .br .ne 2.1v .TP (2)\|\f3c\e\fP .br .ns .TP .I text\^ Change. Delete the pattern space. With 0 or 1 address or at the end of a 2-address range, place .I text\^ on the output. Start the next cycle. .TP (2)\|\f3d\fP Delete the pattern space. Start the next cycle. .TP (2)\|\f3D\fP Delete the initial segment of the pattern space through the first new-line character. Start the next cycle. .TP (2)\|\f3g\fP Replace the contents of the pattern space by the contents of the hold space. .TP (2)\|\f3G\fP Append the contents of the hold space to the pattern space. .TP (2)\|\f3h\ .IR termio (7)). .TP .B 0 hang up phone line immediately. .TP .B "50 75 110 134 150 200 300 600 1200 1800 2400 4800 9600 exta extb" Set terminal baud rate to the number given, if possible. (All speeds are not supported by all hardware interfaces.) .TP .BR hupcl " (" \-hupcl ) hang up (do not hang up) a .SM DATA-PHONE\*S\*R data set connection on last close. .TP .BR hup " (" \-hup ) same as .BR hupcl " (" \-hupcl ). .TP .BR cstopb " (" \-cstopb ) use two (one) stop bits per character. .TP .BR cread " (" \-cread ) enable (disable) the receiver. .TP .BR clocal " (" \-clocal ) assume a line without (with) modem control. .PP .SS Input Modes .TP 10m .BR ignbrk " (" \-ignbrk ) ignore (do not ignore) break on input. .TP .BR brkint " (" \-brkint ) signal (do not signal) \s-1INTR\s+1 on break. .TP .BR ignpar " (" \-ignpar ) ignore (do not ignore) parity errors. .TP .BR parmrk " (" \-parmrk ) mark (do not mark) parity errors (see .IR termio (7)). .TP .BR inpck " (" \-inpck ) enable (disable) input parity checking. .TP .us, or if it is necessary and omitted on the command line. .TP 12 .B \-s Suppresses the printout, on the standard output, of the intended delta's .IR \s-1SID\s+1 . .TP 12 .B \-n Causes the retention of the gotten file which would normally be removed from the current directory. .SH "SEE ALSO" delta(1), get(1), sact(1). .SH DIAGNOSTICS Use .IR help (1) for explanations. .\" @(#)unget.1 1.2 fP Replace the contents of the hold space by the contents of the pattern space. .TP (2)\|\f3H\fP Append the contents of the pattern space to the hold space. .TP (1)\|\f3i\e\fP .br .ns .TP .I text\^ Insert. Place .I text\^ on the standard output. .TP (2)\|\f3l\fP List the pattern space on the standard output in an unambiguous form. Non-printing characters are spelled in two-digit .SM ASCII and long lines are folded. .TP (2)\|\f3n\fP Copy the pattern space to the standard output. Replace the pattern space with the next line of input. .TP (2)\|\f3N\fP Append the next line of input to the pattern space with an embedded new-line character. (The current line number changes.) .TP (2)\|\f3p\fP Print. Copy the pattern space to the standard output. .TP (2)\|\f3P\fP Copy the initial segment of the pattern space through the first new-line character to the standard output. .TP (1)\|\f3q\fP Quit. Branch to the end of the script. Do not start a new cycle. .TP .RI (2)\|\f3r\fP " rfile\^" Read the contents of .IR rfile . PlacBR istrip " (" \-istrip ) strip (do not strip) input characters to seven bits. .TP .BR inlcr " (" \-inlcr ) map (do not map) \s-1NL\s+1 to \s-1CR\s+1 on input. .TP .BR igncr " (" \-igncr ) ignore (do not ignore) \s-1CR\s+1 on input. .TP .BR icrnl " (" \-icrnl ) map (do not map) \s-1CR\s+1 to \s-1NL\s+1 on input. .TP .BR iuclc " (" \-iuclc ) map (do not map) uppercase alphabetics to lowercase on input. .TP .BR ixon " (" \-ixon ) enable (disable) \s-1START\s+1/\s-1STOP\s+1 output control. Output is stopped by sending an \s-1ASCII DC3\s+1 and started by sending an \s-1ASCII DC1\s+1. .TP .BR ixany " (" \-ixany ) allow any character (only \s-1DC1\s+1) to restart output. .TP .BR ixoff " (" \-ixoff ) request that the system send (not send) \s-1START/STOP\s+1 characters when the input queue is nearly empty/full. .PP .SS Output Modes .TP 10m .BR opost " (" \-opost ) post-process output (do not post-process output; ignore all other output modes). .TP .BR olcuc " (" \-olcuc ) map (do not map) lowercase alphabetics to u .TH UNIQ 1 .SH NAME uniq \- report repeated lines in a file .SH SYNOPSIS .B uniq [ .B \-udc [ .BR + n ] [ .BR \- n ] ] [ input [ output ] ] .SH DESCRIPTION .I Uniq\^ reads the input file and compares adjacent lines. In the normal case, the second and succeeding copies of repeated lines are removed; the remainder is written on the output file. .IR Input " and " output should always be different. Note that repeated lines must be adjacent in order to be found; see .IR sort (1). If the .B \-u flag is used, just the lines that are not repeated in the original file are output. The .B \-d option specifies that one copy of just the repeated lines is to be written. The normal mode output is the union of the .B \-u and .B \-d mode outputs. .PP The .B \-c option supersedes .B \-u and .B \-d and generates an output report in default style but with each line preceded by a count of the number of times it occurred. .PP The .I n\^ arguments specify skipping an initial portion of each line in the comparison: .TP 8 .BI \- n\e them on the output before reading the next input line. .TP .RI (2)\|\f3s\fP/ "regular expression" / replacement / flags\^ Substitute the .I replacement\^ string for instances of the .I regular expression\^ in the pattern space. Any character may be used instead of .BR / . For a fuller description see .IR ed (1). .I Flags\^ is zero or more of: .RS .RS .TP .B g Global. Substitute for all nonoverlapping instances of the .I regular expression\^ rather than just the first one. .TP .B p Print the pattern space if a replacement was made. .TP .BI w " wfile\^" Write. Append the pattern space to .I wfile\^ if a replacement was made. .RE .RE .TP .RI (2)\|\f3t\fP " label\^" Test. Branch to the .B : command bearing the .I label\^ if any substitutions have been made since the most recent reading of an input line or execution of a .BR t . If .I label\^ is empty, branch to the end of the script. .TP .RI (2)\|\f3w\fP " wfile\^" Write. Append the pattern space to .IR wfile . .TP (2)\|\f3x\fP Exchange the contents of the pattppercase on output. .TP .BR onlcr " (" \-onlcr ) map (do not map) \s-1NL\s+1 to \s-1CR-NL\s+1 on output. .TP .BR ocrnl " (" \-ocrnl ) map (do not map) \s-1CR\s+1 to \s-1NL\s+1 on output. .TP .BR onocr " (" \-onocr ) do not (do) output \s-1CR\s+1s at column zero. .TP .BR onlret " (" \-onlret ) on the terminal \s-1NL\s+1 performs (does not perform) the \s-1CR\s+1 function. .TP .BR ofill " (" \-ofill ) use fill characters (use timing) for delays. .TP .BR ofdel " (" \-ofdel ) fill characters are \s-1DEL\s+1s (\s-1NUL\s+1s). .TP .B "cr0 cr1 cr2 cr3" select style of delay for carriage returns (see .IR termio (7)). .TP .B "nl0 nl1" select style of delay for line feeds (see .IR termio (7)). .TP .B "tab0 tab1 tab2 tab3" select style of delay for horizontal tabs (see .IR termio (7)). .TP .B "bs0 bs1" select style of delay for backspaces (see .IR termio (7)). .TP .B "ff0 ff1" select style of delay for form feeds (see .IR termio (7)). .TP .B "vt0 vt1" select style of delay for vertical tabs (see .IR termio (7)). .PP .SS ^ The first .IR n fields, together with any blanks before each, are ignored. A field is defined as a string of non-space, non-tab characters separated by tabs and spaces from its neighbors. .TP 8 .BI + n\^ The first .IR n characters are ignored. Fields are skipped before characters. .PP .SH "SEE ALSO" comm(1), sort(1). .\" @(#)uniq.1 1.3  ern and hold spaces. .TP .RI (2)\|\f3y\fP/ string1 / string2 /\^ Transform. Replace all occurrences of characters in .I string1\^ with the corresponding character in .IR string2 . The lengths of .I string1 and .I string2\^ must be equal. .TP .RI (2)\f3!\fP " function\^" Don't. Apply the .I function\^ (or group, if .I function\^ is .BR {\| ) only to lines .I not\^ selected by the address(es). .TP .RI (0)\|\f3:\fP " label\^" This command does nothing; it bears a .I label\^ for .B b and .B t commands to branch to. .TP (1)\|\f3=\fP Place the current line number on the standard output as a line. .TP (2)\|\f3{\fP Execute the following commands through a matching .B } only when the pattern space is selected. .TP (0)\| An empty command is ignored. .PD .SH SEE ALSO awk(1), ed(1), grep(1). .br ``Stream Editor'' in the .IR "\*(6) Document Processing Guide" . .\" @(#)sed.1 1.7 Local Modes .TP 10m .BR isig " (" \-isig ) enable (disable) the checking of characters against the special control characters \s-1INTR\s+1 and \s-1QUIT\s+1. .TP .BR icanon " (" \-icanon ) enable (disable) canonical input (\s-1ERASE\s+1 and \s-1KILL\s+1 processing). .TP .BR xcase " (" \-xcase ) canonical (unprocessed) upper/lowercase presentation. .TP .BR echo " (" \-echo ) echo back (do not echo back) every character typed. .TP .BR echoe " (" \-echoe ) echo (do not echo) \s-1ERASE\s+1 character as a backspace-space-backspace string. Note: this mode will erase the \s-1ERASE\s+1ed character on many \s-1CRT\s+1 terminals; however, it does .I not\^ keep track of column position and, as a result, may be confusing on escaped characters, tabs, and backspaces. .TP .BR echok " (" \-echok ) echo (do not echo) \s-1NL\s+1 after \s-1KILL\s+1 character. .TP .BR lfkc " (" \-lfkc ) the same as .BR echok " (" \-echok ); obsolete. .TP .BR echonl " (" \-echonl ) echo (do not echo) \s-1NL\s+1. .TP .BR noflsh " (" \-noflsh ) dis.tr ~ .TH UNITS 1 .SH NAME units \- conversion program .SH SYNOPSIS .B units .SH DESCRIPTION .I Units\^ converts quantities expressed in various standard scales to their equivalents in other scales. It works interactively in this fashion: .PP .nf .RS .RB "You have:~~" inch .RB "You want:~~" cm .RS +8 \(** 2.540000e+00 \(sl 3.937008e\-01 .RE .fi .RE .PP A quantity is specified as a multiplicative combination of units optionally preceded by a numeric multiplier. Powers are indicated by suffixed positive integers, division by the usual sign: .PP .nf .RS .RB "You have:~~" "15 lbs force/in2" .RB "You want:~~" atm .RS +8 \(** 1.020689e+00 \(sl 9.797299e\-01 .RE .fi .RE .PP .I Units\^ only does multiplicative scale changes; thus it can convert Kelvin to Rankine, but not Celsius to Fahrenheit. Most familiar units, abbreviations, and metric prefixes are recognized, together with some less familiar units, and a few constants of nature, including: .RS .PD 0 .TP "\w'water~~~~'u" .B pi ratio of circumference to diameter ..if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@ .if n .ds ' ' .if t .ds ` \h@.05m@\s+4\v@.333m@\`\v@-.333m@\s-4\h@.05m@ .if n .ds ` ` .ds OK [\| .ds CK \|] .TH SH 1 .SH NAME sh, rsh \- shell, the standard/restricted command programming language .SH SYNOPSIS .B sh [ .B \-ceiknrstuvx ] [ args ] .br .B rsh [ .B \-ceiknrstuvx ] [ args ] .SH DESCRIPTION .I Sh\^ is a command programming language that executes commands read from a terminal or a file. .I Rsh\^ is a restricted version of the standard command interpreter .IR sh ; it is used to set up login names and execution environments whose capabilities are more controlled than those of the standard shell. See .I Invocation\^ below for the meaning of arguments to the shell. .SS Commands. A .I simple-command\^ is a sequence of non-blank .I words\^ separated by .I blanks\^ (a .I blank\^ is a tab or a space). The first word specifies the name of the command to be executed. Except as specified below, the remaining words are passed as arguments to the invoked  able (enable) flush after \s-1INTR\s+1 or \s-1QUIT\s+1. .TP .BR stwrap " (" \-stwrap ) disable (enable) truncation of lines longer than 79 characters on a synchronous line. .TP .BR stflush " (" \-stflush ) enable (disable) flush on a synchronous line after every .IR write (2). .TP .BR stappl " (" \-stappl ) use application mode (use line mode) on a synchronous line. .PP .SS Control Assignments .TP 10m .I "control-character c\^" set .I control-character\^ to .IR c , where .I control-character\^ is .BR erase ", " kill ", " intr , .BR quit ", " eof ", " eol , .BR " min ", or " time .RB ( min " and " time are used with .BR \-icanon "; see" .IR termio (7)). If .I c\^ is preceded by an (escaped from the shell) caret .RB ( ^ ), then the value used is the corresponding \s-1CTRL\s+1 character (e.g., .RB `` ^d '' is a .BR \s-1CTRL\s+1-d ); .RB `` ^? '' is interpreted as \s-1DEL\s+1 and .RB `` ^\- '' is interpreted as undefined. .TP .BI line " i\^" set line discipline to .I i\^ (0 < .I i\^ < 127 .. .SS Combination ModesTP .B c speed of light .TP .B e charge on an electron .TP .B g acceleration of gravity .TP .B force same as .B g .TP .B mole Avogadro's number .TP .B water pressure head per unit height of water .TP .B au astronomical unit .PD .RE .PP .B Pound is not recognized as a unit of mass; .B lb is. Compound names are run together, (e.g., .BR lightyear ). British units that differ from their \s-1U\s+1\&.\s-1S\s+1\&. counterparts are prefixed thus: .BR brgallon . For a complete list of units, type: .PP .RS \f3cat /usr/lib/unittab\f1 .RE .SH FILES /usr/lib/unittab .tr ~~ .\" @(#)units.1 1.4 command. The command name is passed as argument 0 (see .IR exec (2)). The .I value\^ of a simple-command is its exit status if it terminates normally, or (octal) 200+\f2status\^\fP if it terminates abnormally (see .IR signal (2) for a list of status values). .PP A .I pipeline\^ is a sequence of one or more .I commands\^ separated by .B \(bv (or, for historical compatibility, by ^). The standard output of each command except the last one is connected by a .IR pipe (2) to the standard input of the next command. Each command is run as a separate process; the shell waits for the last command to terminate. .PP A .I list\^ is a sequence of one or more pipelines separated by .BR ; , .BR & , .BR && , or .BR \(bv\|\(bv , and optionally terminated by .B ; or .BR & . Of these four symbols, .B ; and .B & have equal precedence, which is lower than that of .B && and .BR \(bv\|\(bv . The symbols .B && and .B \(bv\|\(bv also have equal precedence. A semicolon .RB ( ; ) causes sequential execution of the preceding pipeline; a .TP 10m .BR evenp " or " parity enable .BR parenb " and " cs7 . .TP .B oddp enable .BR parenb ", " cs7 ", and " parodd . .TP .BR \-parity ", " \-evenp ", or " \-oddp disable .BR parenb , and set .BR cs8 . .TP .BR raw " (" \-raw " or " cooked ) enable (disable) raw input and output (no \s-1ERASE\s+1, \s-1KILL\s+1, \s-1INTR\s+1, \s-1QUIT\s+1, \s-1EOT\s+1, or output post processing). .TP .BR nl " (" \-nl ) unset (set) .BR icrnl ", " onlcr . In addition .B \-nl unsets .BR inlcr ", " igncr ", " .BR ocrnl ", and " onlret . .TP .BR lcase " (" \-lcase ) set (unset) .BR xcase ", " iuclc ", and " olcuc . .TP .BR \s-1LCASE\s+1 " (" \-\s-1LCASE\s+1 ) same as .BR lcase " (" \-lcase ). .TP .BR tabs " (" \-tabs " or " tab3 ) preserve (expand to spaces) tabs when printing. .TP .B ek reset \s-1ERASE\s+1 and \s-1KILL\s+1 characters back to normal .B # and .BR @ . .TP .B sane resets all modes to some reasonable values. .TP .I term\^ set all modes suitable for the terminal type .IR term , where .I term\^ is one of .BR tty33 ",  .\" @(#)unpack.1 1.2 .so /usr/man/u_man/man1/pack.1 n ampersand .RB ( & ) causes asynchronous execution of the preceding pipeline (i.e., the shell does .I not\^ wait for that pipeline to finish). The symbol .B && .RB (\| \(bv\|\(bv \^) causes the .I list\^ following it to be executed only if the preceding pipeline returns a zero (non-zero) exit status. An arbitrary number of new-line characters may appear in a .IR list , instead of semicolons, to delimit commands. .PP A .I command\^ is either a simple-command or one of the following. Unless otherwise stated, the value returned by a command is that of the last simple-command executed in the command. .PP .PD 0 .TP \f3for\fP \f2name\^\fP \*(OK \f3in\fP \f2word\^\fP .\|.\|. \*(CK \f3do\fP \f2list\^\fP \f3done\fP Each time a .B for command is executed, .I name\^ is set to the next .I word\^ taken from the .B in .I word\^ list. If .BI in " word\^" \&.\|.\|. is omitted, then the .B for command executes the \f3do\fP \f2list\^\fP once for each positional parameter that is set (see .I "Parameter Substitution\^" below). " tty37 ", " vt05 ", " .BR tn300 ", " ti700 ", or " tek . .SH "SEE ALSO" tabs(1), ioctl(2). .br termio(7) in the .IR "\*(5) Adminstrator's Manual" . .\" @(#)stty.1 1.5 .\"@(#)uucp.1c 5.2 .TH UUCP 1C .SH NAME uucp, uulog, uuname \- unix to unix copy .SH SYNOPSIS .B uucp [ options ] source-files destination-file .PP .B uulog [ options ] .PP .B uuname [ .B \-l ] .SH DESCRIPTION .SS Uucp. .I Uucp\^ copies files named by the .I source-file\^ arguments to the .I destination-file\^ argument. A filename may be a pathname on your machine, or may have the form: .PP .RS .5i \f2system-name\f3!\f2pathname\f1 .RE .PP where .I system-name\^ is taken from a list of system names which .I uucp\^ knows about. The .I system-name\^ may also be a list of names such as .PP .RS .5i \f2system-name\f3!\f2system-name\f3!...!\f2system-name\f3!\f2pathname\f1 .RE .PP in which case an attempt is made to send the file via the specified route, and only to a destination in \s-1PUBDIR\s+1 (see below). Care should be taken to insure that intermediate nodes in the route are willing to foward information. .PP The shell metacharacters .BR ? , .B \(** and .B [\|.\|.\|.\|] appearing in .I pathname\^ are expanded o Execution ends when there are no more words in the list. .TP \f3case\fP \f2word\^\fP \f3in\fP \*(OK \f2pattern\^\fP \*(OK \(bv \ \f2pattern\^\fP \*(CK .\|.\|. \f3)\fP \f2list\^\fP \f3;;\fP \*(CK .\|.\|. \f3esac\fP A .B case command executes the .I list\^ associated with the first .I pattern\^ that matches .IR word . The form of the patterns is the same as that used for filename generation (see .I "Filename Generation\^" below). .TP \f3if\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(OK \ \f3elif\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(CK .\|.\|. \ \*(OK \f3else\fP \f2list\^\fP \*(CK \f3f\&i\fP The .I list\^ following \f3if\fP is executed and, if it returns a zero exit status, the .I list\^ following the first .B then is executed. Otherwise, the .I list\^ following \f3elif\fP is executed and, if its value is zero, the .I list\^ following the next .B then is executed. Failing that, the .B else .I list\^ is executed. If no .B else .I list\^ or .B then .I list\^ is executed, then the .B if command returns a zero.TH SU 1 .SH NAME su \- become superuser or another user .SH SYNOPSIS .B su [ .B \- ] [ name [ arg .\|.\|. ] ] .SH DESCRIPTION .I Su\^ allows one to become another user without logging off. The default user .I name\^ is .B root (i.e., superuser). .PP To use .IR su , the appropriate password must be supplied (unless one is already superuser). If the password is correct, .I su\^ executes a new shell with the user \s-1ID\s0 set to that of the specified user. To restore normal user \s-1ID\s0 privileges, type an .SM .B EOF to the new shell. .PP Any additional arguments are passed to the shell, permitting the superuser to run shell procedures with restricted privileges (an .I arg\^ of the form .B \-c .I string\^ executes .I string\^ via the shell). When additional arguments are passed, .B /bin/sh is always used. When no additional arguments are passed, .I su\^ uses the shell specified in the password file. .PP An initial .B \- flag causes the environment to be changed to the one that would be expected if the user an the appropriate system. .PP Pathnames may be: .PP .RS .TP \(bu A full pathname .TP \(bu A pathname preceded by .BI ~ user\^ where .I user\^ is a login name on the specified system and is replaced by that user's login directory .TP \(bu A pathname preceded by .BI ~/ user\^ where .I user\^ is a login name on the specified system and is replaced by that user's directory under \s-1PUBDIR\s+1 .RE Anything else is prefixed by the current directory. .PP If the result is an erroneous pathname for the remote system, the copy fails. If the .I destination-file\^ is a directory, the last part of the .I source-file\^ name is used. .ig If a simple .I ~user\^ destination is inaccessible to .IR uucp , data is copied to a spool directory and the user is notified by .IR mail (1). .. .PP .I Uucp\^ preserves execute permissions across the transmission and gives 0666 read and write permissions (see .IR chmod (2)). .PP The following options are interpreted by .IR uucp : .TP 15 .B \-d Make all necessary directories for the file  exit status. .TP \f3while\fP \f2list\^\fP \f3do\fP \f2list\^\fP \f3done\fP A .B while command repeatedly executes the .B while .I list\^ and, if the exit status of the last command in the list is zero, executes the .B do .IR list ; otherwise the loop terminates. If no commands in the .B do .I list\^ are executed, then the .B while command returns a zero exit status; .B until may be used in place of .B while to negate the loop termination test. .TP \f3(\fP\f2list\^\fP\f3)\fP .br Execute .I list\^ in a sub-shell. .TP \f3{\fP\f2list\^\fP\f3;}\fP .br .I list\^ is simply executed. .PD .PP The following words are only recognized as the first word of a command and when not quoted: .if t .RS .PP .B .if n if then else elif fi case esac for while until do done { } .if t if then else elif f\&i case esac for while until do done { } .if t .RE .SS Comments. A word beginning with .B # causes that word and all the following characters up to a new line to be ignored. .SS Command Substitution. The standard output ctually logged in again. This is done by invoking the shell with an .I arg0\^ of .BR "\-su" , causing the .B .profile in the home directory of the new user \s-1ID\s0 to be executed. Otherwise, the environment is passed along with the possible exception of .SM .BR $PATH \*S, which is set to .B /bin:/etc:/usr/bin for root. Note that the .B .profile can check .I arg0\^ for .B \-sh or .B \-su to determine how it was invoked. .SH FILES /etc/passwd system password file .br .SM .RB $HOME\*S/ . "profile user's profile" .SH SEE ALSO env(1), login(1), sh(1), environ(5). .\" @(#)su.1 1.3 copy (default). .TP 15 .B \-f Do not make intermediate directories for the file copy. .TP 15 .B \-c Use the source file when copying out rather than copying the file to the spool directory (default). .TP 15 .B \-C Copy the source file to the spool directory. .TP 15 .BI \-m file\^ Report status of the transfer in .I file.\^ If .I file is omitted, send mail to the requester when the copy is completed. .TP 15 .BI \-n user\^ Notify .I user\^ on the remote system that a file was sent. .TP 15 .BI \-e sys\^ Send the .I uucp\^ command to system .I sys\^ to be executed there. (Note: this is only successful if the remote machine allows the .I uucp\^ command to be executed by .BR /usr/lib/uucp/uuxqt .) .PP .I Uucp\^ returns on the standard output a string which is the job number of the request. This job number can be used by .I uustat\^ to obtain status or terminate the job. .SS Uulog. .PP .I Uulog\^ queries a summary log of .I uucp\^ and .IR uux (1C) transactions in the file .B /usr/spool/uucp/\s-1LOGFILE.\s0 .ne 3 .P from a command enclosed in a pair of grave accents (\^\f3\*`\^\*`\fP\^) may be used as part or all of a word; trailing new lines are removed. .SS Parameter Substitution. The character .B $ is used to introduce substitutable .IR parameters . Positional parameters may be assigned values by .BR set . Variables may be set by writing: .RS .PP .IB name = value\^ \*(OK .IB name = value\^ \*(CK .\|.\|. .RE .PP Pattern-matching is not performed on .IR value . .PP .PD 0 .TP \f3${\fP\f2parameter\^\fP\f3}\fP A .I parameter\^ is a sequence of letters, digits, or underscores (a .IR name ), a digit, or any of the characters .BR \(** , .BR @ , .BR # , .BR ? , .BR \- , .BR $ , and .BR !\\^ . The value, if any, of the parameter is substituted. The braces are required only when .I parameter\^ is followed by a letter, digit, or underscore that is not to be interpreted as part of its name. A .I name\^ must begin with a letter or underscore. If .I parameter\^ is a digit then it is a positional parameter. If .I parameter\^ is .B \.TH SUM 1 .SH NAME sum \- print checksum and block count of a file .SH SYNOPSIS .B sum [ .B \-r ] file .SH DESCRIPTION .I Sum\^ calculates and prints a 16-bit checksum for the named file, and prints the number of blocks in the file. It is typically used to look for bad spots or to validate a file communicated over a transmission line. The option .B \\-r causes an alternate algorithm to be used in computing the checksum. .SH "SEE ALSO" wc(1). .SH DIAGNOSTICS .BR "Read error" is indistinguishable from end of file on most devices; check the block count. .\" @(#)sum.1 1.4   P The options cause .I uulog to print logging information: .TP 15 .BI \-s sys\^ Print information about work involving system .IR sys . .TP 15 .BI \-u user\^ Print information about work done for the specified .IR user . .SS Uuname. .PP .I Uuname\^ lists the uucp names of known systems. The .B \-l option returns the local system name. .SH FILES .PD 0 .TP \w'/usr/spool/uucppublic\ \ 'u /usr/spool/uucp spool directory .TP /usr/spool/uucppublic public directory for receiving and sending (\s-1PUBDIR\s0) .TP /usr/lib/uucp/\(** other data and program files .PD .SH SEE ALSO mail(1), uux(1C). .SH WARNING The domain of remotely accessible files can (and for obvious security reasons, usually should) be severely restricted. You are probably not able to fetch files by pathname; ask a responsible person on the remote system to send them to you. For the same reasons you are probably not able to send files to arbitrary pathnames. As distributed, the remotely accessible files are those whose names begin .B /usr/spool/uucppu(** or .BR @ , then all the positional parameters, starting with .BR $1 , are substituted (separated by spaces). Parameter .B $0 is set from argument zero when the shell is invoked. .TP \f3${\fP\f2parameter\^\fP\f3:\-\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise substitute .IR word . .TP \f3${\fP\f2parameter\^\fP\f3:=\fP\f2word\^\fP\f3}\fP If .I parameter\^ is not set or is null, set it to .IR word ; the value of the parameter is then substituted. Positional parameters may not be assigned in this way. .TP \f3${\fP\f2parameter\^\fP\f3:?\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise, print .I word\^ and exit from the shell. If .I word\^ is omitted, the message .B "parameter null or not set" is printed. .TP \f3${\fP\f2parameter\^\fP\f3:+\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute .IR word ; otherwise substitute nothing. .PD .PP In the above structures, .I word\^ is not evaluated u.TH SYNC 1 .SH NAME sync \- update the super block .SH SYNOPSIS .B sync .SH DESCRIPTION .I Sync\^ executes the .I sync\^ system primitive. If the system is to be stopped, .I sync\^ must be called to insure file system integrity. It flushes all previously unwritten system buffers out to disk, thus assuring that all file modifications up to that point are saved. See .IR sync (2) for details. .SH SEE ALSO sync(2). .\" @(#)sync.1 1.3 blic (equivalent to .B ~nuucp or just .BR ~ ). .SH BUGS All files received by .I uucp\^ are then owned by .IR uucp . .br The \fB\-m\fP option only works for sending files or receiving a single file. Receiving multiple files specified by special shell characters \fB? \(** \|[\|.\|.\|.\|]\fP does not activate the \fB\-m\fP option. .\" @(#)uucp.1c 1.4   nless it is to be used as the substituted string; in the following example, .B pwd is executed only if .B d is not set or is null: .RS .PP \f3echo \|${d:\-\^\*`\^pwd\^\*`\^}\f1 .RE .PP If the colon .RB ( : ) is omitted from the above expressions, then the shell only checks whether .I parameter\^ is set or not. .PP The following parameters are automatically set by the shell: .RS .PD 0 .TP .B # The number of positional parameters in decimal. .TP .B \- Flags supplied to the shell on invocation or by the .B set command. .TP .B ? The decimal value returned by the last synchronously executed command. .TP .B $ The process number of this shell. .TP .B ! The process number of the last background command invoked. .PD .RE .PP The following parameters are used by the shell: .RS .PD 0 .TP .B .SM HOME The default argument (home directory) for the .I cd\^ command. .TP .B .SM PATH The search path for commands (see .I Execution\^ below). The user may not change .B \s-1PATH\s+1 if executing under .IR rsh . .TP .B .SM CDPATH T.TH TABS 1 .SH NAME tabs \- set tabs on a terminal .SH SYNOPSIS .B tabs [ tabspec ] [ .BR +m n ] [ .BR \-T type ] .SH DESCRIPTION .I Tabs\^ sets the tab stops on the user's terminal according to the tab specification .IR tabspec , after clearing any previous settings. The user must of course be logged in on a terminal with remotely-settable hardware tabs. .PP Users of .SM GE TermiNet terminals should be aware that these terminals behave in a different way than most other terminals for some tab settings: the first number in a list of tab settings becomes the left margin on a TermiNet terminal. Thus, any list of tab numbers whose first element is other than 1 causes a margin to be left on a TermiNet, but not on other terminals. A tab list beginning with 1 causes the same effect regardless of terminal type. It is possible to set a left margin on some other terminals, although in a different way (see below). .PP Four types of tab specification are accepted for .IR tabspec : ``canned,'' repetitive, arbitrary, and .\" @(#)uulog.1c 1.2 .so /usr/man/u_man/man1/uucp.1c he search path for the .I cd command. .TP .B .SM MAIL If this variable is set to the name of a mail file, then the shell informs the user of the arrival of mail in the specified file. .TP .SM .B PS1 Primary prompt string, by default .RB `` "$ \|" ''. .TP .SM .B PS2 Secondary prompt string, by default .RB `` "> \|" ''. .TP .SM .B IFS Internal field separators, normally .BR space , .BR tab , and .BR "new line" . .PD .RE .PP The shell gives default values to \f3\s-1PATH\s+1\fP, \f3\s-1PS1\s+1\fP, \f3\s-1PS2\s+1\fP, and \f3\s-1IFS\s+1\fP, while .SM .B HOME and .SM .B MAIL are not set at all by the shell (although .SM .B HOME is set by .IR login (1)). .SS Blank Interpretation. After parameter and command substitution, the results of substitution are scanned for internal field separator characters (those found in .BR \s-1IFS\s+1 ) and split into distinct arguments where such characters are found. Explicit null arguments (\^\f3"\^"\fP or \f3\*'\^\*'\fP\^) are retained. Implicit null arguments (those resulting from .  file. If no .I tabspec\^ is given, the default value is .BR \-8 , i.e., ``standard'' \*(5) tabs. The lowest column number is 1. Note that for .IR tabs , column 1 always refers to the leftmost column on a terminal, even if the column markers begin at 0, as on the \s-1DASI\s+1 300, \s-1DASI\s+1 300s, and \s-1DASI\s+1 450. .PP .PD 0 .TP 8 .BI \- code\^ Gives the name of one of a set of ``canned'' tabs. The legal codes and their meanings are as follows: .PP .TP .B \-a 1,10,16,36,72 .br Assembler, \s-1IBM\s+1 S/370, first format .PP .TP .B \-a2 1,10,16,40,72 .br Assembler, \s-1IBM\s+1 S/370, second format .PP .TP .B \-c 1,8,12,16,20,55 .br \s-1COBOL\s+1, normal format .PP .TP .B \-c2 1,6,10,14,49 .br \s-1COBOL\s+1 compact format (columns 1-6 omitted). Using this code, the first typed character corresponds to card column 7, one space gets you to column 8, and a tab reaches column 12. Files using this tab setup should include a format specification as follows: .PP .RS .RS .B "<:t\-c2 \|m6 \|s66 \|d:>" .RE .RE .PP .T.\" @(#)uuname.1c 1.2 .so /usr/man/u_man/man1/uucp.1c I parameters\^ that have no values) are removed. .SS Filename Generation. Following substitution, each command .I word\^ is scanned for the characters .BR \(** , .BR ? , and .BR \*(OK . If one of these characters appears then the word is regarded as a .IR pattern . The word is replaced with alphabetically sorted filenames that match the pattern. If no filename is found that matches the pattern, then the word is left unchanged. The character .B . at the start of a filename or immediately following a .BR / , as well as the character .B / itself, must be matched explicitly. .PP .PD 0 .RS .TP .B \(** Matches any string, including the null string. .TP .B ? Matches any single character. .TP .BR \*(OK .\|.\|.\^ \*(CK Matches any one of the enclosed characters. A pair of characters separated by .B \- matches any character lexically between the pair, inclusive. If the first character following the opening \`\`\*(OK\'\' is a .B "``!''" then any character not enclosed is matched. .PD .RE .SS Quoting. The following charP .B \-c3 1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67 .br \s-1COBOL\s+1 compact format (columns 1-6 omitted), with more tabs than .B \-c2. This is the recommended format for \s-1COBOL\s+1. The appropriate format specification is: .RS .RS .B "<:t\-c3 \|m6 \|s66 \|d:>" .RE .RE .PP .TP .B \-f 1,7,11,15,19,23 .br \s-1FORTRAN\s+1 .PP .TP .B \-p 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 .br \s-1PL/I\s+1 .PP .TP .B \-s 1,10,55 .br \s-1SNOBOL\s+1 .PP .TP .B \-u 1,12,20,44 .br \s-1UNIVAC\s+1 1100 Assembler .PD .PP In addition to these ``canned'' formats, three other types exist: .PP .PD 0 .TP 8 .BI \- n\^ A repetitive specification requests tabs at columns .RI 1+ n , .RI 1+2\(** n , etc. Note that such a setting leaves a left margin of .I n\^ columns on TermiNet terminals .IR only . Of particular importance is the value .BR \-8 : this represents the ``standard'' tab setting, and is the most likely tab setting to be found at a terminal. It is required for use with the .I nroff .B \-h option for high-speed outpu  .\" @(#)uupick.1c 1.2 .so /usr/man/u_man/man1/uuto.1c VY\_behknqtwz}t. Another special case is the value .BR \-0 , implying no tabs at all. .TP .IR n1 , n2 ,... The arbitrary format permits the user to type any chosen set of numbers, separated by commas, in ascending order. Up to 40 numbers are allowed. If any number (except the first one) is preceded by a plus sign, it is taken as an increment to be added to the previous value. Thus, the tab lists 1,10,20,30 and 1,10,+10,+10 are considered identical. .TP .BI \-\^\- file\^ If the name of a file is given, .I tabs\^ reads the first line of the file, searching for a format specification. If it finds one there, it sets the tab stops according to it, otherwise it sets them as .BR \-8 . This type of specification may be used to make sure that a tabbed file is printed with correct tab settings, and would be used with the .IR pr (1) command: .RS .RS tabs \-\^\- file; pr file .RE .RE .PD .PP Any of the following may be used also; if a given flag occurs more than once, the last value given takes effect: .PP .PD 0 .TP 8 .BI \-T type\^ ..\"@(#)uustat.1c 5.2 .TH UUSTAT 1C .SH NAME uustat \- uucp status inquiry and job control .SH SYNOPSIS .B uustat [ options ] .SH DESCRIPTION .I Uustat\^ displays the status of, or cancels, previously specified .I uucp\^ commands, or provides general status on .I uucp\^ connections to other systems. The following .I options\^ are recognized: .PP .PD 0 .TP 10 .BI \-j jobn\^ Report the status of the .I uucp request .IR jobn . If .B all is used for .IR jobn , the status of all .I uucp requests is reported. If .I jobn is omitted, the status of the current user's .I uucp requests is reported. .TP 10 .BI \-k jobn\^ Kill the .I uucp\^ request whose job number is .IR jobn . The killed .I uucp\^ request must belong to the person issuing the .I uustat\^ command unless one is the superuser. .TP 10 .BI \-r jobn\^ Rejuvenate .I jobn\^. .I Jobn\^ is touched so that its modification time is set to the current time. This prevents .I uuclean\^ from deleting the job until the jobs modification time reaches the limit imposed b  acters have a special meaning to the shell and cause termination of a word unless quoted: .RS .PP \f3; & ( ) \(bv ^ < > new\^line space tab\fP .RE .PP A character may be .I quoted\^ (i.e., made to stand for itself) by preceding it with a .BR \e . The pair .B \enew line is ignored. All characters enclosed between a pair of single quote marks (\^\f3\*'\^\*'\fP\^), except a single quote, are quoted. Inside double quote marks (\f3"\^"\fP), parameter and command substitution occur and .B \e quotes the characters .BR \e , .BR \*` , \f3"\fP, and .BR $ . .B "$\(**" is equivalent to \f3"$1 \|$2\fP \|.\|.\|.\f3"\fP, whereas .B "$@" is equivalent to .B "$1"\| .B "$2"\| \&.\|.\|.\|. .SS Prompting. When used interactively, the shell prompts with the value of .SM .B PS1 before reading a command. If at any time a new-line character is typed and further input is needed to complete a command, then the secondary prompt (i.e., the value of .BR \s-1PS2\s+1 ) is issued. .SS Input/Output. Before a command is executed, itI Tabs\^ usually needs to know the type of terminal in order to set tabs and always needs to know the type to set margins. .I Type\^ is a name listed in .IR term (5). If no .B \-T flag is supplied, .I tabs\^ searches for the .SM .B $TERM value in the environment (see .IR environ (5)). If no .I type\^ can be found, .I tabs\^ tries a sequence that works for many terminals. .TP .BI +m n\^ The margin argument may be used for some terminals. It causes all tabs to be moved over .I n\^ columns by making column .I n+1\^ the left margin. If .B +m is given without a value of .IR n , the value assumed is 10. For a TermiNet, the first value in the tab list should be 1, or the margin will move even further to the right. The normal (leftmost) margin on most terminals is obtained by .BR +m0 . The margin for most terminals is reset only when the .B +m flag is given explicitly. .PD .PP Tab and margin setting is performed via the standard output. .SH DIAGNOSTICS .PD 0 .TP "\w@\f2unknown\ tab\ code\fP\ \ \ \ @u" .B "illegal taby .I uuclean.\^ .TP 10 .BI \-c hour\^ Remove status entries older than .I hour\^ hours. This administrative option can only be initiated by the user .B uucp or the superuser. .TP 10 .BI \-u user\^ Report the status of all .I uucp\^ requests issued by .IR user . .TP 10 .BI \-s sys\^ Report the status of all .I uucp\^ requests that communicate with remote system .IR sys . .TP 10 .BI \-o hour\^ Report the status of all .I uucp\^ requests which are older than .I hour\^ hours. .TP 10 .BI \-y hour\^ Report the status of all .I uucp\^ requests which are younger than .I hour\^ hours. .TP 10 .BI \-m mch\^ Report the status of accessibility of machine .IR mch . If .I mch\^ is specified as .BR all , then the status of all machines known to the local .I uucp\^ is provided. .TP .BI \-M mch\^ This is the same as the .I \-m option except that two times are printed: the time that the last status was obtained and the time that the last successful transfer to that system occurred. .TP .B \-O\^ Report the .I uucp\^ status usis input and output may be redirected using a special notation interpreted by the shell. The following may appear anywhere in a simple-command or may precede or follow a command and are not passed on to the invoked command; substitution occurs before .I word\^ or .I digit\^ is used: .PP .PD 0 .TP 14 .B word Use file .I word\^ as standard output (file descriptor 1). If the file does not exist, it is created; otherwise, it is truncated to zero length. .TP .B >\h@-.3m@>word Use file .I word\^ as standard output. If the file exists, output is appended to it (by first seeking to the end-of-file); otherwise, the file is created. .TP \f3<\h@-.3m@<\fP\*(OK\f3\-\fP\*(CK\f3word\fP The shell input is read up to a line that is the same as .IR word , or to an end-of-file. The resulting document becomes the standard input. If any character of .I word\^ is quoted, then no interpretation is placed upon the characters of the document; otherwise, parameter   s\^" Arbitrary tabs are ordered incorrectly. .br .TP .B "illegal increment\^" A zero or missing increment is found in an arbitrary specification. .br .TP .B "unknown tab code\^" A ``canned'' code cannot be found. .br .TP .B "can't open\^" \f3\-\^\-\fP\f2file\fP option was used, and file can't be opened. .br .TP .B "file indirection\^" \f3\-\^\-\fP\f2file\fP option was used and the specification in that file points to yet another file. Indirection of this form is not permitted. .br .PD .SH SEE ALSO nroff(1), environ(5), term(5). .SH BUGS There is no consistency among different terminals regarding ways of clearing tabs and setting the left margin. .br It is generally impossible to usefully change the left margin without also setting tabs. .br .I Tabs\^ clears only 20 tabs (on terminals requiring a long sequence), but can set 40 tabs. .\" @(#)tabs.1 1.6 ng the octal status codes listed below. If this option is not specified, the verbose description is printed with each .I uucp request. .TP .B \-q\^ List the number of jobs and other control files queued for each machine and the time of the oldest and youngest file queued for each machine. If a lock file exists for that system, its date of creation is listed. .PD .PP When no options are given, .I uustat\^ outputs the status of all .I uucp\^ requests issued by the current user. Note that only one of the options .BR \-j , .BR \-m , .BR \-k , .BR \-c , .BR \-r , can be used with the rest of the other options. .PP For example, the command: .IP .B "uustat \|\-uhdc \|\-smhtsa \|\-y72" .PP prints the status of all .I uucp\^ requests that were issued by user .B hdc\^ to communicate with system .B mhtsa\^ within the last 72 hours. The job request status statement provides the following information: .RS .TP \f2job-number \|user \|remote-system \|command-time \|status-time \|status\f1 .RE .PP where the .I status\^ may besubstitution and command substitution occur, (unescaped) .B \enew line is ignored, and .B \e must be used to quote the characters .BR \e , .BR $ , .BR \*` , and the first character of .IR word . If .B \- is appended to .BR <\h@-.3m@< , all leading tabs are stripped from .I word\^ and from the document. .TP .B <&digit The standard input is duplicated from file descriptor .I digit\^ (see .IR dup (2)). The standard output can be duplicated similarly, using .B > in place of .BR < . .TP .B <&\- The standard input is closed. The standard output can be closed similarly, using .B > in place of .BR < . .PD .PP If one of the above is preceded by a digit, the file descriptor created is that specified by the digit (instead of the default 0 or 1). For example: .RS .PP \f3\&.\|.\|. \|2>&1\f1 .RE .PP creates file descriptor 2 that is a duplicate of file descriptor 1. .PP If a command is followed by .BR & , the default standard input for the command is the empty file .BR /dev/null . Otherwise, the environment for the execu.TH TAIL 1 .SH NAME tail \- deliver the last part of a file .SH SYNOPSIS .B tail [ .BR \(+- [number][ lbc [ f ] ] ] [ file ] .SH DESCRIPTION .I Tail\^ copies the named file to the standard output beginning at a designated place. If no file is named, the standard input is used. .PP Copying begins at distance .BI + number\^ from the beginning, or .BI \- number\^ from the end of the input. If .I number\^ is null, the value 10 is assumed. .I Number\^ is counted in units of lines, blocks, or characters, according to the appended option .BR l , .BR b , or .BR c . When no units are specified, counting is by lines. .PP With the .B \-f (``follow'') option, if the input file is not a pipe, the program does not terminate after the line of the input file has been copied, but enters an endless loop, wherein it sleeps for a second and then attempts to read and copy further records from the input file. Thus it may be used to monitor the growth of a file that is being written by some other process. For example, the command:    either an octal number or a verbose description. The octal code corresponds to the following description: .PP .RS .PD 0 .TP 10 .SM OCTAL .SM STATUS .TP 10 000001 the copy failed, but the reason cannot be determined .TP 10 000002 permission to access local file is denied .TP 10 000004 permission to access remote file is denied .TP 10 000010 bad .I uucp\^ command is generated .TP 10 000020 remote system cannot create temporary file .TP 10 000040 cannot copy to remote directory .TP 10 000100 cannot copy to local directory .TP 10 000200 local system cannot create temporary file .TP 10 000400 cannot execute .I uucp\^ .TP 10 001000 copy (partially) succeeded .TP 10 002000 copy finished, job deleted .TP 10 004000 job is queued .TP 10 010000 job killed (incomplete) .TP 10 020000 job killed (complete) .PD .RE .PP The format of the machine accessibility status statement is: .IP \f2system-name \|time \|status\f1 .PP where \fItime\fR is the latest status time and .I status\^ is a self-explanatory description of the machtion of a command contains the file descriptors of the invoking shell, as modified by input/output specifications. .PP Redirection of output is not allowed in the restricted shell. .SS Environment. The .I environment\^ (see .IR environ (5)) is a list of name-value pairs that is passed to an executed program in the same way as a normal argument list. The shell interacts with the environment in several ways. On invocation, the shell scans the environment and creates a parameter for each name found, giving it the corresponding value. Executed commands inherit the same environment. If the user modifies the values of these parameters or creates new ones, none of these affects the environment unless the .B export command is used to bind the shell's parameter to the environment. The environment seen by an executed command is thus composed of any unmodified name-value pairs originally inherited by the shell, plus any modifications or additions, all of which must be noted in .B export commands. .PP The environment for.PP .RS .B "tail \|\-f \|fred" .RE .PP prints the last ten lines of the file .BR fred , followed by any lines that are appended to .B fred\^ between the time .I tail\^ is initiated and killed. As another example, the command: .PP .RS .B "tail \|\-15cf \|fred" .RE .PP prints the last 15 characters of the file .BR fred , followed by any lines that are appended to .B fred\^ between the time .I tail\^ is initiated and killed. .SH SEE ALSO dd(1). .SH BUGS Tails relative to the end of the file are treasured up in a buffer, and thus are limited in length. Various kinds of anomalous behavior may happen with character special files. .\" @(#)tail.1 1.4 ine status. .SH FILES .PD 0 .TP 1.5i /usr/spool/uucp spool directory .TP /usr/lib/uucp/L_stat system status file .TP /usr/lib/uucp/R_stat request status file .PD .SH SEE ALSO uucp(1C). .\" @(#)uustat.1c 1.5    any .I simple-command\^ may be augmented by prefixing it with one or more assignments to parameters. Thus: .RS .PP \f3\s-1TERM\s+1=450 \|cmd \|args\f1 .br and .br \f3(export \|\s-1TERM\s+1; \|\s-1TERM\s+1=450; \|cmd \|args)\f1 .RE .PP are equivalent (as far as the above execution of .I cmd\^ is concerned). .PP If the .B \-k flag is set, .I all\^ keyword arguments are placed in the environment, even if they occur after the command name. The following first prints .B "a=b c" and then .BR c : .PP .RS .nf \f3echo \|a=b \|c\f1 \f3set \|\-k\f1 \f3echo \|a=b \|c\f1 .fi .RE .SS Signals. The \s-1INTERRUPT\s+1 and \s-1QUIT\s+1 signals for an invoked command are ignored if the command is followed by .BR & ; otherwise signals have the values inherited by the shell from its parent, with the exception of signal 11 (but see also the .B trap command below). .SS Execution. Each time a command is executed, the above substitutions are carried out. Except for the .I "Special Commands\^" listed below, a new process is created an.TH TAR 1 .SH NAME tar \- tape file archiver .SH SYNOPSIS .B tar [ key ] [ files ] .SH DESCRIPTION .I Tar\^ saves and restores files on magnetic tape. Its actions are controlled by the .I key\^ argument. The .I key\^ is a string of characters containing at most one function letter and possibly one or more function modifiers. Other arguments to the command are .I files\^ (or directory names) specifying which files are to be dumped or restored. In all cases, appearance of a directory name refers to the files and (recursively) subdirectories of that directory. .PP The function portion of the key is specified by one of the following letters: .PP .PD 0 .TP 8 .B r The named .I files\^ are written on the end of the tape. The .B c function implies this function. .TP .B x The named .I files\^ are extracted from the tape. If a named file matches a directory whose contents had been written onto the tape, this directory is (recursively) extracted. The owner, modification time, and mode are restored (if possible). If no ..TH UUTO 1C .SH NAME uuto, uupick \- public \s-1UNIX\s+1 System-to-\s-1UNIX\s+1 System file copy .SH SYNOPSIS .B uuto [ options ] source-files destination .br .B uupick [ .B \-s system ] .SH DESCRIPTION .I Uuto\^ sends .I source-files\^ to .IR destination . .I Uuto\^ uses the .IR uucp (1C) facility to send files, while it allows the local system to control the file access. A .IR "source-file" name is a pathname on the user's machine. Destination has the form: .PP .RS \f2system\f3!\f2user\f1 .RE .PP where .I system\^ is taken from a list of system names that .I uucp\^ knows about (see .IR uuname ). .I Logname\^ is the login name of someone on the specified system. .PP Two \fIoptions\fP are available: .PP .PD 0 .TP 8 .B \-p Copy the source file into the spool directory before transmission. .TP .B \-m Send mail to the sender when the copy is complete. .PD .PP The files (or sub-trees if directories are specified) are sent to .SM PUBDIR on .IR system , where .SM PUBDIR is a public directory defined in the .I uucp\d an attempt is made to execute the command via .IR exec (2). .PP The shell parameter .B .SM PATH defines the search path for the directory containing the command. Alternative directory names are separated by a colon .RB ( : ). The default path is .B :/bin:/usr/bin (specifying the current directory, .BR /bin , and .BR /usr/bin , in that order). Note that the current directory is specified by a null pathname, which can appear immediately after the equal sign or between the colon delimiters anywhere else in the path list. If the command name contains a \f3/\fP, the search path is not used; such commands are not executed by the restricted shell. Otherwise, each directory in the path is searched for an executable file. If the file has execute permission but is not an .B a.out file, it is assumed to be a file containing shell commands. A sub-shell (i.e., a separate process) is spawned to read it. A parenthesized command is also executed in a sub-shell. .SS Special Commands. The following commands are executed in t  I files\^ argument is given, the entire content of the tape is extracted. Note that if several files with the same name are on the tape, the last one overwrites all earlier ones. .TP .B t The names of the specified files are listed each time that they occur on the tape. If no .I files\^ argument is given, all the names on the tape are listed. .TP .B u The named .I files\^ are added to the tape if they are not already there, or have been modified since last written on that tape. .TP .B c A new tape is created; writing begins at the beginning of the tape, instead of after the last file. This command implies the .B r function. .PD .PP The following characters may be used in addition to the letter that selects the desired function: .PP .PD 0 .TP 8 .B 0,.\^.\^.\^,7 This modifier selects the drive on which the tape is mounted. The default is .BR 1 . .TP .B v Normally, .I tar\^ does its work silently. The .B v (verbose) option causes it to type the name of each file it treats, preceded by the function letter. With t^ source. Specifically the files are sent to .PP .RS \f3\s-1PUBDIR\s+1/receive/\f2user\f3/\f2mysystem\f3/\f2files\f1 .RE .PP The destined recipient is notified by .IR mail (1) of the arrival of files. .PP .I Uupick\^ accepts or rejects the files transmitted to the user. Specifically, .I uupick\^ searches .SM PUBDIR for files destined for the user. For each entry (file or directory) found, the following message is printed on the standard output: .PP .RS \f3from \f2system\^\f3:\f1 [\^file \fIfilename\^\fR] [dir \fIdirname\^\fR] \fB?\fR .RE .PP .I Uupick\^ then reads a line from the standard input to determine the disposition of the file: .TP 16 Go on to next entry. .TP .B d Delete the entry. .TP \f3m\fP [ \f2dir\^\fP ] Move the entry to named directory .I dir\^ (current directory is default). .TP \f3a\fP [ \f2dir\^\fP ] Same as \fBm\fR except moving all the files sent from .IR system . .TP .B p Print the content of the file. .TP .B q Stop. .TP \s-1EOT\s0 (control-d) Same as .BR q . .TP .BI ! commandhe shell process and, except as specified, no input/output redirection is permitted for such commands: .PP .PD 0 .TP .B : No effect; the command does nothing. A zero exit code is returned. .br .TP .BI ".\| " file\^ Read and execute commands from .I file\^ and return. The search path specified by .B .SM PATH is used to find the directory containing .IR file . .TP \f3break\fP \*(OK \f2n\^\fP \*(CK Exit from the enclosing \f3for\fP or .B while loop, if any. If .I n\^ is specified then break .I n\^ levels. .TP \f3continue\fP \*(OK \f2n\^\fP \*(CK Resume the next iteration of the enclosing \f3for\fP or .B while loop. If .I n\^ is specified then resume at the .IR n -th enclosing loop. .TP \f3cd\fP \*(OK \f2arg\^\fP \*(CK Change the current directory to .IR arg . The shell parameter .B .SM HOME is the default .IR arg . The shell parameter .B .SM CDPATH defines the search path for the directory containing .IR arg . Alternative directory names are separated by a colon .RB ( : ). The default path is .B (specifyhe .B t function, .B v gives more information about the tape entries than just the name. .TP .B w This modifier causes .I tar\^ to print the action to be taken, followed by the name of the file, and then wait for the user's confirmation. If a word beginning with .B y is given, the action is performed. Any other input means ``no''. .TP .B f This modifier causes .I tar\^ to use the next argument as the name of the archive instead of .BR /dev/mt? . If the name of the file is .BR \- , .I tar\^ writes to the standard output or reads from the standard input, whichever is appropriate. Thus, .I tar\^ can be used as the head or tail of a pipeline. .I Tar\^ can also be used to move hierarchies with the command: .PD .PP .RS .RS \f3cd \|fromdir; \|tar \|cf \|\- \|. \|\(bv \|(cd \|todir; \|tar \|xf \|\-)\f1 .RE .RE .PP .PD 0 .TP 8 .B b This modifier causes .I tar\^ to use the next argument as the blocking factor for tape records. The default is 1, the maximum is 20. This option should be used only with raw magnetic tape a  \^ Escape to the shell to do .IR command . .TP .B * Print a command summary. .PP .I Uupick\^ invoked with the .BI \-s system\^ option only searches the .SM PUBDIR for files sent from .IR system . .SH FILES \s-1PUBDIR\s+1 /usr/spool/uucppublic public directory .SH SEE ALSO mail(1), uuclean(1M), uucp(1C), uustat(1C), uux(1C). .\" @(#)uuto.1c 1.4 ing the current directory). Note that the current directory is specified by a null pathname, which can appear immediately after the equal sign or between the colon delimiters anywhere else in the path list. If .I arg begins with a \f3/\fP then the search path is not used. Otherwise, each directory in the path is searched for .IR arg . The .I cd command may not be executed by .IR rsh . .br .ne 2.1v .TP \f3eval\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK The arguments are read as input to the shell and the resulting command(s) executed. .TP \f3exec\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK The command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may appear and, if no other arguments are given, cause the shell input/output to be modified. .TP \f3exit\fP \*(OK \f2n\^\fP \*(CK Causes a shell to exit with the exit status specified by .IR n . If .I n\^ is omitted, the exit status is that of the last command executed (an end-of-file also causes the shell to exirchives (see .B f above). The block size is determined automatically when reading tapes (key letters .B x and .BR t ). .TP .B l This modifier tells .I tar\^ to complain if it cannot resolve all of the links to the files being dumped. If .B l is not specified, no error messages are printed. .TP .B m This modifier tells .I tar\^ to not restore the modification times. The modification time of the file is the time of extraction. .PD .SH FILES /dev/mt? .br /tmp/tar\(** .SH DIAGNOSTICS Complains about bad key characters and tape read/write errors. .br Complains if enough memory is not available to hold the link tables. .SH BUGS There is no way to ask for the .IR n -th occurrence of a file. .br Tape errors are handled ungracefully. .br The .B u option can be slow. .br The .B b option should not be used with archives that are going to be updated. The current magnetic tape driver cannot backspace raw magnetic tape. If the archive is on a disk file, the .B b option should not be used at all, because updating an archive.\"@(#)uux.1c 5.2 .TH UUX 1C .SH NAME uux \- unix to unix command execution .SH SYNOPSIS .B uux [ options ] command-string .SH DESCRIPTION .I Uux\^ gathers zero or more files from various systems, executes a command on a specified system and then sends standard output to a file on a specified system. Note that, for security reasons, many installations limit the list of commands executable on behalf of an incoming request from .IR uux . Many sites permit little more than the receipt of mail (see .IR mail (1)) via .IR uux . .PP The \fIcommand-string\fP is made up of one or more arguments that look like a shell command line, except that the command names and filenames may be prefixed by .IB system-name !\fR.\fP A null \fIsystem-name\fP is interpreted as the local system. .PP Filenames may be: .RS .TP \(bu A full pathname .TP \(bu A pathname preceded by .BI ~ xxx\^ where .I xxx\^ is a login name on the specified system and is replaced by that user's login directory .TP \(bu Prefixed by the current directory .RE  t.) .TP \f3export\fP \*(OK \f2name\^\fP .\|.\|. \*(CK The given .IR name s are marked for automatic export to the .I environment\^ of subsequently-executed commands. If no arguments are given, a list of all names that are exported in this shell is printed. .TP \f3newgrp\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK Equivalent to .BI "exec newgrp" " arg\^" \&.\|.\|.\|. .TP \f3read\fP \*(OK \f2name\^\fP .\|.\|. \*(CK One line is read from the standard input and the first word is assigned to the first .IR name , the second word to the second .IR name , etc., with leftover words assigned to the last .IR name . The return code is 0 unless an end-of-file is encountered. .TP \f3readonly\fP \*(OK \f2name\^\fP .\|.\|. \*(CK The given .IR name s are marked .I readonly\^ and the values of the these .IR name s may not be changed by subsequent assignment. If no arguments are given, a list of all .I readonly\^ names is printed. .TP \f3set\fP \*(OK \f3\-\^\-ekntuvx\fP \*(OK \f2arg\^\fP .\|.\|. \*(CK \*(CK .RS .TP .B \-e Exit immediate stored on disk can destroy it. .br The current limit on filename length is 100 characters. .\" @(#)tar.1 1.4 .PP As an example, the command .IP \f3uux "\^!diff usg!/usr/dan/f1 pwba!/a4/dan/f1 > !f1.diff\^"\f1 .PP gets the \fBf1\fP files from the \f3usg\f1 and \f3pwba\f1 machines, executes a .I diff\^ command and puts the results in \fBf1.diff\fP in the local directory. .PP Any special shell characters such as \fB<>;\(bv\fP should be quoted either by quoting the entire \fIcommand-string\fP, or by quoting the special characters as individual arguments. .PP .I Uux\^ attempts to get all files to the execution system. For output files, the filename must be escaped using parentheses. For example, the command .IP \f3uux a!uucp b!/usr/file \\(c!/usr/file\\)\f1 .PP sends a \fIuucp\fP command to system ``a'' to get \fB/usr/file\fP from system ``b'' and send it to system ``c''. .PP .I Uux\^ notifies you if the requested command on the remote system is disallowed. The response comes by remote mail from the remote machine. .PP The following \fIoptions\fP are interpreted by .IR uux : .TP 15 .B \- The standard input to .I uux is mly if a command exits with a non-zero exit status. .TP .B \-k All keyword arguments are placed in the environment for a command, not just those that precede the command name. .TP .B \-n Read commands but do not execute them. .TP .B \-t Exit after reading and executing one command. .TP .B \-u Treat unset variables as an error when substituting. .TP .B \-v Print shell input lines as they are read. .TP .B \-x Print commands and their arguments as they are executed. .TP .B \-\^\- Do not change any of the flags; useful in setting .B $1 to .BR \- . .PP Using .B \+ rather than .B \- causes these flags to be turned off. These flags can also be used upon invocation of the shell. The current set of flags may be found in .BR $\- . The remaining arguments are positional parameters and are assigned, in order, to .BR $1 , .BR $2 , \&.\|.\|.\|. If no arguments are given, the values of all names are printed. .RE .TP \f3shift\fP \*(OK \f2n\^\fP \*(CK .br The positional parameters from .B $n+1 \&.\|.\|. are renamed .B $1 \&.\| '\" t .ds T \(-> .if t .ds ^ \^\s+4\v@.3m@^\v@-.3m@\s-4\^ .if n .ds ^ ^ .TH TBL 1 .SH NAME tbl \- format tables for nroff or troff .SH SYNOPSIS .B tbl [ .B \-\s-1TX\s+1 ] [ files ] .SH DESCRIPTION .I Tbl\^ is a preprocessor that formats tables for .IR nroff (1) or .IR troff (1). The input files are copied to the standard output, except for lines between .SM .B \&.TS and .SM .B \&.TE command lines, which are assumed to describe tables and are reformatted by .IR tbl . The .SM .B \&.TS and .SM .B \&.TE command lines are not altered by .IR tbl . .PP .SM .B \&.TS is followed by global options. The available global options are: .PP .RS .PD 0 .TP 15 .B center Center the table (default is left-adjust). .TP .B expand Make the table as wide as the current line length. .TP .B box Enclose the table in a box. .TP .B doublebox Enclose the table in a double box. .TP .B allbox Enclose each item of the table in a box. .TP .BI "tab (" x ) Use the character .I x\^ instead of a tab to separate items in a line of input data. .RE ade the standard input to the .IR command-string . .TP 15 .B \-n Send no notification to user. .TP 15 .BI \-m file\^ Report status of the transfer in .I file.\^ If .I file is omitted, send mail to the requester when the copy is completed. .PP .I Uux\^ returns an \s-1ASCII\s+1 string on the standard output which is the job number. This job number can be used by .I uustat\^ to obtain the status or terminate a job. .SH FILES .PD 0 .TP 22 /usr/spool/uucp spool directory .TP /usr/lib/uucp/\(** other data and programs .PD .SH SEE ALSO uuclean(1M), uucp(1C). .SH BUGS Only the first command of a shell pipeline may have a .IB system-name !\fR. All other commands are executed on the system of the first command. .br The use of the shell metacharacter .B \(** will probably not do what you want it to do. The shell tokens .B << and .B >> are not implemented. .\" @(#)uux.1c 1.5 .\|.\|. If .I n\^ is not given, it is assumed to be 1. .TP \f3test\fP .br Evaluate conditional expressions. See .IR test (1) for usage and description. .TP \f3times\fP .br Print the accumulated user and system times for processes run from the shell. .TP \f3trap\fP \*(OK \f2arg\^\fP \*(CK \*(OK \f2n\^\fP \*(CK .\|.\|. .I arg\^ is a command to be read and executed when the shell receives signal(s) .IR n . (Note that .I arg\^ is scanned once when the trap is set and once when the trap is taken.) Trap commands are executed in order of signal number. Any attempt to set a trap on a signal that was ignored on entry to the current shell is ineffective. An attempt to trap on signal 11 (memory fault) produces an error. If .I arg\^ is absent then all trap(s) .I n\^ are reset to their original values. If .I arg\^ is the null string then this signal is ignored by the shell and by the commands it invokes. If .I n\^ is 0 then the command .I arg\^ is executed on exit from the shell. The .B trap command with no arguments prin.PD .PP The global options, if any, are terminated with a semi-colon .RB ( ; ). .PP Following the global options are lines describing the format of each line of the table. Each such format line describes one line of the actual table, except that the last format line (which must end with a period) describes all remaining lines of the table. Each column of each line of the table is described by a single keyletter, optionally followed by specifiers. Specifiers govern formatting aspects such as the font and point size of the corresponding item, where vertical bars are to appear between columns, column width, and inter-column spacing. The available keyletters are: .PP .RS .PD 0 .TP .B c Center item within the column. .TP .B r Right-adjust item within the column. .TP .B l Left-adjust item within the column. .TP .B n Numerically adjust item in the column: units positions of numbers are aligned vertically. .TP .B s Span previous item on the left into this column. .TP .B a Center longest line in this column and then l .nr f 0 .bd S B 3 .de SP .if n .ul \%[\fB\-\\$1\fR\\c .if n .ul 0 \\$2\\$3 .. .de SF .if n .ul \%[\fB\-\\$1\fR] .if n .ul 0 .. .de AR .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \fB\-\\$1\\fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .de A2 .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \fB\-\\$1\fI\\$2\fR \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .ds S) \s-1SCCS\s0 .ds I) \fI\s-1SID\s0\fR .TH VAL 1 .SH NAME val \- validate \s-1SCCS\s0 file .SH SYNOPSIS \fBval \-\fR .br .B val .SF s .SP r \s-1SID\s0 ] .SP m name ] .SP y type ] files .SH DESCRIPTION .I Val\^ determines if the specified .I file\^ is an \*(S) file meeting the characteristics specified by the optional argument list. Arguments to .I val\^ may appear in any order. The arguments consist of keyletter arguments, which begin with a \fB\-\fR, and named files. .PP .I Val\^ has a special argument, \fB\-\fR, which causes reading of the standard input until an end-of-file condition is detected. Each line read is independentlyts a list of commands associated with each signal number. .TP \f3ulimit\fP \*(OK \f3\-fp\fp \*(CK \*(OK \f2n\^\fP \*(CK imposes a size limit of .I n\^ .RS .TP .B \-f imposes a size limit of .I n blocks on files written by child processes (files of any size may be read). With no argument, the current limit is printed. .TP .B \-p changes the pipe size to .I n (\s-1UNIX\s+1 System/\s-1RT\s+1 only). .PP If no option is given, .B \-f is assumed. .RE .TP \f3umask\fP \*(OK \f2nnn\^\fP \*(CK The user file-creation mask is set to .I nnn\^ (see .IR umask (2)). If .I nnn\^ is omitted, the current value of the mask is printed. .TP \f3wait\fP \*(OK \f2n\^\fP \*(CK Wait for the specified process and report its termination status. If .I n\^ is not given, all currently active child processes are waited for and the return code is zero. .PD .PP .SS Invocation. If the shell is invoked through .IR exec (2) and the first character of argument zero is .BR \- , commands are initially read from .B /etc/profile and then from .BR \s-eft-adjust all other lines in this column with respect to that centered line. .TP .B \*^ Span down previous entry in this column. .TP .B \|_ Replace this entry with a horizontal line. .TP .B = Replace this entry with a double horizontal line. .RE .PD .PP The characters .B B and .B I stand for the bold and italic fonts, respectively; the character \(bv indicates a vertical line between columns. .PP The format lines are followed by lines containing the actual data for the table. Within such data lines, data items are normally separated by tab characters. The end of the data items is indicated by a line containing only \fB\.TE\fR. .PP If a data line consists of only .B _ or .BR = , a single or double line, respectively, is drawn across the table at that point; if a .I "single item\^" in a data line consists of only .B _ or .BR = , then that item is replaced by a single or double line. .PP Full details of all these and other features of .I tbl\^ are given in the reference manual cited below. .PP The .SM .B \-TX o processed as if it were a command line argument list. .PP .I Val\^ generates diagnostic messages on the standard output for each command line and file processed and also returns a single 8\fB-\fRbit code upon exit as described below. .PP The keyletter arguments are defined as follows. The effects of any keyletter argument apply independently to each named file on the command line. .AR s The presence of this argument silences the diagnostic message normally generated on the standard output for any error that is detected while processing each named file on a given command line. .A2 r \s-1SID\s0 The argument value \*(I) .RI ( S \s-1CCS\s+1 " ID" entification String) is an \*(S) delta number. A check is made to determine if the \*(I) is ambiguous (e.g., .B \*-r\c 1 is ambiguous because it physically does not exist but implies 1.1, 1.2, etc., which may exist) or invalid (e.g., .B \*-r\c 1.0 or .B \*-r\c 1.1.0 is invalid because neither case can exist as a valid delta number). If the \*(I) is valid and not ambiguo 1$HOME\s+1/.profile , if such files exist. Thereafter, commands are read as described below, which is also the case when the shell is invoked as .BR /bin/sh . The flags below are interpreted by the shell on invocation only; Note that unless the .B \-c or .B \-s flag is specified, the first argument is assumed to be the name of a file containing commands, and the remaining arguments are passed as positional parameters to that command file: .PP .PD 0 .TP 10 .BI \-c "\| string\^" If the .B \-c flag is present then commands are read from .IR string . .TP .B \-s If the .B \-s flag is present or if no arguments remain, commands are read from the standard input. Any remaining arguments specify the positional parameters. Shell output is written to file descriptor 2. .TP .B \-i If the .B \-i flag is present or if the shell input and output are attached to a terminal, the shell is .IR interactive . In this case \s-1TERMINATE\s+1 is ignored (so that \f3kill 0\fP does not kill an interactive shell) and \s-1INTERRUPT\s+1ption forces .I tbl\^ to use only full vertical line motions, making the output more suitable for devices that cannot generate partial vertical line motions (e.g., line printers). .PP If no filenames are given as arguments (or if .B \- is specified as the last argument), .I tbl\^ reads the standard input, so it may be used as a filter. When it is used with .IR eqn (1) or .IR neqn , .I tbl\^ should come first to minimize the volume of data passed through pipes. .SH EXAMPLE If \*T represents a tab (which should be typed as a genuine tab), then the input: .PP .RS .nf \&\f3.\fPTS center \|box \|\f3;\fP cB \|s \|s cI \|\(bv \|cI \|s \*^ \|\(bv \|c \|c l \|\(bv \|n \|n \|\f3.\fP Household \|Population \f3_\fP Town\*THouseholds \*TNumber\*TSize \f3=\fP Bedminster\*T789\*T3\f3.\fP26 Bernards \|Twp\f3.\fP\*T3087\*T3\f3.\fP74 Bernardsville\*T2018\*T3\f3.\fP30 Bound \|Brook\*T3425\*T3\f3.\fP04 Bridgewater\*T7897\*T3\f3.\fP81 Far \|Hills\*T240\*T3\f3.\fP19 \&\f3.\fPTE .fi .RE .PP yields: .PP .TS center box ; cB s s cI | us, a check is made to determine if it actually exists. .A2 m name The argument value .I name\^ is compared with the \*(S) %\&M% keyword in .IR file . .A2 y type The argument value .I type\^ is compared with the \*(S) %\&Y% keyword in .IR file . .RE .PP The 8\fB-\fRbit code returned by .I val\^ is a disjunction of the possible errors, i.e., can be interpreted as a bit string where (moving from left to right) set bits are interpreted as follows: .nf .PP .RS bit 0 = missing file argument; bit 1 = unknown or duplicate keyletter argument; bit 2 = corrupted \*(S) file; bit 3 = can't open file or file not \*(S); bit 4 = \*(I) is invalid or ambiguous; bit 5 = \*(I) does not exist; bit 6 = %\&Y%, \fB\-y\fR mismatch; bit 7 = %\&M%, \fB\-m\fR mismatch; .RE .fi .PP Note that .I val\^ can process two or more files on a given command line and in turn can process multiple command lines (when reading the standard input). In these cases an aggregate code is returned \- a logical \fB\s-1OR\s0\fR of the codes generated for eac is caught and ignored (so that .B wait is interruptible). In all cases, \s-1QUIT\s+1 is ignored by the shell. .TP .B \-r If the .B \-r flag is present the shell is a restricted shell. .PD .PP The remaining flags and arguments are described under the .B set command above. .SS Rsh Only. .I Rsh is used to set up login names and execution environments whose capabilities are more controlled than those of the standard shell. The actions of .I rsh\^ are identical to those of .IR sh , except that the following are disallowed: .TP 5 \(bu changing directory (see .IR cd (1)) .TP 5 \(bu setting the value of .SM .BR $PATH\*S .TP 5 \(bu specifying path or command names containing .BR / .TP 5 \(bu redirecting output .RB ( > and .BR >> ) .PP The restrictions above are enforced after \f3.profile\fP is interpreted. .PP When a command to be executed is found to be a shell procedure, .I rsh\^ invokes .I sh\^ to execute it. Thus, it is possible to provide to the end-user shell procedures that have access to the full power of t cI s ^ | c c l | n n . Household Population _ Town Households Number Size = Bedminster 789 3.26 Bernards Twp. 3087 3.74 Bernardsville 2018 3.30 Bound Brook 3425 3.04 Bridgewater 7897 3.81 Far Hills 240 3.19 .TE .SH SEE ALSO cw(1), eqn(1), mm(1), mmt(1), nroff(1), troff(1), mm(5), mv(5). .br ``Table Formatting Program'' in the .IR "\*(6) Document Processing Guide" . .SH BUGS .br See .SM .I BUGS\^ under .IR nroff (1). .\" @(#)tbl.1 1.7 h command line and file processed. .SH "SEE ALSO" admin(1), delta(1), get(1), prs(1). .bp .SH DIAGNOSTICS Use .IR help (1) for explanations. .SH BUGS .I Val\^ can process up to 50 files on a single command line. Any number above 50 produces a .B core dump. .\" @(#)val.1 1.4 he standard shell, while imposing a limited menu of commands; this scheme assumes that the end-user does not have write and execute permissions in the same directory. .PP The net effect of these rules is that the writer of the .B .profile has complete control over user actions, by performing guaranteed setup actions and leaving the user in an appropriate directory (probably .I not\^ the login directory). .PP The system administrator often sets up a directory of commands (i.e., .BR /usr/rbin ) that can be safely invoked by .IR rsh . Some systems also provide a restricted editor .IR red . .SH EXIT STATUS Errors detected by the shell, such as syntax errors, cause the shell to return a non-zero exit status. If the shell is being used non-interactively, execution of the shell file is abandoned. Otherwise, the shell returns the exit status of the last command executed (see also the .B exit command above). .SH FILES /etc/profile .br \s-1$HOME\s+1/\f3.\fPprofile .br /tmp/sh\(** .br /dev/null .SH SEE ALSO cd(1), env(1.hw photo-type-setter .TH TC 1 .SH NAME tc \- phototypesetter simulator .SH SYNOPSIS .B tc [ .B \-t ] [ .BR \-s n ] [ .BR \-p l ] [ file ] .SH DESCRIPTION .I Tc\^ interprets its input (standard input default) as device codes for a Wang Laboratories, Inc. C/A/T phototypesetter. The standard output of .I tc\^ is intended for a Tektronix 4014 terminal with .SM ASCII and .SM APL character sets. The sixteen typesetter sizes are mapped into the 4014's four sizes; the entire .SM TROFF character set is drawn using the 4014's character generator, with overstruck combinations where necessary. Typical usage is: .RS .PP \f3troff\| \-t\| files\| \(bv\| tc\f1 .RE .PP At the end of each page, .I tc\^ waits for a new-line character (empty line) from the keyboard before continuing to the next page. In this wait state, the command .B e suppresses the screen erase before the next page; .BI s n\^ causes the next .I n\^ pages to be skipped; and .BI ! cmd\^ sends .I cmd\^ to the shell. .PP The command line options are: .TP "\w'\-s .\" @(#)vax.1 1.2 .so /usr/man/u_man/man1/machid.1 ), login(1), newgrp(1), test(1), umask(1), dup(2), exec(2), fork(2), pipe(2), signal(2), ulimit(2), umask(2), wait(2), a.out(4), profile(4), environ(5). .br ``An Introduction to Shell'' in the .IR "\*(6) Programming Guide" . .SH BUGS The command .B readonly (without arguments) produces the same output as the command .BR export . .br If .B <\h@-.3m@< is used to provide standard input to an asynchronous process invoked by .BR & , the shell gets mixed up about naming the input document; a garbage file .B /tmp/sh\(** is created and the shell complains about not being able to find that file by another name. .\" @(#)sh.1 1.7 n 'u" .B \-t Don't wait between pages (for directing output into a file). .TP .BI \-s n\^ Skip the first .I n\^ pages. .TP .BI \-p l\^ Set page length to .IR l ; .I l\^ may include the scale factors .B p (points), .B i (inches), .B c (centimeters), and .B P (picas); default is picas. .SH SEE ALSO 4014(1), sh(1), tplot(1G), troff(1). .SH BUGS Font distinctions are lost. .\" @(#)tc.1 1.4 .nr f 0 .bd S B 3 .de SP .if n .ul \%[\fB\-\\$1\fR\\c .if n .ul 0 \\$2\\$3 .. .de SF .if n .ul \%[\fB\-\\$1\fR] .if n .ul 0 .. .de AR .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \fB\-\\$1\\fR \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .de A2 .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \fB\-\\$1\fI\\$2\fR \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .TH VC 1 .SH NAME vc \- version control .SH SYNOPSIS .B vc .SF a .SF t .SP c char] .SF s [keyword=value ... keyword=value] .SH DESCRIPTION The .I vc\^ command copies lines from the standard input to the standard output under control of its .I arguments\^ and .I "control statements\^" encountered in the standard input. In the process of performing the copy operation, user declared .I keywords\^ may be replaced by their string .I value\^ when they appear in plain text and/or control statements. The copying of lines from the standard input to the standard output is conditional, based on tests (in control statements) of keyword values spec .TH SIZE 1 .SH NAME size \- print section sizes of common object files .SH SYNOPSIS .BR size .RB [ \-o ] .RB [ \-d ] .RB [ \-x ] .RB [ \-V ] filename(s) .SH DESCRIPTION The .I size command produces section size information for each section in the common object files. The name of the section is printed followed by its size in bytes, physical address, and virtual address. .PP Numbers are printed in decimal by default. The .BR \-o , .BR \-x " ,or" .B \-d\^ options can be used to print the numbers in octal, hexadecimal, or decimal, respectively. .PP The .B \-V flag supplies the version number of the .I size command. .SH "SEE ALSO" as(1), cc(1), ld(1). .SH "DIAGNOSTICS" .PP .PD 0 .TP 30 .B "size: name: cannot open" .I Name cannot be read. .PP .TP 30 .B "size: name: bad magic" .I Name is not an object file. '\" \%W\% .\" @(#)size.1 1.7 .\" @(#)td.1g 1.2 .so /usr/man/u_man/man1/gdev.1g ified in control statements or as .I vc\^ command arguments. A control statement is a single line beginning with a control character, except as modified by the .B \-t keyletter (see below). The default control character is colon (\fB:\fR), except as modified by the .B \-c keyletter (see below). Input lines beginning with a backslash (\|\f3\\\f1\|) followed by a control character are not control lines and are copied to the standard output with the backslash removed. Lines beginning with a backslash followed by a non-control character are copied in their entirety. .PP A keyword is composed of 9 or less alphanumerics; the first must be alphabetic. A value is any \s-1ASCII\s0 string that can be created with .IR ed (1); a numeric value is an unsigned string of digits. Keyword values may not contain blanks or tabs. Replacement of keywords by values is done whenever a keyword surrounded by control characters is encountered on a version control statement. The .B \-a keyletter (see below) forces replacement of keywor.TH SLEEP 1 .SH NAME sleep \- suspend execution for an interval .SH SYNOPSIS .B sleep time .SH DESCRIPTION .I Sleep\^ suspends execution for .I time\^ seconds. It is used to execute a command after a certain amount of time as in: .PP .RS 5 \f3(sleep 105; \f2command\f3\^)&\f1 .PP .RE or to execute a command under specified conditions, as in: .PP .RS 5 .B "while true" .RE .br .RS 5 .B "do" .br .RE .RS 10 \fIcommand\fP .br .RE .RS 10 .B "sleep 37" .br .RE .RS 5 .B done .RE .SH "SEE ALSO" alarm(2), sleep(3C). .SH BUGS .I Time\^ must be less than 65536 seconds. .\" @(#)sleep.1 1.4  .TH TEE 1 .SH NAME tee \- pipe fitting .SH SYNOPSIS .B tee [ .B \-i ] [ .B \-a ] [ file ] ... .SH DESCRIPTION .I Tee\^ transcribes the standard input to the standard output and makes copies in the .IR files . The .B \-i option ignores interrupts; the .B \-a option causes the output to be appended to the .I files\^ rather than overwriting them. .\" @(#)tee.1 1.2 ds in .I all\^ lines of text. An uninterpreted control character may be included in a value by preceding it with \fB\\\fR\|. If a literal \fB\e\fR is desired, then it too must be preceded by \f3\e\f1\|. .PP .B "Keyletter arguments" .AR a Forces replacement of keywords surrounded by control characters with their assigned value in .I all\^ text lines and not just in .I vc\^ statements. .AR t All characters from the beginning of a line up to and including the first .I tab\^ character are ignored for the purpose of detecting a control statement. If one is found, all characters up to and including the .I tab\^ are discarded. .A2 c char Specifies a control character to be used in place of \fB:\fR. .AR s Silences warning (not error) messages that are normally printed on the diagnostic output. .RE .PP .B "Version Control Statements" .PP .RE .TP 5 \fB:dcl\f2 keyword\f1[, \fB...\f1,\f2 keyword\f1] .br Used to declare keywords. All keywords must be declared. .PP .RE .TP 5 \fB:asg\f2 keyword\f3=\f2value\f1 .br Used to a.TH SNO 1 .SH NAME sno \- \s-1SNOBOL\s+1 interpreter .SH SYNOPSIS .B sno [ files ] .SH DESCRIPTION .I Sno\^ is a .SM SNOBOL compiler and interpreter (with slight differences). .I Sno\^ obtains input from the concatenation of the named .IR file s and the standard input. All input through a statement containing the label .B end is considered program and is compiled. The rest is available to .BR syspit . .PP .I Sno\^ differs from .SM SNOBOL in the following ways: .RS .PP There are no unanchored searches. To get the same effect: .ta 1.2i .RS .PP \f3a \|\(**\(** \|b\f1 unanchored search for .IR b . .br \f3a \|\(**x\(** \|b \|= \|x \|c\f1 unanchored assignment .RE .PP There is no back referencing. .RS .PP \f3x \|= \|"abc"\f1 .br \f3a \|\(**x\(** \|x\f1 is an unanchored search for .BR abc . .RE .PP Function declaration is done at compile time by the use of the (non-unique) label .BR define . Execution of a function call begins at the statement following the .BR define . Functions cannot be defined at run time, and t.\" @(#)tekset.1g 1.2 .so /usr/man/u_man/man1/gdev.1g  ssign values to keywords. An .B asg statement overrides the assignment for the corresponding keyword on the .I vc\^ command line and all previous .BR asg 's for that keyword. Keywords declared without assigned values have null values. .if \\n()s .bp .PP .nf \fB:if\f2 condition\f1 .sp -.5v \f3.\f1 .sp -.5v \f3.\f1 .sp -.5v \f3.\f1 \fB:end\f1 .fi .br .RS 5 Used to skip lines of the standard input. If the condition is true all lines between the .I if\^ statement and the matching .I end\^ statement are copied to the standard output. If the condition is false, all intervening lines are discarded, including control statements. Note that intervening .I if\^ statements and matching .I end\^ statements are recognized solely for the purpose of maintaining the proper .I if-end\^ matching. .br .ne 9 The syntax of a condition is\fB:\fR .PP .nf .in +1 .ta 8,17,25 \fB::\fR= [ "not" ] \fB::\fR= \(or "\(or" \fB::\fR= \(or "&" \fB::\fR= "(" ")" \(or \fB::\fR= "=" \(or "!=" \(or "<" \(or ">" \fB::\fR= \(or .in -1 .fi .PP The available operators and their meanings are\fB:\fR .PP .in +3 .nf .if n .ta 7 .if t .ta 8 = equal != not equal & and \(or or > greater than < less than ( ) used for logical groupings not may only occur immediately after the \fIif\^\fP, and when present, inverts the value of the entire condition .in -3 .fi .PP \fB>\fR and \fB<\fR operate only on unsigned integer values (e.g., \fB: 012 > 12\f1 is false). All other operators take strings as arguments (e.g., \fB: 012 != 12\f1 is true). The precedence of the operators (from highest to lowest) is\fB:\fR .in +3 .nf = != > < all of equal precedence & \(or .fi .in -3 Parentheses may be used to alter the order of precedence. .br Values must be separated from operators or parentheses by at least one blank or tab. .RE .TP 5 \fB::text\f1 .br Used for keyword replacement on lines that are copied to the standard outp age" , by D.\ J. Farber, R.\ E. Griswold, and I.\ P. Polonsky, .SM .I JACM\^ .B 11 (1964), pp.\ 21-30. .DT .\" @(#)sno.1 1.5 ts and its set-user-\c .SM ID bit is set. .TP .BI \-g " file\^" true if .I file\^ exists and its set-group-\c .SM ID bit is set. .TP .BI \-k " file\^" true if .I file\^ exists and its sticky bit is set. .TP .BI \-s " file\^" true if \fIfile\fR exists and has a size greater than zero. .TP .BR \-t " [ \fIfildes\fR ]" true if the open file whose file descriptor number is .I fildes\^ (1 by default) is associated with a terminal device. .TP .BI \-z " s1\^" true if the length of string .I s1\^ is zero. .TP .BI \-n " s1\^" true if the length of the string .I s1\^ is non-zero. .TP .IB s1 " = " s2\^ true if strings .I s1\^ and .I s2\^ are identical. .TP .IB s1 " != " s2\^ true if strings .I s1\^ and .I s2\^ are .I not\^ identical. .TP .I s1\^ true if .I s1\^ is .I not\^ the null string. .TP .IB n1 " \-eq " n2\^ true if the integers .I n1\^ and .I n2\^ are algebraically equal. Any of the comparisons .BR \-ne , .BR \-gt , .BR \-ge , .BR \-lt , and .BR \-le may be used in place of .BR \-eq . .PP These primaries may be cout. The two leading control characters are removed, and keywords surrounded by control characters in text are replaced by their value before the line is copied to the output file. This action is independent of the .B \-a keyletter. .PP .RE .TP 5 \fB:on\fR .br .RE .TP 5 \fB:off\fR .br Turn on or off keyword replacement on all lines. .PP .RE .TP 5 \fB:ctl\f2 char\f1 .br Change the control character to char. .PP .in -10 .RE .TP 5 \fB:msg\f2 message\f1 .br Print the given message on the diagnostic output. .PP .RE .TP 5 \fB:err\f2 message\f1 .br Print the given message followed by\fB:\fR .ti +5 \fB\s-1ERROR\s0\fR\fB:\fR err statement on line \fB...\fR (915) .br on the diagnostic output. .I Vc\^ halts execution, and returns an exit code of 1. .PP .i0 .SH DIAGNOSTICS Use .I help\c\^ (1) for explanations. .SH "EXIT CODES" 0 \- normal .br 1 \- any error .\" @(#)vc.1 1.6 .TH SORT 1 .SH NAME sort \- sort and/or merge files .SH SYNOPSIS .B sort .RB [ \-cmubdf\&inrt x] .RB [ + pos1 .RB [ \- pos2]] .B \&.\|.\|. .RB [ \-o "\ output]" [names] .SH DESCRIPTION .I Sort\^ sorts lines of all the named files together and writes the result on the standard output. The name .B \- means the standard input. If no input files are named, the standard input is sorted. .PP The default sort key is an entire line. Default ordering is lexicographic by bytes in machine collating sequence. The ordering is affected globally by the following options, one or more of which may appear. .TP 5 .B b Ignore leading blanks (spaces and tabs) in field comparisons. .TP .B d Sort in dictionary order; i.e., only letters, digits, and blanks are significant in comparisons. .TP .B f Fold uppercase letters onto lowercase. .TP .B i Ignore characters outside the .SM ASCII range 040-0176 in non-numeric comparisons. .TP .B n An initial numeric string, consisting of optional blanks, optional minus sign, and zero or more digi mbined with the following operators: .TP 12 .B ! unary negation operator. .TP .B \-a binary .I and\^ operator. .TP .B \-o binary .I or\^ operator .RB ( \-a has higher precedence than .BR \-o ). .TP .BR "(\| " "expr" " \|)" parentheses for grouping. .PP Notice that all the operators and flags are separate arguments to .IR test . Notice also that parentheses are meaningful to the shell and, therefore, must be escaped. .SH "SEE ALSO" find(1), sh(1). .br .ne 4v .SH WARNING In the second form of the command (i.e., the one that uses .BR [\|] , rather than the word .IR test ), the square brackets must be delimited by blanks. .br Some .SM UNIX systems do not recognize the second form of the command. .\" @(#)test.1 1.2 .\" @(#)vi.1 1.6 .TH VI 1 .UC .SH NAME vi \- screen oriented (visual) display editor based on ex .SH SYNOPSIS .B vi [ .B \-t .I tag\^ ] [ .B \-r .I file\^ ] [ \fB+\fR\fIcommand\fR ] [ .B \-l ] [ \fB\-w\fIn\fR ] name ... .SH DESCRIPTION .I Vi\^ (visual) is a display oriented text editor based on an underlying line editor, .IR ex (1). It is possible to use the command mode of .I ex\^ from within .I vi\^ and vice-versa. .PP When using .IR vi , changes you make to the file are reflected in what you see on your terminal screen. The position of the cursor on the screen indicates the position within the file. The ``Text Editors'' section in the .I "\*(6) User's Guide" and the ``Vi Quick Reference'' card provide full details on using .I vi.\^ .PP .SH INVOCATION The following invocation options are interpreted by .IR vi : .TP 15 .BI \-t tag\^ Edit the file containing the .I tag\^ and position the editor at its definition. .TP .BI \-r file\^ Recover .I file\^ after an editor or system crash. If .I file\^ is not ts with optional decimal point, is sorted by arithmetic value. Option .B n implies option .BR b . .TP .B r Reverse the sense of comparisons. .TP .BI t x\^ Tab character separating fields is .IR x . .PP The notation .BI + "pos1\| " \- pos2\^ restricts a sort key to a field beginning at .I pos1\^ and ending just before .IR pos2 . .I Pos1\^ and .I pos2\^ each have the form .IB m . n\^\f1, optionally followed by one or more of the flags .BR bdf\&inr , where .I m\^ tells a number of fields to skip from the beginning of the line and .I n\^ tells a number of characters to skip further. If any flags are present they override all the global ordering options for this key. If the .B b option is in effect, .I n\^ is counted from the first non-blank in the field; .B b is attached independently to .IR pos2 . A missing .BI \&. n\^ means .BR \&. 0; a missing .BI \- pos2\^ means the end of the line. Under the .BI \-t x\^ option, fields are strings separated by .IR x ; otherwise fields are non-empty non-blank strings separated.TH TIME 1 .SH NAME time \- time a command .SH SYNOPSIS .B time command .SH DESCRIPTION The \fIcommand\fP is executed; after it is complete, .I time\^ prints the time elapsed during the command, the time spent in the system, and the time spent in execution of the command. Times are reported in seconds. .PP The execution time can depend on what kind of memory the program happens to land in; the user time in \s-1MOS\s0 is often half what it is in core. .PP The times are printed on standard error. .SH SEE ALSO timex(1), times(2). .\" @(#)time.1 1.3  specified a list of all saved files is printed. .TP .BI \+ command Begin editing by executing the specified editor search or positioning .IR command . .TP .B \-l .B LISP mode; indents appropriately for lisp code. The .B "() {} [[" and .B ]] commands in .I vi\^ and .I open are modified to have meaning for .I lisp . .TP .BI \-w n\^ Set the default window size to .I n\^. This is useful when using the editor over a slow speed line. .PP The .I name\^ argument indicates files to be edited. .SH "\f2VI\f1 STATES" .TP 15 Command Normal and initial state. Other states return to command state upon completion. ESC (escape) is used to cancel a partial command. .TP Insert Entered by \fBa i A I o O c C s S\fP \fBR\fP. Arbitrary text may then be entered. Insert is normally terminated with ESC character, or abnormally with interrupt. .TP Last line Reading input for \fB: / ?\fP or \fB!\fP; terminate with ESC or CR to execute, interrupt to cancel. .SH "COMMANDS" .SS "Counts before \f2vi\f1 commands" .TS lw(1.5i) lw(1.7 by blanks. .PP When there are multiple sort keys, later keys are compared only after all earlier keys compare equal. Lines that otherwise compare equal are ordered with all bytes significant. .PP These option arguments are also understood: .TP 5 .B c Check that the input file is sorted according to the ordering rules; give no output unless the file is out of sort. .TP .B m Merge only; the input files are already sorted. .TP .B u Suppress all but one in each set of equal lines. Ignored bytes and bytes outside keys do not participate in this comparison. .TP .B o The next argument is the name of an output file to use instead of the standard output. This file may be the same as one of the inputs. .SH EXAMPLES Print in alphabetical order all the unique spellings in a list of words (capitalized words differ from uncapitalized): .IP .B "sort \|\-u \|+0f \|+0 \|list" .PP Print the password file .RI ( passwd (4)) sorted by user .SM ID (the third colon-separated field): .IP .B "sort \|\-t: \|+2n \|/etc/passwd" .PP Pri.TH TIMEX 1 .SH NAME timex \- time a command; report process data and system activity .SH SYNOPSIS .B timex\ [\|options\|] command .SH DESCRIPTION The given .I command\^ is executed; the elapsed time, user time and system time spent in execution are reported in seconds. Optionally, process accounting data for the .I command and all its children can be listed or summarized, and total system activity during the execution interval can be reported. .P The output of .I timex is written on standard error. .P .IR Options\ are: .TP .4i .B \-p List process accounting records for .I command and all its children. Suboptions .B f, h, k, m, r, and .B t modify the data items reported, as defined in .IR acctcom (1). The number of blocks read or written and the number of characters transferred are always reported. .TP .4i .B \-o Report the total number of blocks read or written and total characters transferred by .I command and all its children. .TP .4i .B \-s Report total system activity (not just that due to .IR coi)b. line/column number z G | scroll amount ^D ^U replicate insert a i A I repeat effect \fRmost of the rest\fP .TE .SS "Sample commands" .TS lw(1.5i)b lw(1.7i). dw delete a word de ... leaving white space dd delete a line 3dd ... 3 lines i\fItext\fP\fRESC\fP insert text \fIabc\fP cw\fInew\fP\fRESC\fP change word to \fInew\fP ea\fIs\fP\fRESC\fP pluralize word xp transpose characters ZZ exit \f2vi\f1 .TE .SS "Interrupting, canceling" .TS aw(0.75i)b aw(1.6i). ESC end insert or incomplete cmd ^? (delete or rubout) interrupts ^L reprint screen if \fB^?\fR scrambles it .TE .SS "File manipulation" .TS aw(0.75i)b aw(1.6i). :w write back changes :wq write and quit :q quit :q! quit, discard changes :e \fIname\fP edit file \fIname\fP :e! reedit, discard changes :e + \fIname\fP edit, starting at end :e +\fIn\fR edit starting at line \fIn\fR :e # edit alternate file ^\^ synonym for \fB:e #\fP :w \fIname\fP write file \fIname\fP :w! \fIname\fP overwrite file \fIname\fP :sh run shell, then return :!\fIcmd\fP run \fI nt the first instance of each month in an already sorted file of (month-day) entries (the options .B \-um with just one input file make the choice of a unique representative from a set of equal lines predictable): .IP .B "sort \|\-um \|+0 \|\-1 \|dates" .SH FILES /usr/tmp/stm??? .SH SEE ALSO comm(1), join(1), uniq(1). .SH DIAGNOSTICS Comments and exits with non-zero status for various trouble conditions and for disorder discovered under option .BR \-c . .SH BUGS Very long lines are silently truncated. .\" @(#)sort.1 1.5 mmand ) that occurred during the execution interval of .IR command . All the data items listed in .IR sar (1) are reported. .SH EXAMPLES A simple example: .RS .PP .B "timex \-ops\ sleep 60" .RE .PP A terminal session of arbitrary complexity can be measured by timing a sub-shell: .RS .PP .B "timex \-opskmt\ sh" .RS .PP .B "session commands" .RE .SM .B EOT .RE .SH "SEE ALSO" acctcom(1), sar(1). .SH WARNING Process records associated with .I command are selected from the accounting file .B /usr/adm/pacct by inference, since process genealogy is not available. Background processes having the same user-id, terminal-id, and execution time window are spuriously included. .\" @(#)timex.1 1.3 cmd\fR, then return :n edit next file in arglist :n \fIargs\fP specify new arglist :f show current file and line ^G synonym for \fB:f\fP :ta \fItag\fP tag file entry \fItag\fP ^] \fB:ta\fP, following word is \fItag\fP .TE .SS "Positioning within file" .TS aw(0.75i)b aw(1.6i). ^F forward screen ^B backward screen ^D scroll down half screen ^U scroll up half screen G goto line (end default) /\fIpat\fR next line matching \fIpat\fR ?\fIpat\fR prev line matching \fIpat\fR n repeat last \fB/\fR or \fB?\fR N reverse last \fB/\fR or \fB?\fR /\fIpat\fP/+\fIn\fP \f2n\f1'th line after \fIpat\fR ?\fIpat\fP?\-\fIn\fP \f2n\f1'th line before \fIpat\fR ]] next section/function [[ previous section/function % find matching \fB( ) \f1or \fB{ }\fP .TE .SS "Adjusting the screen" .TS aw(0.75i)b aw(1.6i). ^L clear and redraw ^R retype, eliminate @ lines z\fRCR\fP redraw, current at window top z\- ... at bottom z\|. ... at center /\fIpat\fP/z\- \fIpat\fP line at bottom z\fIn\fPCR use \fIn\fP-line window ^E scroll window down 1 line .TH SPELL 1 .SH NAME spell, hashmake, spellin, hashcheck \- find spelling errors .SH SYNOPSIS .B spell [ .B \-v ] [ .B \-b ] [ .B \-x ] [ .B \-l ] [ .BR + local\(rufile ] [ files ] .PP .B /usr/lib/spell/hashmake .PP .B /usr/lib/spell/spellin n .PP .B /usr/lib/spell/hashcheck spelling\(rulist .SH DESCRIPTION .I Spell collects words from the named .I files and looks them up in a spelling list. Words that neither occur among nor are derivable (by applying certain inflections, prefixes, and/or suffixes) from words in the spelling list are printed on the standard output. If no .I files are named, words are collected from the standard input. .PP .I Spell ignores most .IR troff (1), .IR tbl (1), and .IR eqn (1) constructions. .PP Under the .B \-v option, all words not literally in the spelling list are printed, and plausible derivations from the words in the spelling list are indicated. .PP Under the .B \-b option, British spelling is checked. Besides preferring .IR centre , .IR colour , .IR programme , .IR speciali .bd S B 3 .TH TOC 1G .SH NAME toc \- graphical table of contents routines .SH SYNOPSIS \fBdtoc\fR [directory] .br \fBttoc\fR mm-file .br \fBvtoc\fR [\fB\-c\^d\^h\fRn\fB\^i\^m\^s\^v\fRn] [\s-1TTOC\s+1 file] .br .SH DESCRIPTION All of the commands listed below reside in .B /usr/bin/graf (see .IR graphics (1G)). .TP 10 \fBdtoc\fR \fBDtoc\fR makes a textual table of contents, \s-1TTOC\s+1, of all subdirectories beginning at .I directory\^ (\fIdirectory\fR defaults to \fB.\fR). The list has one entry per directory. The entry fields from left to right are level number, directory name, and the number of ordinary readable files in the directory. .I Dtoc\^ is useful in making a visual display of all or parts of a file system. The following command produces a visual display of all the readable directories under \fB/\fR: .br \fBdtoc / \||\| vtoc \||\| td\fR .TP 10 \fBttoc\fR Output is the table of contents generated by the .SM \&\f3.TC\f1 macro of \fImm\fR(1) translated to \s-1TTOC\s+1 format. The input is assumed^Y scroll window up 1 line .TE .SS "Marking and returning .TS aw(0.5i)b aw(2.0i). \(ga\(ga previous context \(aa\(aa ... at first non-white space in line m\fIx\fP mark position with letter \fIx\fP \(ga\fIx\fP to mark \fIx\fP \(aa\fIx\fP ... at first non-white space in line .TE .SS "Line positioning" .TS aw(0.5i)b aw(2.0i). H home window line L last window line M middle window line + next line, at first non-white \- previous line, at first non-white \fRCR\fP return, same as + \(da \fRor\f3 j\f1 next line, same column \(ua \fRor\f3 k\f1 previous line, same column .TE .SS "Character positioning" .TS aw(0.5i)b aw(2.0i). ^ first non-white space on line 0 beginning of line $ end of line h \fRor\f3 \(->\f1 forward l \fRor\f3 \(<-\f1 backwards ^H same as \fB\(<-\fP \fRspace\fP same as \fB\(->\fP f\fIx\fP find \fIx\fP forward F\fIx\fP \fBf\fR backward t\fIx\fP up to \fIx\fP forward T\fIx\fP back up to \fIx\fP ; repeat last \fBf F t\fP or \fBT\fP , inverse of \fB;\fP | to specified column % find matching \fB( )\f1 or ty , .IR travelled , and other spellings, this option insists upon .B -ise in words like .BR standardise . .PP Under the .B \-x option, every plausible stem is printed with .B = for each word. .PP By default, .I spell (like .IR deroff (1)) follows chains of included files .RB ( \&.so and .B \&.nx .IR troff (1) requests), unless the names of such included files begin with .BR /usr/lib . Under the .B \-l option, .I spell follows the chains of all included files. .PP Under the .BI + local\(rufile option, words found in .I local\(rufile are removed from .IR spell 's output. .I Local\(rufile is the name of a user-provided file that contains a sorted list of words, one per line. With this option, the user can specify a set of words that are correct spellings (in addition to .IR spell 's own spelling list) for each job. .PP The spelling list is based on many sources, and while more haphazard than an ordinary dictionary, is also more effective with respect to proper names and popular technical words. Coverage of the  to be a \fImm\fR file that uses the \&\f3.H\f1 family of macros for section headers. If no \fIfile\fR is given, the standard input is assumed. .TP 10 \fBvtoc\fR \fIVtoc\fR produces a graphical primitive string (\s-1GPS\s+1) describing a hierarchy chart from a \s-1TTOC\s+1. The output drawing consists of boxes containing text connected in a tree structure. If no \fIfile\fR is given, the standard input is assumed. Each \s-1TTOC\s+1 entry describes one box and has the form: .br \fIid\fR [\fIline-weight\fR,\fIline-style\fR] "\fItext\|\fR" [\fImark\fR] .br where: .RS 10 .TP 12 \fIid\fR is an alternating sequence of numbers and dots. The \fIid\fR specifies the position of the entry in the hierarchy. The \fIid\fR\| \fB0.\fR is the root of the tree. .TP 12 \fIline-weight\fR is either: .br \fBn\fR, normal-weight; or .br \fBm\fR, medium-weight; or .br \fBb\fR, bold-weight. .TP 12 \fIline-style\fR is either: .br \fBso\fR, solid line; .br \fBdo\fR, dotted line; .br \fBdd\fR, dot-dash line; .br \fB \fB{ }\fR .TE .SS "Words, sentences, paragraphs" .TS aw(0.5i)b aw(2.0i). w word forward b back word e end of word ) to next sentence } to next paragraph ( back sentence { back paragraph W blank delimited word B back \fBW\fP E to end of \fBW\fP .TE .SS "Commands for \s-2LISP\s0 Mode" .TS aw(0.5i)b aw(2.0i). ) Forward s-expression } ... but don't stop at atoms ( Back s-expression { ... but don't stop at atoms .TE .SS "Corrections during insert" .TS aw(.5i)b aw(2.0i). ^H erase last character ^W erase last word \fRerase\fP your erase, same as \fB^H\fP \fRkill\fP your kill, erase input this line \e escapes \fB^H\fR, your erase and kill \fRESC\fP ends insertion, back to command ^? interrupt, terminates insert ^D backtab over \fIautoindent\fP \(ua^D kill \fIautoindent\fP, save for next 0^D ... but at margin next also ^V quote non-printing character .TE .SS "Insert and replace" .TS aw(.5i)b aw(2.0i). a append after cursor i insert before A append at end of line I insert before first non-blank o open line below O openspecialized vocabularies of biology, medicine, and chemistry is light. .PP Pertinent auxiliary files may be specified by name arguments, indicated below with their default settings (see .SM .IR FILES ). Copies of all output are accumulated in the history file. The stop list filters out misspellings (e.g., thier=thy\-y+ier) that would otherwise pass. .PP Three routines help maintain and check the hash lists used by .IR spell : .TP "\w'\fBhashcheck\fP 'u" .B hashmake Reads a list of words from the standard input and writes the corresponding nine-digit hash code on the standard output. .TP .B spellin Reads .I n hash codes from the standard input and writes a compressed spelling list on the standard output. .TP .B hashcheck Reads a compressed .I spelling\(rulist and recreates the nine-digit hash codes for all the words in it; it writes these codes on the standard output. .br .ne 4v .SH FILES .PD 0 .TP "\w'H_SPELL=/usr/lib/spell/spellhist 'u" .SM D\(ruSPELL\*S=/usr/lib/spell/hlist[ab] hashed spelling lists, Amda\fR, dashed line; or .br \fBld\fR, long-dashed line .br .TP 12 \fItext\fR is a character string surrounded by quotes. The characters between the quotes become the contents of the box. To include a quote within a box it must be escaped (\fB\\"\fR). .TP 12 \fImark\fR is a character string (surrounded by quotes if it contains spaces), with included dots escaped. The string is put above the top right corner of the box. A quote or a dot within a \fImark\fR must be escaped. .sp .RE .RS 10 Entry example: 1.1 b,da "\s-1ABC\s+1" \s-1DEF\s+1 .br Entries may span more than one line by escaping the new-line character (\fB\\new-line\fR). .sp Comments are surrounded by the \fB/\(**\fR,\fB\(**/\fR pair. They may appear anywhere in a \s-1TTOC\s+1. .sp Options: .TP 5 \fBc\fR Use text as entered, (default is all upper case). .TP 5 \fBd\fR Connect the boxes with diagonal lines. .TP 5 \fBh\fIn\fR Horizontal interbox space is \fIn\fR\^% of box width. .TP 5 \fBi\fR Suppress the box \fIid\fR. .TP 5 \fBm\fR Suppress th above r\fIx\fP replace single char with \fIx\fP R replace characters .TE .SS "Operators (double to affect lines)" .TS aw(0.5i)b aw(2.0i). d delete c change < left shift > right shift ! filter through command \&\= indent for \s-2LISP\s0 y yank lines to buffer .TE .SS "Miscellaneous operations" .TS aw(0.5i)b aw(2.0i). C change rest of line D delete rest of line s substitute chars S substitute lines J join lines x delete characters X ... before cursor Y yank lines .TE .SS "Yank and put" .TS aw(0.5i)b aw(2.0i). p put back lines P put before "\fIx\fPp put from buffer \fIx\fP "\fIx\fPy yank to buffer \fIx\fP "\fIx\fPd delete into buffer \fIx\fP .TE .SS "Undo, redo, retrieve" .TS aw(0.5i)b aw(2.0i). u undo last change U restore current line \fB.\fP repeat last change "\fId\fP\|p retrieve \fId\fP'th last delete .TE .SH SEE ALSO ex (1). .br ``Vi Quick Reference'' card. .br ``Text Editors'' in the .IR "\*(6) User's Guide" .BP .SH "WARNINGS AND BUGS" The version of .I vi that runs on the PDP-11 does not support the fu erican & British .TP .SM S\(ruSPELL\*S=/usr/lib/spell/hstop hashed stop list .TP .SM H\(ruSPELL\*S=/usr/lib/spell/spellhist history file .TP /usr/lib/spell/spellprog program .PD .SH SEE ALSO deroff(1), eqn(1), sed(1), sort(1), tbl(1), tee(1), troff(1). .SH BUGS The spelling list's coverage is uneven; new installations will probably wish to monitor the output for several months to gather local additions; typically, these are kept in a separate local file that is added to the hashed .I spelling\(rulist via .IR spellin . .br The British spelling feature was done by an American. .\" @(#)spell.1 1.7 e box \fImark\fR. .TP 5 \fBs\fR Do not compact boxes horizontally. .TP 5 \fBv\fIn\fR Vertical interbox space is \fIn\fR\^% of box height. .sp .RE .sp .SH "SEE ALSO" graphics(1G), gps(4). .\" @(#)toc.1g 1.4 ll command set due to space limitations. The commands which are not supported are detailed in the ``Text Editors'' section of the \f2\*(6) User's Guide\f1. The most notable commands which are missing are the macro and abbreviation facilities. .PP Software tabs using \fB^T\fR work only immediately after the .I autoindent. .PP Left and right shifts on intelligent terminals don't make use of insert and delete character operations in the terminal. .PP The .I wrapmargin option can be fooled since it looks at output columns when blanks are typed. If a long word passes through the margin and onto the next line without a break, then the line won't be broken. .PP Insert/delete within a line can be slow if tabs are present on intelligent terminals, since the terminals need help in doing this correctly. .PP Saving text on deletes in the named buffers is somewhat inefficient. .PP The .I source command does not work when executed as \fB:source\fR; there is no way to use the \fB:append\fR, \fB:change\fR, and \fB:insert\f.\" @(#)spellin.1 1.2 .so /usr/man/u_man/man1/spell.1  .TH TOUCH 1 .SH NAME touch \- update access and modification times of a file .SH SYNOPSIS .B touch [ .B \-amc ] [ mmddhhmm[yy] ] files .SH DESCRIPTION .I Touch\^ causes the access and modification times of each argument to be updated. If no time is specified (see .IR date (1)) the current time is used. The .B \-a and .B \-m options cause \fItouch\fR to update only the access or modification times respectively (default is .BR \-am ). The .B \-c option silently prevents .I touch\^ from creating the file if it did not previously exist. .PP The return code from .I touch\^ is the number of files for which the times could not be successfully modified (including files that did not exist and were not created). .SH SEE ALSO date(1), utime(2). .\" @(#)touch.1 1.3 R commands, since it is not possible to give more than one line of input to a \fB:\fR escape. To use these on a \fB:global\fR you must \fBQ\fR to \fIex\fR command mode, execute them, and then reenter the screen editor with .I vi or .I open. '\" e .TH SPLINE 1G .SH NAME spline \- interpolate smooth curve .SH SYNOPSIS .B spline [ options ] .SH DESCRIPTION .I Spline\^ takes pairs of numbers from the standard input as abscissas and ordinates of a function. It produces a similar set, which is approximately equally spaced and includes the input set, on the standard output. The cubic spline output (R. W. Hamming, .IR "Numerical Methods for Scientists and Engineers" , 2nd ed., pp.\ 349ff) has two continuous derivatives, and enough points to look smooth when plotted, for example by .IR graph (1G). .PP The following .I options\^ are recognized, each as a separate argument: .TP .5i .B \-a Supply abscissas automatically (they are missing from the input); spacing is given by the next argument, or is assumed to be 1 if next argument is not a number. .TP .B \-k The constant .I k\^ used in the boundary value computation: .RS .RS .EQ tdefine prime2 'sup down 20 \(fm\(fm' ndefine prime2 'sup \(fm\(fm' y sub 0 prime2 ~=~ ky sub 1 prime2 , ~~~~ y sub n prime2 ~=~ k.TH TPLOT 1G .SH NAME tplot \- graphics filters .SH SYNOPSIS .B tplot [ .BR \-T terminal [ .BR \-e " raster" ] ] .SH DESCRIPTION \fITplot\fR commands read plotting instructions (see .IR plot (4)) from the standard input and produce, on the standard output, plotting instructions suitable for a particular .IR terminal . If no .I terminal\^ is specified, the environment parameter .B .SM $TERM (see .IR environ (5)) is used. Known .IR terminal s are: .PP .PD 0 .TP 300 .SM DASI 300. .TP 300S .SM DASI 300s. .TP 450 .SM DASI 450. .TP 4014 Tektronix 4014. .TP ver Versatec D1200A. This version of .I plot\^ places a scan-converted image in .BR /usr/tmp/raster $$ and sends the result directly to the plotter device, rather than to the standard output. The .B \-e option causes a previously scan-converted file .I raster\^ to be sent to the plotter. .PD .SH FILES /usr/lib/t300 .br /usr/lib/t300s .br /usr/lib/t450 .br /usr/lib/t4014 .br /usr/lib/vplot .br /usr/tmp/raster$$ .SH SEE ALSO plot(3X), plot(4), term(5). .\" @(#)tpl .TH VPR 1 .SH NAME vpr \- Versatec printer spooler .SH SYNOPSIS .B vpr [ options ] [ files ] .SH DESCRIPTION .I Vpr\^ causes the named .I files\^ to be queued for printing on a Versatec printer. If no names appear, the standard input is assumed; thus .I vpr\^ may be used as a filter. .PP The following options may be given (each as a separate argument and in any order) before any filename arguments: .PP .PD 0 .TP 7 .B \-c Make a copy of the file to be sent before returning to the user. .TP 7 .B \-r Remove the file after sending it. .TP 7 .B \-m When printing is complete, report that fact by .IR mail (1). .TP 7 .B \-n Do not report the completion of printing by .IR mail (1). This is the default option. .TP 7 .BI \-f file Use .I file as a dummy filename to report back in the mail. (This is useful for distinguishing multiple runs, especially when .I vpr\^ is being used as a filter). .TP 7 .BR \-p " [ \fB\-e\fP \fIraster\fP ]" Use the plot filter .I vplot\^ to output files produced by .IR graph (1G). The .B \-e opy sub n-1 prime2 .EN .RE is set by the next argument (default .I k\^ = 0). .RE .TP .5i .B \-n Space output points so that approximately .I n\^ intervals occur between the lower and upper .I x\^ limits (default .I n\^ = 100). .TP .B \-p Make output periodic, i.e., match derivatives at ends. First and last input values should normally agree. .TP .B \-x Next 1 (or 2) arguments are lower (and upper) .I x\^ limits. Normally, these limits are calculated from the data. Automatic abscissas start at lower limit (default 0). .SH SEE ALSO graph(1G). .SH DIAGNOSTICS When data is not strictly monotone in .IR x , .I spline\^ reproduces the input without interpolating extra points. .SH BUGS A limit of 1,000 input points is enforced silently. .\" @(#)spline.1g 1.4 ot.1g 1.3 tion causes a previously scan-converted file, .IR raster\^ , to be sent to the Versatec. .PD .SH EXAMPLES Two common uses are: .RS .PP .B "pr [ options ] file \|\(bv vpr" .RE .PP and .PP .RS .B "graph [ options ] file \|\(bv vpr \-p" .RE .PP .SH FILES .PD 0 .TP 20 /etc/passwd user's identification and accounting data .TP /usr/spool/vpd/\(** spool area .TP /usr/lib/vpd line printer daemon .TP /usr/lib/vpd.pr print filter .TP /usr/lib/vplot plot filter .PD .SH SEE ALSO lpr(1), tplot(1G). .\" @(#)vpr.1 1.2  .TH SPLIT 1 .SH NAME split \- split a file into pieces .SH SYNOPSIS .B split [ .B \-\fIn ] [ file [ name ] ] .SH DESCRIPTION .I Split reads .I file and writes it in .IR n -line pieces (default 1000 lines) onto a set of output files. The name of the first output file is .I name with .B aa appended, and so on lexicographically, up to .B zz (a maximum of 676 files). .I Name cannot be longer than 12 characters. If no output name is given, .B x is default. .PP If no input file is given, or if .B \- is given, the standard input file is used. .SH SEE ALSO bfs(1), csplit(1). .\" @(#)split.1 1.3 .TH TR 1 .SH NAME tr \- translate characters .SH SYNOPSIS .B tr [ .B \-cds ] [ string1 [ string2 ] ] .SH DESCRIPTION .I Tr\^ copies the standard input to the standard output with substitution or deletion of selected characters. Input characters found in .I string1\^ are mapped into the corresponding characters of .IR string2 . Any combination of the options .B \-cds may be used: .TP 8 .B \-c Complements the set of characters in .I string1\^ with respect to the universe of characters whose .SM ASCII codes are 001 through 377 octal. .TP .B \-d Deletes all input characters in .IR string1 . .TP .B \-s Squeezes all strings of repeated output characters that are in .I string2\^ to single characters. .PP The following abbreviation conventions may be used to introduce ranges of characters or repeated characters into the strings: .TP 8 .B [\^a\-z\^] Stands for the string of characters whose .SM ASCII codes run from character .B a to character .BR z , inclusive. .TP .BI [\^a\(** n ] Stands for \fIn\fP repetitions of.TH WAIT 1 .SH NAME wait \- await completion of process .SH SYNOPSIS .B wait .SH DESCRIPTION Wait until all processes started with .B & have completed and report on abnormal terminations. .PP Because the .IR wait (2) system call must be executed in the parent process, the shell itself executes .IR wait , without creating a new process. .SH "SEE ALSO" sh(1). .SH BUGS This command cannot wait for processes of a 3-or-more-stage pipeline that are not children of the shell. .\" @(#)wait.1 1.4 .bd S B 3 .TH STAT 1G .SH NAME stat \- statistical network useful with graphical commands .SH SYNOPSIS node-name [options] [files] .SH DESCRIPTION .I Stat\^ is a collection of command level functions (nodes) that can be interconnected using .IR sh (1) to form a statistical network. The nodes reside in .B /usr/bin/graf (see .IR graphics (1G)). Data is passed through the network as sequences of numbers (vectors), where a number is of the form: .PP .RS 5 [sign]\|(digits)\|(.digits)\|[\fBe\^\fR[sign]\^digits] .RE .PP evaluated in the usual way. Brackets and parentheses surround fields. All fields are optional, but at least one of the fields surrounded by parentheses must be present. Any character input to a node that is not part of a number is taken as a delimiter. .PP .I Stat\^ nodes are divided into four classes. .RS 5n .TP 5 \(bu \fITransformers\fR map input vector elements into output vector elements. .TP 5 \(bu \fISummarizers\fR calculate statistics of a vector. .TP 5 \(bu \fITranslators\fR convert among fo  \fBa\fP. If the first digit of .I n\^ is .BR 0 , .I n\^ is considered octal; otherwise, .I n\^ is taken to be decimal. A zero or missing .I n\^ is taken to be huge; this facility is useful for padding .IR string2 . .PP The escape character .B \e may be used as in the shell to remove special meaning from any character in a string. In addition, .B \e followed by 1, 2, or 3 octal digits stands for the character whose .SM ASCII code is given by those digits. .PP The following example creates a list of all the words in \fIfile1\fP, one per line, in \fIfile2\fP. A word is taken to be a maximal string of alphabetics. The strings are quoted to protect the special characters from interpretation by the shell; 012 is the .SM ASCII code for new line. .PP .ti +8 \f3tr \|\-cs \|"[A\-Z][a\-z]" \|"[\\012\(**]" \|<\f2file1\f3 \|>\f2file2\f1 .SH "SEE ALSO" ed(1), sh(1), ascii(5). .SH BUGS Won't handle .SM ASCII .SM .B NUL in .I string1 or .IR string2 ; always deletes .SM .B NUL from input. .\" @(#)tr.1 1.3 .TH WC 1 .SH NAME wc \- word count .SH SYNOPSIS .B wc [ .B \-lwc ] [ names ] .SH DESCRIPTION .I Wc\^ counts lines, words and characters in the named files or in the standard input if no .I names\^ appear. It also keeps a total count for all named files. A word is a maximal string of characters delimited by spaces, tabs, or new-line characters. .PP The options .BR l , .BR w , and .B c may be used in any combination to specify that a subset of lines, words, and characters are to be reported. The default is .BR \-lwc . .PP When .I names\^ are specified on the command line, they are printed along with the counts. .\" @(#)wc.1 1.4 rmats. .TP 5 \(bu \fIGenerators\fR are sources of definable vectors. .RE .PP Below is a list of synopses for .I stat\^ nodes. Most nodes accept options indicated by a leading minus (\fB\-\fR). In general, an option is specified by a character followed by a value, such as \fBc5\fR. This is interpreted as \fBc\fR := 5 (\fBc\fR is assigned 5). The following keys are used to designate the expected type of the value: .RS 5n .TP 8 \f3c\fR character .TP 8 \f3i\fR integer .TP 8 \f3f\fR floating point or integer .TP 8 \f3file\fR filename .TP 8 \f3string\f1 string of characters, surrounded by quotes to include a \fIshell\fR argument delimiter .RE .PP Options without keys are flags. Since all nodes except .I generators\^ accept files as input, this element is not indicated in the synopses. .PP .IR Transformers : .RS 5n .TP 10 .B abs [\|\fB\-c\fIi\fR\|] \c \- absolute value .br \fBc\fRolumns (similarly for \-\fBc\fR options that follow) .TP 10 .B af [\|\fB\-\c .BI c i\^ .B "t v"\c \|\|] \c \c \- arithmetic functio.TH TROFF 1 .SH NAME troff \- typeset text .SH SYNOPSIS .B troff [ options ] [ files ] .SH DESCRIPTION .I Troff\^ formats text contained in .I files\^ (standard input by default). Its capabilities are described in the ``NROFF and TROFF User's Manual'' section of the .IR "\*(6) Document Processing Guide" . .PP An argument consisting of a minus .RB ( \- ) is taken to be a filename corresponding to the standard input. The .IR options , which may appear in any order, but must appear before the .IR files , are: .PP .PD 0 .TP "\w'\f3\-m\fP\f2name\fP\^\ \ 'u" .BI \-o list\^ Print only pages whose page numbers appear in the .I list\^ of numbers and ranges, separated by commas. A range .IB N \- M\^ means pages .I N\^ through .IR M ; an initial .BI \- N\^ means from the beginning to page .IR N ; and a final .IB N \- means from .I N\^ to the end. (See .SM .I BUGS\^ below.) .SP .TP .BI \-n N\^ Number first generated page .IR N . .SP .TP .BI \-s N\^ Stop every .I N\^ pages. .I Troff\^ will stop the phototypesetter every . .tr ~" .TH WHAT 1 .SH NAME what \- identify \s-1SCCS\s+1 files .SH SYNOPSIS .B what files .SH DESCRIPTION .I What\^ searches the given files for all occurrences of the pattern that .IR get (1) substitutes for %\&Z% (this is \fB@\&(#)\fR at this printing) and prints out what follows until the first .BR ~ , .BR > , new-line, .BR \e , or null character. For example, if the C program in file \fBf.c\fR contains .PP .RS 5 \f3char ident[] = "\|@\&(#)identification information\|";\f1 .RE .PP and \fBf.c\fR is compiled to yield \fBf.o\fR and \fBa.out\fR, then the command .PP .RS 5 \f3what\| f.c\| f.o\| a.out\f1 .RE .PP prints .PP .RS 5 .TP 8 \f3f.c:\f1 .br \f2identification information\f1 .TP 8 \f3f.o:\f1 .br \f2identification information\f1 .TP 8 \f3a.out:\f1 .br \f2identification information\f1 .RE .PP .I What\^ is intended to be used in conjunction with the \*(S) command .IR get (1), which automatically inserts identifying information, but it can also be used where the information is inserted manually. .SH SEE ALSO n .br .BR t "itled output, " v erbose .TP 10 .B ceil [\|\fB\-c\fIi\fR\|] \c \- round up to next integer .TP 10 .B cusum [\|\fB\-c\fIi\fR\|] \c \- cumulative sum .TP 10 .B exp [\|\fB\-c\fIi\fR\|] \c \- exponential .TP 10 .B floor [\|\fB\-c\fIi\fR\|] \c \- round down to next integer .TP 10 .B gamma [\|\fB\-c\fIi\fR\|] \c \- gamma .TP 10 .B list [\|\fB\-c\fIi\fB d\fIstring\fR\|] \c \- list vector elements .br .BR d elimiter(s) .TP 10 .B log [\|\fB\-c\fIi\fB b\fIf\fR\|\|] \c \- logarithm .br \fBb\fRase .TP 10 .B mod [\|\fB\-c\fIi\fB m\fIf\fR\|\|] \c \- modulus .br \fBm\fRodulus .TP 10 .B pair [\|\fB\-c\fIi\fB F\fIfile\fB x\fIi\fR\|] \c \- pair elements .br \fBF\fRile containing base vector, \fBx\fR group size .TP 10 .B power [\|\fB\-c\fIi\fB p\fIf\fR\|\|] \c \- raise to a power .br \fBp\fRower .TP 10 .B root [\|\fB\-c\fIi\fB r\fIf\fR\|\|] \c \- take a root .br \fBr\fRoot .TP 10 .B round [\|\fB\-\c .BI c i\| p i\| s i\^\c \|\|] \c \- round to nearest integer, .5 rounds to 1 .br .BR p laces\ after\ decimal\ point, I N\^ pages, produce a trailer to allow changing cassettes, and resume when the typesetter's start button is pressed. .SP .TP .BI \-r aN\^ Set register .I a\^ (which must have a one-character name) to .IR N . .SP .TP .B \-i Read standard input after .I files\^ are exhausted. .SP .TP .B \-q Invoke the simultaneous input-output mode of the .B \&.rd request. .SP .TP .B \-z Print only messages generated by .B \&.tm (terminal message) requests. .SP .TP .BI \-m name\^ Prepend to the input .I files\^ the non-compacted (\s-1ASCII\s+1 text) macro file .BI /usr/lib/tmac/tmac. name\^\f1.\fP .SP .TP .BI \-c name\^ Prepend to the input .na .I files\^ the compacted macro files .BR /usr/lib/macros/cmp. [ nt ] .\c .RB [ dt ] .\f2name\fP\^ and .BR /usr/lib/macros/ucmp. [ nt ] .\f2name\fP\^ . .ad .SP .TP .BI \-k name\^ Compact the macros used in this invocation of .IR troff , placing the output in files .RB [ dt ] .\f2name\fP\^ in the current directory (see the ``NROFF/TROFF User's Manual'' in the .I "\*(6) Document Processingget(1), help(1). .SH DIAGNOSTICS Use .IR help (1) for explanations. .SH BUGS It is possible that an unintended occurrence of the pattern .B @\&(#) could be found just by chance, but this causes no harm in nearly all cases. .tr ~~ .\" @(#)what.1 1.4  .BR s ignificant\ digits .TP 10 .B siline [\|\fB\-\c .BI c i\| i f\| n i\^\c .BI s f\^\c \|\|] \c \- generate a line given slope and intercept .br .BR i "ntercept, " n "umber of positive integers, " s "lope" .TP 10 .B sin [\|\fB\-c\fIi\fR\|] \c \- sine .TP 10 .B subset [\|\fB\-a\fIf \fBb\fIf \fBc\fIi \fBF\fIfile \fBi\fIi \fBl\fIf \fBnl np p\fIf \fBs\fIi \fBt\fIi\fR\|] \c \- generate a subset .br \fBa\fRbove, \fBb\fRelow, \fBF\fRile with master vector, \fBi\fRnterval, \fBl\fReave, .RB "master contains element " n "umbers to " l eave, .RB "master contains element " n "umbers to " p ick, \fBp\fRick, \fBs\fRtart, \fBt\fRerminate .RE .PP .IR Summarizers : .RS 5n .TP 10 .B bucket [\|\fB\-a\fIi \fBc\fIi \fBF\fIfile \fBh\fIf \fBi\fIi \fBl\fIf\fB n\fIi\fR\|] \c \- break into buckets .br \fBa\fRverage size, \fBF\fRile containing bucket boundaries, \fBh\fRigh, \fBi\fRnterval, \fBl\fRow, \fBn\fRumber .TP 10 .B cor [\|\fB\-F\fIfile\fR\|] \c \- correlation coefficient .br \fBF\fRile containing base vector .TP 10 .B hilo .R Guide" for detailed information about compacting macro files). .SP .TP .B \-t Direct output to the standard output instead of the phototypesetter. .SP .TP .B \-f Refrain from feeding out paper and stopping phototypesetter at the end of the run. .SP .TP .B \-w Wait until phototypesetter is available, if it is currently busy. .SP .TP .B \-b Report whether the phototypesetter is busy or available. No text processing is done. .SP .TP .B \-a Send a printable .SM ASCII approximation of the results to the standard output. .SP .TP .BI \-p N\^ Print all characters in point size .I N\^ while retaining all prescribed spacings and motions, to reduce phototypesetter elapsed time. .br .SP .ne 2 .TP .B \-g Prepare output for the Murray Hill Computation Center phototypesetter and direct it to the standard output (this option is not usable on most systems). This option is not compatible with the .B \-s option; furthermore, when this option is invoked, all .B \&.fp (font position) requests (if any) in the .I troff\^ input mus.TH WHO 1 .SH NAME who \- who is on the system .SH SYNOPSIS .B who .RB [\| \-uTlpdbrtas \|] [ file ] .PP .B "who am i" .SH DESCRIPTION .I Who lists the user's name, terminal line, login time, elapsed time since activity occurred on the line, and the process-\s-1ID\s+1 of the command interpreter (shell) for each current system user. It examines the .B /etc/utmp file to obtain its information. If \fIfile\fP is given, that file is examined. Usually, \fIfile\fP is .BR /etc/wtmp , which contains a history of all the logins since the file was last created. .PP .I Who with the .B am i option identifies the invoking user. .PP Except for the default .B \-s option, the general format for output entries is: .PP .RS \f2name \|[\^state\^] \|line \|time \|activity \|pid \|[\^comment\^] \|[\^exit\^]\f1 .RE .PP With options, .I who lists logins, logoffs, reboots, and changes to the system clock, as well as other processes spawned by the \fIinit\fP process. These options are: .TP 6 .B \-u List information about users who areB [\| "\- h l o ox oy" \|\|] \c \- find high and low values .br .BR h "igh only, " l "ow only, " o "ption form, "\c .BR o "ption form with " x " prepended, "\c .BR o "ption form with " y " prepended " .TP 10 .B lreg [\|\fB\-\c .BI F file\^ .B i o s\c \|\|] \c \- linear regression .br .BR F "ile containing base vector, " i "ntercept only, " .BR o "ption form for" .I siline\^\c .RB ", " s "lope only" .TP 10 .B mean [\|\fB\-f\fIf\fB n\fIi\fB p\fIf\fR\|\|] \c \- (trimmed) arithmetic mean .br \fBf\fRraction, \fBn\fRumber, \fBp\fRercent .TP 10 .B point [\|\fB\-f\fIf\fB n\fIi\fB p\fIf\fB s\fR\|\|] \c \- point from empirical cumulative density function .br \fBf\fRraction, \fBn\fRumber, \fBp\fRercent, \fBs\fRorted input .TP 10 .B prod \c \- internal product .TP 10 .B qsort [\|\fB\-c\fIi\fR\|] \c \- quick sort .TP 10 .B rank \c \- vector rank .TP 10 .B total \c \- sum total .TP 10 .B var \c \- variance .RE .PP .IR Translators : .RS 5n .TP 10 .B bar [\|\fB\-\c .BI "a b f g r" i\^\| w i\^\| x f\^ .BI "xa y" f\|\| "ya yl" t come before the first break, and .I no\^ .B \&.tl requests may come before the first break. .SP .TP .BI \-T name\^ Use font-width tables for device .I name\^ (the font tables are found in .BI /usr/lib/font/ name /\(**\f1). Currently, no .IR name s are supported. .PD .SH FILES .ta \w'/usr/lib/tmac/tmac\f3.\fP\(**\ \ 'u .PD 0 /usr/lib/suftab suffix hyphenation tables .PP /tmp/ta$# temporary file .PP /usr/lib/tmac/tmac\f3.\fP\(** standard macro files and pointers .PP /usr/lib/macros/\(** standard macro files .PP /usr/lib/font/\(** font width tables for .I troff\^ .PD .DT .SH SEE ALSO .PD 0 ``NROFF/TROFF User's Manual'' in the .IR "\*(6) Document Processing Guide" . .PP cw(1), eqn(1), mmt(1), nroff(1), tbl(1), tc(1), mm(5), mv(5). .PD .SH BUGS .I Troff\^ believes in Eastern Standard Time; as a result, depending on the time of the year and on your local time zone, the date that .I troff\^ generates may be off by one day from your idea of what the date is. .PP When .I troff\^ is used with the .BI \-o list\^ optio currently logged in. The .I name is the user's login name. The .I line is the name of the line as found in the directory .BR /dev . The .I time is the time that the user logged in. The .I activity is the number of hours and minutes since activity last occurred on that particular line. A dot .RB ( \^.\^ ) indicates that the terminal has seen activity in the last minute and is therefore ``current''. If more than twenty-four hours have elapsed or the line has not been used since boot time, the entry is marked .RB old . This field is useful when trying to determine whether a person is working at the terminal or not. The .I pid is the process-\s-1ID\s+1 of the user's shell. The .I comment is the comment field associated with this line as found in .B /etc/inittab (see .IR inittab (4)). This file can contain information such as where the terminal is located, the telephone number of the dataset, or type of terminal if hard-wired. .TP 6 .B \-T Print the .I state of the terminal line. The .I state describes whether so.TH GETUID 2 .SH NAME getuid, geteuid, getgid, getegid \- get real user, effective user, real group, and effective group \s-1ID\s+1s .SH SYNOPSIS .B int getuid (\|) .PP .B int geteuid (\|) .PP .B int getgid (\|) .PP .B int getegid (\|) .SH DESCRIPTION .I Getuid\^ returns the real user .SM ID of the calling process. .PP .I Geteuid\^ returns the effective user .SM ID of the calling process. .PP .I Getgid\^ returns the real group .SM ID of the calling process. .PP .I Getegid\^ returns the effective group .SM ID of the calling process. .SH "SEE ALSO" intro(2), setuid(2). .\" @(#)getuid.2 1.2 n an .I exec\^ is executed, but remains on in child and parent both after a .IR fork . Profiling is turned off if an update in .I buff\^ would cause a memory fault. .SH RETURN VALUE Not defined. .SH "SEE ALSO" prof(1), monitor(3C). .\" @(#)profil.2 1.5  meone else can write to that terminal. A .B + appears if the terminal is writable by anyone; a .B \- appears if it is not. .B Root can write to all lines having a .B + or a .B \- in the .I state field. If a bad line is encountered, a .B ? is printed. .TP 6 .B \-l List only those lines on which the system is waiting for someone to log in. The .I name field is .B \s-1LOGIN\s+1 in such cases. Other fields are the same as for user entries except that the .I state field doesn't exist. .TP 6 .B \-p List any other process which is currently active and has been previously spawned by .IR init . The .I name field is the name of the program executed by .I init as found in .BR /etc/inittab . The .IR state , .IR line , and .I activity fields have no meaning. The .I comment field shows the .I id field of the line from .B /etc/inittab that spawned this process. See .IR inittab (4). .TP 6 .B \-d Display all processes that have expired and have not been respawned by .IR init . The .I exit field appears for dead processes and.TH INTRO 2 .de {n .HP \\$1 \\$2 \\$3 .br .. .SH NAME intro \- introduction to system calls and error numbers .SH SYNOPSIS .B #include \| .SH DESCRIPTION This section describes all the system calls. Most of these calls have one or more error returns. An error condition is indicated by an otherwise impossible returned value. This is almost always \-1; the individual descriptions specify the details. An error number is also made available in the external variable .IR errno . .I Errno\^ is not cleared on successful calls, so it should be tested only after an error has been indicated. .PP All the possible error numbers are not listed in each system call description because many errors are possible for most of the calls. The following is a complete list of the error numbers and their names as defined in .BR . .{n 1 \s-1EPERM\s+1 "Not owner" Typically this error indicates an attempt to modify a file in some way forbidden except to its owner or superuser. It is also returned for attempts by ordi.TH PTRACE 2 .SH NAME ptrace \- process trace .SH SYNOPSIS .BR "int ptrace (" "request, pid, addr, data" ); .br .BR int " request, pid, addr, data" ; .SH DESCRIPTION .I Ptrace\^ provides a means by which a parent process may control the execution of a child process. Its primary use is for the implementation of breakpoint debugging; see .IR sdb (1). The child process behaves normally until it encounters a signal (see .IR signal (2) for a list of signals), at which time it enters a stopped state and its parent is notified via .IR wait (2). When the child is in the stopped state, its parent can examine and modify its ``core image'' using .IR ptrace . The parent also can cause the child either to terminate or continue, with the possibility of ignoring the signal that caused it to stop. .PP The .I request\^ argument determines the precise action to be taken by .I ptrace\^ and is one of the following: .RS .TP 5 .B 0 This request must be issued by the child process if it is to be traced by its parent. It turns on  contains the termination and exit values (as returned by .IR wait (2)), of the dead process. This can be useful in determining why a process terminated. .TP 6 .B \-b Indicate the time and date of the last reboot. .TP 6 .B \-r Indicate the current .I run-level of the .I init process. Following the run-level and date information are three fields which indicate the current state, the number of times that state was previously entered, and the previous state. .TP 6 .B \-t Indicate the last change to the system clock (via the .IR date (1) command) by .BR root . See .IR su (1). .TP 6 .B \-a Process .B /etc/utmp or the named .I file with all options turned on. .TP 6 .B \-s List only the .IR name , .I line and .I time fields; this is the default. .SH FILES /etc/utmp .br /etc/wtmp .br /etc/inittab .SH "SEE ALSO" init(1M) in the .IR "\*(6) Administrator's Manual" . .br date(1), login(1), mesg(1), su(1), wait(2), inittab(4), utmp(4). .\" @(#)who.1 1.5  nary users to do things allowed only to the superuser. .{n 2 \s-1ENOENT\s+1 "No such file or directory" This error occurs when a filename is specified and the file should exist but doesn't, or when one of the directories in a pathname does not exist. .{n 3 \s-1ESRCH\s+1 "No such process" No process can be found corresponding to that specified by the process identifier .RI ( "pid" ) in .IR "kill" (2) or .IR ptrace (2). .{n 4 \s-1EINTR\s+1 "Interrupted system call" An asynchronous signal (such as interrupt or quit), which the user has elected to catch, occurred during a system call. If execution is resumed after processing the signal, it will appear as if the interrupted system call returned this error condition. .{n 5 \s-1EIO\s+1 "I/O error" Some physical I/O error. This error may in some cases occur on a call following the one to which it actually applies. .{n 6 \s-1ENXIO\s+1 "No such device or address" I/O on a special file refers to a subdevice which does not exist; or the I/O is beyond the limits of the dethe child's trace flag that stipulates that the child should be left in a stopped state upon receipt of a signal rather than the state specified by the .I func\^ argument of .IR signal (2). The .IR pid ", " addr ", and " data arguments are ignored and a return value is not defined for this request. Peculiar results ensue if the parent does not expect to trace the child. .RE .PP The remainder of the requests can only be used by the parent process. For each, .I pid\^ is the process .SM ID of the child. The child must be in a stopped state before these requests are made. .RS .TP 5 .B 1, 2 With these requests, the word at location .I addr\^ in the address space of the child is returned to the parent process. If I and D space are separated, request .B 1 returns a word from I space, and request .B 2 returns a word from D space. If I and D space are not separated, either request .B 1 or request .B 2 may be used with equal results. The .I data\^ argument is ignored. These two requests fail if .I addr\^ is not the sta.TH WRITE 1 .SH NAME write \- write to another user .SH SYNOPSIS .B write user [ line ] .SH DESCRIPTION .I Write copies lines from your terminal to that of another user. When first called, it sends the message: .PP .RS .B Message from .I yourname .BR (tty ?? ) [ .I date .RB ] \&.\|.\|. .RE .PP to your intended recipient. When it has successfully completed the connection, it sends two bells to your terminal to indicate that what you are typing is being sent. .PP The recipient of the message should write back at this point. Communication continues until an end of file is read from the terminal or an interrupt is sent. At that point .I write writes \fB\s-1EOT\s+1\fP on the other terminal and exits. .PP If you want to write to a user who is logged in more than once, the .I line argument may be used to indicate which line or terminal is to be connected (e.g., .BR tty00 ); otherwise, the first instance of the user found in .B /etc/utmp is assumed and the following message is posted: .PP .RS .nf .IB "usevice. This error may also occur when, for example, a tape drive is not on-line or no disk pack is loaded on a drive. .{n 7 \s-1E2BIG\s+1 "Arg list too long" An argument list longer than 5,120 bytes is presented to a member of the .IR exec (2) family. .{n 8 \s-1ENOEXEC\s+1 "Exec format error" A request is made to execute a file which, although it has the appropriate permissions, does not start with a valid magic number (see .IR a.out (4)). .{n 9 \s-1EBADF\s+1 "Bad file number" Either a file descriptor refers to no open file or a read (respectively write) request is made to a file which is open only for writing (respectively reading). .{n 10 \s-1ECHILD\s+1 "No child processes" A .IR wait (2) was executed by a process that had no existing or unwaited-for child processes. .{n 11 \s-1EAGAIN\s+1 "No more processes" A .IR fork (2) failed because the system's process table is full or the user is not allowed to create any more processes. .{n 12 \s-1ENOMEM\s+1 "Not enough space" During an .IR exec (2), .IR brk (2), or  rt address of a word, in which case a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM \%EIO. .TP 5 .B 3 With this request, the word at location .I addr\^ in the child's .SM USER area in the system's address space (see .B ) is returned to the parent process. Addresses in this area range from 0 to 1024 on the .SM PDP\*S-11s and 0 to 2048 on the .SM 3B20S\*S, .SM VAX\*S, and M68000. The .I data\^ argument is ignored. This request fails if .I addr\^ is not the start address of a word or is outside the .SM USER area, in which case a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM EIO. .TP 5 .B 4, 5 With these requests, the value given by the .I data\^ argument is written into the address space of the child at location .IR addr . If I and D space are separated, request 4 writes a word into I space and request 5 writes a word into D space. If I and D space are not separated, either request 4 or request 5 may be used with eqr" "is logged on more than one place." .BI "You are connected to" " terminal." .B "Other locations are:" .I terminal .fi .RE .PP Permission to write may be denied or granted by use of the .I mesg(1) command. Writing to others is normally allowed by default. Certain commands, in particular .IR nroff (1) and .IR pr (1) disallow messages in order to prevent interference with their output; however, if the user has superuser permissions, messages can be forced onto a write-inhibited terminal. .PP If the character \fB!\fP is found at the beginning of a line, .I write calls the shell to execute the rest of the line as a command. .PP The following protocol is suggested for using .IR write : when you first \fIwrite\fP to another user, wait for them to \fIwrite\fP back before starting to send. Each person should end a message with a distinctive signal (i.e., .B (o) for ``over'') so that the other person knows when to reply. The signal .B (oo) (for ``over and out'') is suggested when conversation is to be termi.IR sbrk (2) call, a program asked for more space than the system is able to supply. This is not a temporary condition; the maximum space size is a system parameter. The error may also occur if the arrangement of text, data, and stack segments requires too many segmentation registers, or if there is not enough swap space during a .IR fork (2). .{n 13 \s-1EACCES\s+1 "Permission denied" An attempt was made to access a file in a way forbidden by the protection system. .{n 14 \s-1EFAULT\s+1 "Bad address" The system encountered a hardware fault in attempting to use an argument of a system call. .{n 15 \s-1ENOTBLK\s+1 "Block device required" A non-block file was mentioned where a block device was required, e.g., in .IR mount (2). .{n 16 \s-1EBUSY\s+1 "Mount device busy" An attempt was made to mount a device that was already mounted or an attempt was made to dismount a device on which there is an active file (open file, current directory, mounted-on file, active text segment). This error also occurs if an attempt isual results. Upon successful completion, the value written into the address space of the child is returned to the parent. These two requests fail if .I addr\^ is a location in a pure procedure space and another process is executing in that space, or if .I addr\^ is not the start address of a word. Upon failure a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM EIO\*S. .TP 5 .B 6 With this request, a few entries in the child's .SM USER area can be written. .I Data\^ gives the value that is to be written and .I addr\^ is the location of the entry. The few entries that can be written are: .RS .IP the general registers (i.e., registers 0\-11 on the .SM 3B20S, registers 0\-7 on .SM PDP\*S-11s, and registers 0\-15 on the .SM VAX\*S and M68000) .IP certain bits of the Processor Status Word on the M68000 and M68010 (i.e., bits 0\-4 and 15) .IP the condition codes of the Processor Status Word on the .SM 3B20S . .IP the floating point status register and six floating point regist nated. .SH FILES .PD 0 .TP 9 /etc/utmp to find user .TP /bin/sh to execute \fB!\fP .PD .SH SEE ALSO mail(1), mesg(1), nroff(1), pr(1), sh(1), who(1). .br ``Primer'' in the \f2\*(6) User's Guide\f1. .SH DIAGNOSTICS .B "user not logged in" means the person you are trying to .I write to is not logged in. .\" @(#)write.1 1.6  made to enable accounting when it is already enabled. .{n 17 \s-1EEXIST\s+1 "File exists" An existing file was mentioned in an inappropriate context, e.g., .IR link (2). .{n 18 \s-1EXDEV\s+1 "Cross-device link" A link to a file on another device was attempted. .{n 19 \s-1ENODEV\s+1 "No such device" An attempt was made to apply an inappropriate system call to a device; e.g., read a write-only device. .{n 20 \s-1ENOTDIR\s+1 "Not a directory" A non-directory was specified where a directory is required; e.g., in a path prefix or as an argument to .IR chdir (2). .{n 21 \s-1EISDIR\s+1 "Is a directory" An attempt was made to write on a directory. .{n 22 \s-1EINVAL\s+1 "Invalid argument" Some invalid argument (e.g., dismounting a non-mounted device; mentioning an undefined signal in .IR signal (2), or .IR kill (2); reading or writing a file for which .IR lseek (2) has generated a negative pointer). Also set by the math functions described in the (3M) entries of this manual. .{n 23 \s-1ENFILE\s+1 "File table overflowers on .SM PDP\*S-11s .IP certain bits of the Processor Status Word on .SM PDP\*S-11s (i.e, bits 0\-4, and 8\-11) .IP certain bits of the Processor Status Longword on the .SM VAX (i.e., bits 0\-7, 16\-20, and 30\-31) .RE .TP 5 .B 7 This request causes the child to resume execution. If the .I data\^ argument is 0, all pending signals, including the one that caused the child to stop, are canceled before it resumes execution. If the .I data\^ argument is a valid signal number, the child resumes execution as if it had incurred that signal; any other pending signals are canceled. The .I addr\^ argument must be equal to 1 for this request. Upon successful completion, the value of .I data\^ is returned to the parent. This request fails if .I data\^ is not 0 or a valid signal number, in which case a value of \-1 is returned to the parent process and the parent's .I errno\^ is set to .SM EIO\*S. .TP 5 .B 8 This request causes the child to terminate with the same consequences as .IR exit (2). .TP 5 .B 9 This request .TH XARGS 1 .SH NAME xargs \- construct argument list(s) and execute command .SH SYNOPSIS .B xargs [\|flags\|] [ command [\|initial-arguments\|] ] .SH DESCRIPTION .I Xargs\^ combines the fixed .I initial-arguments\^ with arguments read from standard input to execute the specified .I command\^ one or more times. The number of arguments read for each .I command\^ invocation and the manner in which they are combined are determined by the flags specified. .PP .I Xargs uses one's \fB\s-1$PATH\s+1\fP to search for \fIcommand\fR, which may be a shell file. If .I command\^ is omitted, .B /bin/echo is used. .PP Arguments read in from standard input are defined to be contiguous strings of characters delimited by one or more blanks, tabs, or new lines; empty lines are always discarded. Blanks and tabs may be embedded as part of an argument if escaped or quoted; characters enclosed in quotes (single or double) are taken literally, and the delimiting quotes are removed. Outside quoted strings a backslash .RB "(" \e ")" e " The system's table of open files is full, and temporarily .IR open (2) cannot be accepted. .{n 24 \s-1EMFILE\s+1 "Too many open files" No process may have more than 20 file descriptors open at a time. .{n 25 \s-1ENOTTY\s+1 "Not a typewriter" .{n 26 \s-1ETXTBSY\s+1 "Text file busy" An attempt was made to execute a pure-procedure program which is currently open for writing or reading. This error also indicates an attempt to open for writing a pure-procedure program that is being executed. .{n 27 \s-1EFBIG\s+1 "File too large" The size of a file exceeded the maximum file size (1,082,201,088 bytes) or .SM ULIMIT\*S; see .IR ulimit (2). .{n 28 \s-1ENOSPC\s+1 "No space left on device" During a .IR write (2) to an ordinary file, there is no free space left on the device. .{n 29 \s-1ESPIPE\s+1 "Illegal seek" An .IR lseek (2) was issued to a pipe. .{n 30 \s-1EROFS\s+1 "Read-only file system" An attempt to modify a file or directory was made on a device mounted read-only. .{n 31 \s-1EMLINK\s+1 "Too many links" An atsets the trace bit in the Processor Status Word of the child (i.e., bit 4 on .SM PDP\*S-11s; bit 30 on the .SM VAX\*S; bit 15 on the M68000) and then executes the same steps as listed above for request .BR 7 . The trace bit causes an interrupt upon completion of one machine instruction. This effectively allows single stepping of the child. On the .SM 3B20S there is no trace bit and this request returns an error. .br Note: the trace bit remains set after an interrupt on .SM PDP\*S-11s but is turned off after an interrupt on the .SM VAX\*S and M68000. .RE .PP To forestall possible fraud, .I ptrace\^ inhibits the set-user-id facility on subsequent .IR exec (2) calls. If a traced process calls .IR exec , it stops before executing the first instruction of the new image showing signal .SM .BR SIGTRAP . .SH GENERAL ERRORS .I Ptrace\^ in general fails if one or more of the following are true: .IP .I Request\^ is an illegal number. .SM \%[EIO] .IP .I Pid\^ identifies a child that does not exist or has not executed a scapes the next character. .PP Each argument list is constructed starting with the .IR initial-arguments , followed by some number of arguments read from standard input (Exception: see .B \-i flag). Flags .BR \-i , .BR \-l , and .BR \-n determine how arguments are selected for each command invocation. When none of these flags is coded, the .I initial-arguments\^ are followed by arguments read continuously from standard input until an internal buffer is full; then .I command\^ is executed with the accumulated args. This process is repeated until there are no more args. When there are flag conflicts (e.g., .B \-l and .BR \-n " are both given)," the last flag has precedence. .I Flag\^ values are: .TP 20 .BI \-l number\^ .I Command\^ is executed for each non-empty .I number\^ lines of arguments from standard input. The last invocation of .I command\^ is with fewer lines of arguments if fewer than .I number\^ remain. A line is considered to end with the first new-line .I unless\^ the last character of the line is tempt was made to make more than the maximum number of links (1000) to a file. .{n 32 \s-1EPIPE\s+1 "Broken pipe" An attempt was made to write on a pipe for which there is no process to read the data. This condition normally generates a signal; the error is returned if the signal is ignored. .{n 33 \s-1EDOM\s+1 "Math argument" The argument of a function in the math package (3M) is out of the domain of the function. .{n 34 \s-1ERANGE\s+1 "Result too large" The value of a function in the math package (3M) is not representable within machine precision. .{n 35 \s-1ENOMSG\s+1 "No message of desired type" An attempt was made to receive a message of a type that does not exist on the specified message queue; see .IR msgop (2). .{n 36 \s-1EIDRM\s+1 "Identifier Removed" This error is returned to processes that resume execution due to the removal of an identifier from the file system's name space (see .IR msgctl "(2), " semctl "(2), and " shmctl (2)). .SH "DEFINITIONS" .SS "Process \s-1ID\s+1" Each active process in the .I ptrace\^ with request .BR 0 . .SM \%[ESRCH] .SH SEE ALSO sdb(1), exec(2), signal(2), wait(2). .\" @(#)ptrace.2 1.7 a blank or a tab; a trailing blank/tab signals continuation through the next non-empty line. If .I number\^ is omitted, 1 is assumed. Option .B \-x is forced. .TP 20 .BI \-i replstr\^ Insert mode: .I command\^ is executed for each line from standard input, taking the entire line as a single arg, inserting it in .I initial-arguments\^ for each occurrence of .IR replstr . A maximum of 5 arguments in .I initial-arguments\^ may each contain one or more instances of .IR replstr . Blanks and tabs at the beginning of each line are thrown away. Constructed arguments may not grow larger than 255 characters, and option .B \-x is also forced. .B "{\|}" is assumed for .I replstr\^ if not specified. .TP 20 .BI \-n number\^ Execute .I command\^ using as many standard input arguments as possible, up to .I number\^ arguments maximum. Fewer arguments are used if their total size is greater than .I size\^ characters, and for the last invocation if there are fewer than .I number\^ arguments remaining. If option .B \-x is also c system is uniquely identified by a positive integer called a process .SM ID\*S. The range of this .SM ID is from 0 to 30,000. .SS "Parent Process \s-1ID\s+1" A new process is created by a currently active process; see .IR fork (2). The parent process .SM ID of a process is the process .SM ID of its creator. .SS "Process Group \s-1ID\s+1" Each active process is a member of a process group that is identified by a positive integer called the process group .SM ID\*S. This .SM ID is the process .SM ID of the group leader. This grouping permits the signaling of related processes; see .IR kill (2). .SS "Tty Group \s-1ID\s+1" Each active process can be a member of a terminal group that is identified by a positive integer called the tty group .SM ID\*S. This grouping is used to terminate a group of related processes upon termination of one of the processes in the group; see .IR exit (2) and .IR signal (2). .SS "Real User \s-1ID\s+1 and Real Group \s-1ID\s+1" Each user allowed on the system is identified by a positiv.TH READ 2 .SH NAME read \- read from file .SH SYNOPSIS .BR "int read (" "fildes, buf, nbyte" ) .br .BR int " fildes" ; .br .BR "char \(**" "buf" ; .br .BR unsigned " nbyte" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor obtained from a .IR creat , .IR open , .IR dup , .IR fcntl , or .I pipe\^ system call. .PP .I Read\^ attempts to read .I nbyte\^ bytes from the file associated with .I fildes\^ into the buffer pointed to by .IR buf . .PP On devices capable of seeking, the .I read\^ starts at a position in the file given by the file pointer associated with .IR fildes . Upon return from .IR read , the file pointer is incremented by the number of bytes actually read. .PP Devices that are incapable of seeking always read from the current position. The value of a file pointer associated with such a file is undefined. .PP Upon successful completion, .I read\^ returns the number of bytes actually read and placed in the buffer; this number may be less than .I nbyte\^ if the file is associated with a communicatio oded, each .I number\^ arguments must fit in the .I size\^ limitation, else .I xargs\^ terminates execution. .TP 20 .B \-t Trace mode: The .I command\^ and each constructed argument list are echoed to file descriptor 2 just prior to their execution. .TP 20 .B \-p Prompt mode: The user is asked whether to execute .I command\^ each invocation. Trace mode (\c .B \-t\c ) is turned on to print the command instance to be executed, followed by a \fB?.\|.\|.\fP prompt. A reply of .B y (optionally followed by anything) executes the command; anything else, including just a carriage return, skips that particular invocation of .IR command . .TP 20 .B \-x Causes .I xargs\^ to terminate if any argument list would be greater than .I size\^ characters; .B \-x is forced by the options .B \-i and .BR \-l . When none of the options .BR \-i , .BR \-l , or .B \-n is coded, the total length of all arguments must be within the .I size\^ limit. .TP 20 .BI \-s size\^ The maximum total size of each argument list is set to .I size\^ che integer called a real user .SM ID\*S. .PP Each user is also a member of a group. The group is identified by a positive integer called the real group .SM ID\*S. .PP An active process has a real user .SM ID and real group .SM ID that are set to the real user .SM ID and real group .SM ID\*S of the user responsible for the creation of the process. .SS "Effective User \s-1ID\s+1 and Effective Group \s-1ID\s+1" An active process has an effective user .SM ID and an effective group .SM ID that are used to determine file access permissions (see below). The effective user .SM ID and effective group .SM ID are equal to the process's real user .SM ID and real group .SM ID unless the process or one of its ancestors evolved from a file that had the set-user-\s-1ID\s+1 bit or set-group-\s-1ID\s+1 bit set; see .IR exec (2). .SS Superuser A process is recognized as a .I superuser\^ process and is granted special privileges if its effective user .SM ID is 0. .SS "Special Processes" The processes with a process .SM ID of 0 ann line (see .IR ioctl (2) and .IR termio (7)), or if the number of bytes left in the file is less than .I nbyte\^ bytes. A value of 0 is returned when an end-of-file has been reached. .PP When attempting to read from an empty pipe (or .SM FIFO\*S): .IP If .SM .B O_NDELAY is set, the read returns a 0. .IP If .SM .B O_NDELAY is clear, the read blocks until data is written to the file or the file is no longer open for writing. .PP When attempting to read a file associated with a tty that has no data currently available: .IP If .SM .B O_NDELAY is set, the read returns a 0. .IP If .SM .B O_NDELAY is clear, the read blocks until data becomes available. .PP .I Read\^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid file descriptor open for reading. .SM \%[EBADF] .IP .I Buf\^ points outside the allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a non-negative integer is returned indicating the number of bytes actually read. Otherwise, a \-1 is returned aracters; .I size\^ must be a positive integer less than or equal to 470. If .B \-s is not coded, 470 is taken as the default. Note that the character count for .I size\^ includes one extra character for each argument and the count of characters in the command name. .TP 20 .BI \-e eofstr\^ .I Eofstr\^ is taken as the logical end-of-file string. Underbar (\|_\|) is assumed for the logical \fB\s-1EOF\s+1\fP string if \fB\-e\fP is not coded. \fB\-e\fP with no .I eofstr\^ coded turns off the logical \fB\s-1EOF\s+1\fP string capability (underbar is taken literally). .I Xargs\^ reads standard input until either end-of-file or the logical \fB\s-1EOF\s+1\fP string is encountered. .PP .I Xargs\^ terminates if it receives a return code of .B \-1 from \fIcommand\fR or if it cannot execute .IR command . When .I command\^ is a shell program, it should explicitly .I exit\^ (see .IR sh (1)) with an appropriate value to avoid accidentally returning with .BR \-1 . .SH EXAMPLES The following command moves all files from direct d a process .SM ID of 1 are special processes and are referred to as .IR proc0 " and " proc1. .PP .I Proc0\^ is the scheduler. .I Proc1\^ is the initialization process .RI ( init ). Proc1 is the ancestor of every other process in the system and is used to control the process structure. .SS "Filename." Names consisting of 1 to 14 characters may be used to name an ordinary file, special file, or directory. .PP These characters may be selected from the set of all character values excluding \e0 (null) and the .SM ASCII code for .B / (slash). .PP Note that it is generally unwise to use .BR "*" , .BR "?" , .BR "[" , or .B "]" as part of filenames because of the special meaning attached to these characters by the shell; see .IR sh (1). Although permitted, it is advisable to avoid the use of unprintable characters in filenames. .SS "Pathname and Path Prefix" A pathname is a null-terminated character string starting with an optional slash .RB ( / ), followed by zero or more directory names separated by slashes, optioand .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), fcntl(2), ioctl(2), open(2), pipe(2), termio(7). .\" @(#)read.2 1.5 ory \f3$1\f1 to directory \f3$2\f1, and echoes each move command just before doing it: .PP .RS 10 .B "ls \|$1 \|| \|xargs \|\-i \|\-t \|mv \|$1/{\|} \|$2/{\|}" .RE .PP The following command combines the output of the parenthesized commands onto one line, which is then echoed to the end of the file \fIlog\fP: .PP .RS 10 .B "(logname; \|date; \|echo \|$0 \|$\(**) \|| \|xargs \|>>log" .RE .PP The user is asked which files in the current directory are to be archived. When the first command below is used, the files are archived into \fIarch\fP one at a time; when the second command is used, many files are archived at one time. .PP .RS 10 .B "\ \|\ \|ls \|| \|xargs \|\-p \|\-l \|ar \|r \|arch" .br .B "\ \|\ \|ls \|| \|xargs \|\-p \|\-l \|| \|xargs \|ar \|r \|arch" .RE .PP The following command executes .IR diff "(1)" with successive pairs of arguments originally typed as shell arguments: .PP .RS 10 .B "echo \|$\(** \|| \|xargs \|\-n2 \|diff" .RE .SH DIAGNOSTICS Self-explanatory. .\" @(#)xargs.1 1.6    .\" @(#)sbrk.2 1.2 .so /usr/man/u_man/man2/brk.2 .TH YACC 1 .SH NAME yacc \- yet another compiler-compiler .SH SYNOPSIS .B yacc [ .B \-vdlt ] grammar .SH DESCRIPTION .I Yacc\^ converts a context-free grammar into a set of tables for a simple automaton which executes a .SM LR(1) parsing algorithm. The grammar may be ambiguous; specified precedence rules are used to break ambiguities. .PP The output file, .BR y.tab.c , must be compiled by the C compiler to produce a program .IR yyparse . This program must be loaded with the lexical analyzer program, .IR yylex , as well as .I main\^ and .IR yyerror , an error handling routine. These routines must be supplied by the user; .IR lex (1) is useful for creating lexical analyzers usable by .IR yacc . .PP If the .B \-v flag is given, the file .B y.output is prepared, which contains a description of the parsing tables and a report on conflicts generated by ambiguities in the grammar. .PP If the \-\fBd\fR flag is used, the file .B y.tab.h is generated with the .B #define statements that associate the .I yacc\c\^ -assignnally followed by a filename. .PP More precisely, a pathname is a null-terminated character string constructed as follows: .PP .RS ::=\(bv|/ .br ::=\(bv/ .br ::=/\(bv/ .RE .PP where <\fIfilename\fP> is a string of 1 to 14 characters other than the .SM ASCII slash and null, and <\fIdirname\fP> is a string of 1 to 14 characters (other than the .SM ASCII slash and null) that names a directory. .PP If a pathname begins with a slash, the path search begins at the .I root\^ directory. Otherwise, the search begins from the current working directory. .PP A slash by itself names the root directory. .PP Unless specifically stated otherwise, the null pathame is treated as if it named a non-existent file. .SS Directory. .PP Directory entries are called links. By convention, a directory contains at least two links, .B . and .BR .. , referred to as .I dot\^ and .IR dot-dot\^ , respectively. Dot refers to the d.tr ~ .TH SEMCTL 2 .SH NAME semctl \- semaphore control operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semctl (" "semid, semnum, cmd, arg" ")" .BR int " semid, cmd" ; .BR int " semnum" ; .B union semun { .B ~~~~~int val; .B ~~~~~struct semid_ds \(**buf; .B ~~~~~ushort array[ ]; .B } arg; .fi .tr ~~ .SH DESCRIPTION .I Semctl provides a variety of semaphore control operations as specified by .IR cmd . .PP The following .IR cmd s are executed with respect to the semaphore specified by .IR semid " and " semnum (see \fIintro\fP(2) for definitions of values and permissions): .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETVAL Return the value of \fIsemval\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B SETVAL Set the value of \fIsemval\fP to .IR arg.val .\^\^\s-1{ALTER}\s+1 When this \fIcmd\fP is successfully executed, the semadj value (see \fIexit\fP(2)) corresponding to the specified semaphore in all processes is cleared. .TP \w'\ ed ``token codes'' with the user-declared ``token names''. This allows source files other than .B y.tab.c to access the token codes. .PP If the .B \-l flag is given, the code produced in .B y.tab.c does not contain any .B #line constructs. This should only be used after the grammar and the associated actions are fully debugged. .PP Runtime debugging code is always generated in .B y.tab.c under conditional compilation control. By default, this code is not included when .B y.tab.c is compiled. However, when .IR yacc 's .B \-t option is used, this debugging code is compiled by default. Independent of whether the .B \-t option was used, the runtime debugging code is under the control of .BR \s-1YYDEBUG\s+1 , a pre-processor symbol. If .B \s-1YYDEBUG\s+1 has a non-zero value, then the debugging code is included. If its value is zero, then the code is not included. Program size is smaller and execution time is slightly faster when a program is produced without the runtime debugging code. .SH FILES y.output .br y.tirectory itself and dot-dot refers to its parent directory. .SS "Root Directory and Current Working Directory." Each process has associated with it a concept of a root directory and a current working directory for the purpose of resolving pathname searches. A process's root directory need not be the root directory of the root file system. .SS "File Access Permissions." .PP Read, write, and execute/search permissions on a file are granted to a process if one or more of the following are true: .IP The process's effective user .SM ID is superuser. .IP The process's effective user .SM ID matches the user .SM ID of the owner of the file and the appropriate access bit of the ``owner'' portion (0700) of the file mode is set. .IP The process's effective user .SM ID does not match the user .SM ID of the owner of the file, and the process's effective group .SM ID matches the group of the file and the appropriate access bit of the ``group'' portion (070) of the file mode is set. .IP The process's effective user .SM ID dfBIPC_RMID\fP\ \ \ 'u .SM .B GETPID Return the value of \fIsempid\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETNCNT Return the value of \fIsemncnt\fP.\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETZCNT Return the value of \fIsemzcnt\fP.\^\^\s-1{READ}\s+1 .RE .PP The following .IR cmd s return and set, respectively, every \fIsemval\fP in the set of semaphores. .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B GETALL Place \fIsemval\fPs into array pointed to by .IR arg.array .\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B SETALL Set \fIsemval\fPs according to the array pointed to by .IR arg.array .\^\^\s-1{ALTER}\s+1 When this \fIcmd\fP is successfully executed, the semadj values corresponding to each specified semaphore in all processes are cleared. .RE .PP The following .IR cmd s are also available: .RS .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_STAT Place the current value of each member of the data structure associated with .I semid into the structure pointed to by .IR arg.buf . Tab.c .br y.tab.h defines for token names .br yacc.tmp temporary file .br yacc.debug temporary file .br yacc.acts temporary file .br /usr/lib/yaccpar parser prototype for C programs .br .SH "SEE ALSO" lex(1). .br ``YACC - Yet Another Compiler Compiler'' in the .IR "\*(6) Support Tools Guide" . .SH DIAGNOSTICS The number of reduce-reduce and shift-reduce conflicts is reported on the standard error output; a more detailed report is found in the .B y.output file. Similarly, if some rules are not reachable from the start symbol, this is also reported. .SH BUGS Because filenames are fixed, at most one .I yacc\^ process can be active in a given directory at a time. .\" @(#)yacc.1 1.5  oes not match the user .SM ID of the owner of the file, and the process's effective group .SM ID does not match the group .SM ID of the file, and the appropriate access bit of the ``other'' portion (07) of the file mode is set. .PP If none of these conditions exists, the corresponding permissions are denied. .SS "Message Queue Identifier" A message queue identifier (msqid) is a unique positive integer created by a .IR msgget (2) system call. Each msqid has a message queue and a data structure associated with it. The data structure is referred to as .I msqid_ds and contains the following members: .PP .ta 8n 28n .nf \f3struct\f2 ipc_perm msg_perm\f3;\f1 /\(** operation permission struct \(**/ \f3ushort\f2 msg_qnum\f3;\f1 /\(** number of msgs on q \(**/ \f3ushort\f2 msg_qbytes\f3;\f1 /\(** max number of bytes on q \(**/ \f3ushort\f2 msg_lspid\f3;\f1 /\(** pid of last \fImsgsnd\fP operation \(**/ \f3ushort\f2 msg_lrpid\f3;\f1 /\(** pid of last \fImsgrcv\fP operation \(**/ \f3time_t\f2 msg_stime\f3;\f1 /\(** last he contents of this structure are defined in .IR intro (2).\^\^\s-1{READ}\s+1 .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_SET Set the value of the following members of the data structure associated with .I semid to the corresponding value found in the structure pointed to by .IR arg.buf : .SP 1v .RS .nf .B sem_perm.uid .B sem_perm.gid .B "sem_perm.mode /\(** only low 9 bits \(**/" .fi .RE .IP This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I sem_perm.uid in the data structure associated with .IR semid . .TP \w'\fBIPC_RMID\fP\ \ \ 'u .SM .B IPC_RMID Remove the semaphore identifier specified by .I semid from the system and destroy the set of semaphores and data structure associated with it. This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I sem_perm.uid in the data structure associated with .IR semid . .PP .I Semctl fails if one or more of E...F_exit.2Gaccess.2Hacct.2Ialarm.2Jbrk.2Kchdir.2Lchmod.2Mchown.2Nchroot.2Oclose.2Pcreat.2Qdup.2Rexec.2Sexecl.2Texecle.2Uexeclp.2Vexecv.2Wexecve.2Xexecvp.2Yexit.2Zfcntl.2[fork.2\fstat.2]getegid.2^geteuid.2_getgid.2`getpgrp.2agetpid.2bgetppid.2cgetuid.2dintro.2eioctl.2fkill.2glink.2hlseek.2imaus.2jmknod.2kmount.2lmsgctl.2mmsgget.2nmsgop.2onice.2popen.2qpause.2rpipe.2splock.2tprofil.2uptrace.2vread.2wsbrk.2xsemctl.2ysemget.2zsemop.2{setgid.2|setpgrp.2}setuid.2~shmctl.2shmget.2shmop.2signal.2stat.2stime.2\fImsgsnd\fP time \(**/ \f3time_t\f2 msg_rtime\f3;\f1 /\(** last \fImsgrcv\fP time \(**/ \f3time_t\f2 msg_ctime\f3;\f1 /\(** last change time \(**/ /\(** Times measured in secs since \(**/ /\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/ .fi .PP .B Msg_perm is an \fBipc_perm\fP structure that specifies the message operation permission (see below). This structure includes the following members: .PP .RS .ta 8n 20n .nf \f3ushort\f2 cuid\f3;\f1 /\(** creator user id \(**/ \f3ushort\f2 cgid\f3;\f1 /\(** creator group id \(**/ \f3ushort\f2 uid\f3;\f1 /\(** user id \(**/ \f3ushort\f2 gid\f3;\f1 /\(** group id \(**/ \f3ushort\f2 mode\f3;\f1 /\(** r/w permission \(**/ .PP .fi .RE .I Msg_qnum is the number of messages currently on the queue. .I Msg_qbytes is the maximum number of bytes allowed on the queue. .I Msg_lspid is the process id of the last process that performed a .IR msgsnd " operation (see" .IR msgop (2)). .I Msg_lrpid is the process id of the last process that performed a .IR msgrcv " operation (see" .IR the following are true: .IP .I Semid is not a valid semaphore identifier. .SM \%[EINVAL] .IP .I Semnum is less than zero or greater than .IR sem_nsems . .SM \%[EINVAL] .IP .I Cmd is not a valid command. .SM \%[EINVAL] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Cmd is .SM .B SETVAL or .SM .B SETALL and the value to which \fIsemval\fP is to be set is greater than the system imposed maximum. .SM \%[ERANGE] .IP .I Cmd is equal to .SM .B IPC_RMID or .SM .B IPC_SET and the effective user .SM ID of the calling process is not equal to that of superuser and is not equal to the value of .I sem_perm.uid in the data structure associated with .IR semid . .SM \%[EPERM] .IP .I Arg.buf points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, the value returned depends on .I cmd\^ as follows: .PD 0 .RS .TP 1.5i .SM .B GETVAL The value of \fIsemval\fP. .TP .SM .B GETPID The value of \fIsempid\fP. .TP .SM .B GETNCNT The value of \fIsemn.\" @(#)_exit.2 1.2 .so /usr/man/u_man/man2/exit.2  msgop (2)). .I Msg_stime is the time of the last .I msgsnd operation, .I msg_rtime is the time of the last .I msgrcv operation, and .I msg_ctime is the time of the last .IR msgctl (2) operation that changed a member of the above structure. .SS "Message Operation Permissions." In the .IR msgop "(2) and " msgctl (2) system call descriptions, the permission required for an operation is given as .BI { token }, where \fItoken\fP is the type of permission needed, interpreted as follows: .PP .RS 0.75i .PD 0 .TP 1.50i 00400 Read by user .TP 00200 Write by user .TP 00060 Read, Write by group .TP 00006 Read, Write by others .RE .PD .PP Read and Write permissions on a msqid are granted to a process if one or more of the following are true: .IP The process's effective user .SM ID is superuser. .IP The process's effective user .SM ID matches .I msg_perm.[c]uid in the data structure associated with .I msqid and the appropriate bit of the ``user'' portion (0600) of .I msg_perm.mode is set. .IP The process's effective user cnt\fP. .TP .SM .B GETZCNT The value of \fIsemzcnt\fP. .TP All others A value of 0. .RE .PP .PD When \fIsemctl\fP is unsuccessful, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO semget(2), semop(2), intro(2), exit(2). .\" @(#)semctl.2 1.5  .TH ACCESS 2 .SH NAME access \- determine accessibility of a file .SH SYNOPSIS .BR "int access (" "path, amode" ")" .br .BR "char \(**" "path" ";" .br .BR int " amode" ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. .I Access\^ checks the named file for accessibility according to the bit pattern contained in .IR amode , using the real user .SM ID in place of the effective user .SM ID and the real group .SM ID in place of the effective group .SM ID\*S. The bit pattern contained in .I amode\^ is constructed as follows: .PP .RS 04 read .br 02 write .br 01 execute (search) .br 00 check existence of file .RE .PP Access to the file is denied if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP Read, write, or execute (search) permission is requested for a null pathname. .SM \%[ENOENT] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied on a component of the path prefix. .SM \%[EACCES] .IP Write access is .SM ID does not match .IR msg_perm.[c]uid , the process's effective group .SM ID matches .IR msg_perm.[c]gid , and the appropriate bit of the ``group'' portion (060) of .I msg_perm.mode is set. .IP The process's effective user .SM ID does not match .IR msg_perm.[c]uid , the process's effective group .SM ID does not match .IR msg_perm.[c]gid , and the appropriate bit of the ``other'' portion (06) of .I msg_perm.mode is set. .PP Otherwise, the corresponding permissions are denied. .SS "Semaphore Identifier" A semaphore identifier (semid) is a unique positive integer created by a .IR semget (2) system call. Each semid has a set of semaphores and a data structure associated with it. The data structure is referred to as .I semid_ds and contains the following members: .PP .ta 8n 28n .nf \f3struct\f2 ipc_perm sem_perm\f3;\f1 /\(** operation permission struct \(**/ \f3ushort\f2 sem_nsems\f3;\f1 /\(** number of sems in set \(**/ \f3time_t\f2 sem_otime\f3;\f1 /\(** last operation time \(**/ \f3time_t\f2 sem_ctime\f3;\f.TH SEMGET 2 .SH NAME semget \- get set of semaphores .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semget (" "key, nsems, semflg" ) .BR key_t " key" ; .BR int " nsems, semflg" ; .fi .SH DESCRIPTION .I Semget returns the semaphore identifier associated with .IR key . .PP A semaphore identifier and associated data structure and set containing .I nsems semaphores (see .IR intro (2)) are created for .I key if one of the following is true: .IP .I Key is equal to .SM .BR IPC_PRIVATE . .IP .I Key does not already have a semaphore identifier associated with it, and .RI ( semflg " & " .SM .BR IPC_CREAT\*S ) is ``true''. .PP Upon creation, the data structure associated with the new semaphore identifier is initialized as follows: .IP .IR Sem_perm.cuid ", " sem_perm.uid , .IR sem_perm.cgid ", and " sem_perm.gid are set equal to the effective user .SM ID and effective group .SM ID\*S, respectively, of the calling process. .IP The low-order 9 bits of .I semrequested for a file on a read-only file system. .SM \%[EROFS] .IP Write access is requested for a pure procedure (shared text) file that is being executed. .SM \%[ETXTBSY] .IP Permission bits of the file mode do not permit the requested access. .SM \%[EACCES] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .PP The owner of a file has permission checked with respect to the ``owner'' read, write, and execute mode bits; members of the file's group other than the owner have permissions checked with respect to the ``group'' mode bits; all others have permissions checked with respect to the ``other'' mode bits. .SH "RETURN VALUE" .PP If the requested access is permitted, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO chmod(2), stat(2). .\" @(#)access.2 1.5   1 /\(** last change time \(**/ /\(** Times measured in secs since \(**/ /\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/ .fi .PP .I Sem_perm is an \fIipc_perm\fP structure that specifies the semaphore operation permission (see below). This structure includes the following members: .PP .RS .ta 8n 20n .nf \f3ushort\f2 cuid\f3;\f1 /\(** creator user id \(**/ \f3ushort\f2 cgid\f3;\f1 /\(** creator group id \(**/ \f3ushort\f2 uid\f3;\f1 /\(** user id \(**/ \f3ushort\f2 gid\f3;\f1 /\(** group id \(**/ \f3ushort\f2 mode\f3;\f1 /\(** r/a permission \(**/ .PP .fi .RE The value of .I sem_nsems is equal to the number of semaphores in the set. Each semaphore in the set is referenced by a positive integer referred to as a .IR sem_num . .I Sem_num values run sequentially from 0 to the value of .I sem_nsems minus 1. .I Sem_otime is the time of the last .IR semop (2) operation, and .I sem_ctime is the time of the last .IR semctl (2) operation that changed a member of the above structure. .PP A semaphore is a data structure_perm.mode are set equal to the low-order 9 bits of .IR semflg . .IP .I Sem_nsems is set equal to the value of .IR nsems . .IP .I Sem_otime is set equal to 0 and .I sem_ctime is set equal to the current time. .PP .I Semget fails if one or more of the following are true: .IP .I Nsems is either less than or equal to zero or greater than the system imposed limit. .SM \%[EINVAL] .IP A semaphore identifier exists for .I key but operation permission (see .IR intro (2)), as specified by the low-order 9 bits of .IR semflg , would not be granted. .SM \%[EACCES] .IP A semaphore identifier exists for .I key but the number of semaphores in the set associated with it is less than .IR nsems " and " nsems is not equal to zero. .SM \%[EINVAL] .IP A semaphore identifier does not exist for .I key and .RI ( semflg " &" .SM .BR IPC_CREAT\*S ) is ``false''. .SM \%[ENOENT] .IP A semaphore identifier is to be created but the system imposed limit on the maximum number of allowed semaphores system wide would be exceeded. .SM \%[ENOS.TH ACCT 2 .SH NAME acct \- enable or disable process accounting .SH SYNOPSIS .BR "int acct (" path ) .br .BR "char \(**" path ; .SH DESCRIPTION .I Acct\^ is used to enable or disable the system's process accounting routine. If the routine is enabled, an accounting record is written on an accounting file for each process that terminates. Termination can be caused by one of two things: an .I exit\^ call or a signal; see .IR exit "(2) and " signal (2). The effective user .SM ID of the calling process must be superuser to use this call. .PP .I Path\^ points to a pathname naming the accounting file. The accounting file format is given in .IR acct (4). .PP The accounting routine is enabled if .I path\^ is non-zero and no errors occur during the system call. It is disabled if .I path\^ is zero and no errors occur during the system call. .PP .I Acct\^ fails if one or more of the following are true: .IP The effective user .SM ID of the calling process is not superuser. .SM \%[EPERM] .IP An attempt is made to enable a that contains the following members: .PP .RS .ta 8n 20n .nf \f3ushort\f2 semval\f3;\f1 /\(** semaphore value \(**/ \f3short\f2 sempid\f3;\f1 /\(** pid of last operation \(**/ \f3ushort\f2 semncnt\f3;\f1 /\(** # awaiting semval > cval \(**/ \f3ushort\f2 semzcnt\f3;\f1 /\(** # awaiting semval = 0 \(**/ .fi .RE .PP .I Semval is a non-negative integer. .I Sempid is equal to the process .SM ID of the last process that performed a semaphore operation on this semaphore. .I Semncnt is a count of the number of processes that are currently suspended until this semaphore's \fIsemval\fP becomes greater than its current value. .I Semzcnt is a count of the number of processes that are currently suspended until this semaphore's \fIsemval\fP becomes zero. .SS "Semaphore Operation Permissions." In the .IR semop "(2) and " semctl (2) system call descriptions, the permission required for an operation is given as .BI { token } , where \fItoken\fP is the type of permission needed, interpreted as follows: .PP .RS 0.75i .PD 0 .TP  PC] .IP A semaphore identifier exists for .I key but .RI "( (" semflg " & " .SM .BR IPC_CREAT\*S ") & (" .IR semflg " & " .SM .BR IPC_EXCL\*S ") )" is ``true''. .SM \%[EEXIST] .br .if \n()s .bp .SH "RETURN VALUE" Upon successful completion, a non-negative integer (i.e., a semaphore identifier) is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO semctl(2), semop(2). .\" @(#)semget.2 1.7 ccounting when it is already enabled. .SM \%[EBUSY] .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP One or more components of the accounting file's pathname do not exist. .SM \%[ENOENT] .IP A component of the path prefix denies search permission. .SM \%[EACCES] .IP The file named by .I path\^ is not an ordinary file. .SM \%[EACCES] .IP .I Mode\^ permission is denied for the named accounting file. .SM \%[EACCES] .IP The named file is a directory. .SM \%[EISDIR] .IP The named file resides on a read-only file system. .SM \%[EROFS] .IP .I Path\^ points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO acct(4). .\" @(#)acct.2 1.4  1.50i 00400 Read by user .TP 00200 Alter by user .TP 00060 Read, Alter by group .TP 00006 Read, Alter by others .RE .PD .PP Read and Alter permissions on a semid are granted to a process if one or more of the following are true: .IP The process's effective user .SM ID is superuser. .IP The process's effective user .SM ID matches .I sem_perm.[c]uid in the data structure associated with semid and the appropriate bit of the ``user'' portion (0600) of .I sem_perm.mode is set. .IP The process's effective user .SM ID does not match .IR sem_perm.[c]uid , the process's effective group .SM ID matches .IR sem_perm.[c]gid , and the appropriate bit of the ``group'' portion (060) of .I sem_perm.mode is set. .IP The process's effective user .SM ID does not match .IR sem_perm.[c]uid , the process's effective group .SM ID does not match .IR sem_perm.[c]gid , and the appropriate bit of the ``other'' portion (06) of .I sem_perm.mode is set. .PP Otherwise, the corresponding permissions are denied. .SS "Shared Memory Identifier.TH SEMOP 2 .SH NAME semop \- semaphore operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int semop (" "semid, sops, nsops" ) .BR int " semid" ; .BR "struct sembuf (\(**" sops )[]; .BR int " nsops" ; .fi .SH DESCRIPTION .I Semop is used to atomically perform an array of semaphore operations on the set of semaphores associated with the semaphore identifier specified by .IR semid . .I Sops is a pointer to the array of semaphore-operation structures. .I Nsops is the number of such structures in the array. Each structure includes the following members: .PP .RS .ta 8n 20n .nf \f3short\f2 sem_num\f3;\f1 /\(** semaphore number \(**/ \f3short\f2 sem_op\f3;\f1 /\(** semaphore operation \(**/ \f3short\f2 sem_flg\f3;\f1 /\(** operation flags \(**/ .fi .RE .PP Each semaphore operation specified by .I sem_op is performed on the corresponding semaphore specified by .IR semid " and " sem_num . .PP .I Sem_op specifies one of three semaphore operations as fo! .TH ALARM 2 .SH NAME alarm \- set a process's alarm clock .SH SYNOPSIS .BR "unsigned alarm (" sec ) .br .BR unsigned " sec" ; .SH DESCRIPTION .I Alarm\^ instructs the calling process's alarm clock to send the signal .B .SM SIGALRM to the calling process after the number of real time seconds specified by .I sec\^ have elapsed; see .IR signal (2). .PP Alarm requests are not stacked; successive calls reset the calling process's alarm clock. .PP If .I sec\^ is 0, any previously made alarm request is canceled. .SH RETURN VALUE .I Alarm\^ returns the amount of time previously remaining in the calling process's alarm clock. .SH "SEE ALSO" pause(2), signal(2). .\" @(#)alarm.2 1.4 " A shared memory identifier (shmid) is a unique positive integer created by a .IR shmget (2) system call. Each shmid has a segment of memory (referred to as a shared memory segment) and a data structure associated with it. The data structure is referred to as .I shmid_ds and contains the following members: .PP .ta 8n 28n .nf \f3struct\f2 ipc_perm shm_perm\f3; /\(** operation permission struct \(**/ \f3int\f2 shm_segsz\f3;\f1 /\(** size of segment \(**/ \f3ushort\f2 shm_cpid\f3;\f1 /\(** creator pid \(**/ \f3ushort\f2 shm_lpid\f3;\f1 /\(** pid of last operation \(**/ \f3short\f2 shm_nattch\f3;\f1 /\(** number of current attaches \(**/ \f3time_t\f2 shm_atime\f3;\f1 /\(** last attach time \(**/ \f3time_t\f2 shm_dtime\f3;\f1 /\(** last detach time \(**/ \f3time_t\f2 shm_ctime\f3;\f1 /\(** last change time \(**/ /\(** Times measured in secs since \(**/ /\(** 00:00:00 \s-1GMT\s+1, Jan. 1, 1970 \(**/ .fi .PP .B Shm_perm is an \fBipc_perm\fP structure that specifies the shared memory operation permission (see bellows (see semaphore data structure in .IR intro (2)): .PP .RS 8 If .I sem_op is a negative integer, one of the following occurs: .SM \%{ALTER} .IP If \fIsemval\fP is greater than or equal to the absolute value of .IR sem_op , the absolute value of .I sem_op is subtracted from \fIsemval\fP. Also, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the absolute value of .I sem_op is added to the calling process's semadj value (see .IR exit (2)) for the specified semaphore. .IP If \fIsemval\fP is less than the absolute value of .I sem_op and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true'', .I semop returns immediately. .IP If \fIsemval\fP is less than the absolute value of .I sem_op and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``false'', .I semop increments the \fIsemncnt\fP associated with the specified semaphore and suspends execution of the calling process until one of the following occurs: .RS 8 .PP \fISemval\fP becomes greater than or equal to the absolute value of .IR sem_op . When this .TH BRK 2 .SH NAME brk, sbrk \- change data segment space allocation .SH SYNOPSIS .BR "int brk (" endds ) .br .BR "char *" endds ; .PP .BR "char *sbrk (" incr ) .br .BR int " incr" ; .SH DESCRIPTION .I Brk\^ and .I sbrk\^ are used to change dynamically the amount of space allocated for the calling process's data segment; see .IR exec (2). The change is made by resetting the process's break value and allocating the appropriate amount of space. The break value is the address of the first location beyond the end of the data segment. The amount of allocated space increases as the break value increases. The newly allocated space is set to zero. .PP .I Brk\^ sets the break value to .I endds\^ and changes the allocated space accordingly. .PP .I Sbrk\^ adds .I incr\^ bytes to the break value and changes the allocated space accordingly. .I Incr\^ can be negative, in which case the amount of allocated space is decreased. .PP .I Brk\^ and .I sbrk\^ fail without making any change in the allocated space if one or more of! low). This structure includes the following members: .PP .RS .ta 8n 20n .nf \f3ushort\f2 cuid\f3;\f1 /\(** creator user id \(**/ \f3ushort\f2 cgid\f3;\f1 /\(** creator group id \(**/ \f3ushort\f2 uid\f3;\f1 /\(** user id \(**/ \f3ushort\f2 gid\f3;\f1 /\(** group id \(**/ \f3ushort\f2 mode\f3;\f1 /\(** r/w permission \(**/ .PP .fi .RE .I Shm_segsz specifies the size of the shared memory segment. .I Shm_cpid is the process id of the process that created the shared memory identifier. .I Shm_lpid is the process id of the last process that performed a .IR shmop "(2) operation." .I Shm_nattch is the number of processes that currently have this segment attached. .I Shm_atime is the time of the last .I shmat operation and .I shm_dtime is the time of the last .I shmdt operation; see \fIshmop\fP(2). .I Shm_ctime is the time of the last .IR shmctl (2) operation that changed one of the members of the above structure. .SS "Shared Memory Operation Permissions." In the .IR shmop "(2) and " shmctl (2) system call descriptionoccurs, the value of \fIsemncnt\fP associated with the specified semaphore is decremented, the absolute value of .I sem_op is subtracted from \fIsemval\fP and, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the absolute value of .I sem_op is added to the calling process's semadj value for the specified semaphore. .PP The \fIsemid\fP for which the calling process is awaiting action is removed from the system (see .IR semctl (2)). When this occurs, .I errno is set equal to .SM EIDRM\*S and a value of \-1 is returned. .PP The calling process receives a signal that is to be caught. When this occurs, the value of \fIsemncnt\fP associated with the specified semaphore is decremented and the calling process resumes execution in the manner prescribed in .IR signal (2). .RE .PP If .I sem_op is a positive integer, the value of .I sem_op is added to \fIsemval\fP and, if .RI ( sem_flg " &" .SM .BR SEM_UNDO\*S ) is ``true'', the value of .I sem_op is subtracted from the calling process's semadj value for the spec the following are true: .IP The requested change would result in more space being allocated than is allowed by a system-imposed maximum (see .IR ulimit (2)). .SM \%[ENOMEM] .IP The requested change would result in the break value being greater than or equal to the start address of any attached shared memory segment (see .IR shmop (2)). .SH RETURN VALUE Upon successful completion, .I brk\^ returns a value of 0 and .I sbrk\^ returns the old break value. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO exec(2). .\" @(#)brk.2 1.7 s, the permission required for an operation is given as .BI { token }, where \fItoken\fP is the type of permission needed, interpreted as follows: .PP .RS 0.75i .PD 0 .TP 1.50i 00400 Read by user .TP 00200 Write by user .TP 00060 Read, Write by group .TP 00006 Read, Write by others .RE .PD .PP Read and Write permissions on a shmid are granted to a process if one or more of the following are true: .IP The process's effective user .SM ID is superuser. .IP The process's effective user .SM ID matches .I shm_perm.[c]uid in the data structure associated with .I shmid and the appropriate bit of the ``user'' portion (0600) of .I shm_perm.mode is set. .IP The process's effective user .SM ID does not match .IR shm_perm.[c]uid , the process's effective group .SM ID matches .IR shm_perm.[c]gid , and the appropriate bit of the ``group'' portion (060) of .I shm_perm.mode is set. .IP The process's effective user .SM ID does not match .IR shm_perm.[c]uid , the process's effective group .SM ID does not match .IR shm_perm.[c]g" ified semaphore. .SM \%{ALTER} .PP If .I sem_op is zero, one of the following occurs: .SM \%{READ} .IP If \fIsemval\fP is zero, .I semop returns immediately. .IP If \fIsemval\fP is not equal to zero and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true'', .I semop returns immediately. .IP If \fIsemval\fP is not equal to zero and .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``false'', .I semop increments the \fIsemzcnt\fP associated with the specified semaphore and suspends execution of the calling process until one of the following occurs: .RS 8 .PP \fISemval\fP becomes zero, at which time the value of \fIsemzcnt\fP associated with the specified semaphore is decremented. .PP The \fIsemid\fP for which the calling process is awaiting action is removed from the system. When this occurs, .I errno is set equal to .SM EIDRM\*S and a value of \-1 is returned. .PP The calling process receives a signal that is to be caught. When this occurs, the value of \fIsemzcnt\fP associated with the specified semaphore is dec.TH CHDIR 2 .SH NAME chdir \- change working directory .SH SYNOPSIS .BR "int chdir (" path ) .br .BR "char \(**" path ; .PP .SH DESCRIPTION .I Path\^ points to the pathname of a directory. .I Chdir\^ causes the named directory to become the current working directory. The starting point for \fIpath\fP searches for pathnames that do not begin with .BR / . .PP .I Chdir\^ fails and the current working directory remains unchanged if one or more of the following are true: .IP A component of the pathname is not a directory. .SM \%[ENOTDIR] .IP The named directory does not exist. .SM \%[ENOENT] .IP Search permission is denied for any component of the pathname. .SM \%[EACCES] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chroot(2). .\" @(#)chdir.2 1.5 id , and the appropriate bit of the ``other'' portion (06) of .I shm_perm.mode is set. .PP Otherwise, the corresponding permissions are denied. .SH SEE ALSO intro(3). .\" @(#)intro.2 1.9 remented and the calling process resumes execution in the manner prescribed in .IR signal (2). .RE .RE .PP .I Semop fails if one or more of the following are true for any of the semaphore operations specified by .IR sops : .IP .I Semid is not a valid semaphore identifier. .SM \%[EINVAL] .IP .I Sem_num is less than zero or greater than or equal to the number of semaphores in the set associated with .IR semid . .SM \%[EFBIG] .IP .I Nsops is greater than the system imposed maximum. .SM \%[E2BIG] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP The operation would result in suspension of the calling process but .RI ( sem_flg " &" .SM .BR IPC_NOWAIT\*S ) is ``true''. .SM \%[EAGAIN] .IP The limit on the number of individual processes requesting a .SM .B SEM_UNDO would be exceeded. .SM \%[ENOSPC] .IP The number of individual semaphores for which the calling process requests a .SM .B SEM_UNDO would exceed the limit. .SM \%[EINVAL] .IP An operation would cause a \fIsem" .TH CHMOD 2 .SH NAME chmod \- change mode of file .SH SYNOPSIS .BR "int chmod (" "path, mode" ) .br .BR "char \(**" path ; .br .BR int " mode" ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. .I Chmod\^ sets the access permission portion of the named file's mode according to the bit pattern contained in .IR mode . .PP Access permission bits are interpreted as follows: .PP .RS .PD 0 .TP 8 04000 Set user .SM ID on execution. .TP 8 02000 Set group .SM ID on execution. .TP 8 01000 Save text image after execution. .TP 8 00400 Read by owner. .TP 8 00200 Write by owner. .TP 8 00100 Execute (or search if a directory) by owner. .TP 8 00070 Read, write, execute (search) by group. .TP 8 00007 Read, write, execute (search) by others. .RE .PD .PP The effective user .SM ID of the process must match the owner of the file or be superuser to change the mode of a file. .PP If the effective user .SM ID of the process is not superuser, mode bit 01000 (save text image on execution) is cleared. .PP If the effective.TH IOCTL 2 .SH NAME ioctl \- control device .SH SYNOPSIS .BR "ioctl (" "fildes, request, arg" ) .SH DESCRIPTION .I Ioctl\^ performs a variety of functions on character special files (devices). The descriptions of various devices in Section 7 of the .I "\*(6) Administrator's Manual" discuss how .I ioctl\^ applies to them. .PP .I Ioctl\^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .IP .I Fildes\^ is not associated with a character special device. .SM \%[ENOTTY] .IP .I Request\^ or .I arg\^ is not valid. See Section 7. .SM \%[EINVAL] .SH RETURN VALUE If an error has occurred, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" termio(7) in the .IR "\*(6) Administrator's Manual" . .\" @(#)ioctl.2 1.4 val\fP to overflow the system imposed limit. .SM \%[ERANGE] .IP An operation would cause a semadj value to overflow the system imposed limit. .SM \%[ERANGE] .IP .I Sops points to an illegal address. .SM \%[EFAULT] .PP Upon successful completion, the value of \fIsempid\fP for each semaphore specified in the array pointed to by .I sops is set equal to the process .SM ID of the calling process. .SH RETURN VALUE .RI If " semop returns due to the receipt of a signal, a value of \-1 is returned to the calling process and .I errno is set to .SM \%EINTR\*S. If it returns due to the removal of a .I semid from the system, a value of \-1 is returned and .I errno is set to .SM \%EIDRM\*S. .PP Upon successful completion, the value of \fIsemval\fP at the time of the call for the last operation in the array pointed to by .I sops is returned. Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO intro(2), exec(2), exit(2), fork(2), semctl(2), semget(2). .\" @(#)semop.2 1.5  user .SM ID of the process is not superuser or the effective group .SM ID of the process does not match the group .SM ID of the file, mode bit 02000 (set group .SM ID on execution) is cleared. .PP If an executable file is prepared for sharing, mode bit 01000 prevents the system from abandoning the swap-space image of the program-text portion of the file when its last user terminates. Thus, when the next user of the file executes it, the text need not be read from the file system but can simply be swapped in, saving time. .PP .I Chmod\^ fails and the file mode remains unchanged if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied on a component of the path prefix. .SM \%[EACCES] .IP The effective user .SM ID does not match the owner of the file and the effective user .SM ID is not superuser. .SM \%[EPERM] .IP The named file resides on a read-only file system. .SM \%[ERO# .TH KILL 2 .SH NAME kill \- send a signal to a process or a group of processes .SH SYNOPSIS .BR "int kill (" "pid, sig" ) .br .BR "int" " pid, sig" ; .SH DESCRIPTION .I Kill\^ sends a signal to the process or group of processes specified by .IR pid . The signal that is to be sent is specified by .I sig\^ and is either one from the list given in .IR signal (2) or 0. If .I sig\^ is 0 (the null signal), error checking is performed but no signal is actually sent. This can be used to check the validity of .IR pid . .PP The real or effective user .SM ID of the sending process must match the real or effective user .SM ID of the receiving process unless the effective user .SM ID of the sending process is superuser. .PP The processes with a process .SM ID of 0 and a process .SM ID of 1 are special processes (see .IR intro (2)) and are referenced below as .IR proc0 " and " proc1 , respectively. .PP If .I pid\^ is greater than zero, .I sig\^ is sent to the process whose process .SM ID is equal to .IR pid . .I Pid\^ ma.\" @(#)setgid.2 1.2 .so /usr/man/u_man/man2/setuid.2 FS] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chown(2), mknod(2). .\" @(#)chmod.2 1.5 y equal 1. .PP If .I pid\^ is 0, .I sig\^ is sent to all processes, excluding .IR proc0 " and " proc1 , whose process group .SM ID is equal to the process group .SM ID of the sender. .PP If .I pid\^ is \-1 and the effective user .SM ID of the sender is not superuser, .I sig\^ is sent to all processes, excluding .IR proc0 " and " proc1 , whose real user .SM ID is equal to the effective user .SM ID of the sender. .PP If .I pid\^ is \-1 and the effective user .SM ID of the sender is superuser, .I sig\^ is sent to all processes, excluding .IR proc0 " and " proc1. .PP If .I pid\^ is negative but not \-1, .I sig\^ is sent to all processes whose process group .SM ID is equal to the absolute value of .IR pid . .PP .I Kill\^ fails and no signal is sent if one or more of the following are true: .IP .I Sig\^ is not a valid signal number. .SM \%[EINVAL] .IP No process can be found corresponding to that specified by .IR pid . .SM \%[ESRCH] .IP The user .SM ID of the sending process is not superuser, and its real or effect# .TH SETPGRP 2 .SH NAME setpgrp \- set process group \s-1ID\s+1 .SH SYNOPSIS .B int setpgrp (\|) .SH DESCRIPTION .I Setpgrp\^ sets the process group .SM ID of the calling process to the process .SM ID of the calling process and returns the new process group .SM ID\*S. .SH RETURN VALUE .I Setpgrp\^ returns the value of the new process group .SM ID\*S. .SH SEE ALSO exec(2), fork(2), getpid(2), intro(2), kill(2), signal(2). .\" @(#)setpgrp.2 1.2 .TH CHOWN 2 .SH NAME chown \- change owner and group of a file .SH SYNOPSIS .BR "int chown (" "path, owner, group" ) .br .BR "char \(**" path ; .br .BR int " owner, group" ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. The owner .SM ID and group .SM ID of the named file are set to the numeric values contained in .I owner\^ and .I group\^ respectively. .PP Only processes with the effective user .SM ID equal to the file owner or superuser may change the ownership of a file. .PP If .I chown\^ is invoked by other than the superuser, the set-user-\s-1ID\s0 and set-group-\s-1ID\s0 bits of the file mode are cleared (bits 04000 and 02000, respectively). See \fIchmod\fP(2) for a complete list of access permission bits. .PP .I Chown\^ fails and the owner and group of the named file remain unchanged if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied on a componive user .SM ID does not match the real or effective user .SM ID of the receiving process. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO kill(1), getpid(2), setpgrp(2), signal(2). .\" @(#)kill.2 1.5 .TH SETUID 2 .SH NAME setuid, setgid \- set user and group \s-1ID\s+1s .SH SYNOPSIS .BR "int setuid (" uid ) .br .BR int " uid" ; .PP .BR "int setgid (" gid ) .br .BR int " gid" ; .SH DESCRIPTION .IR Setuid " (" setgid ) is used to set the real user (group) .SM ID and effective user (group) .SM ID of the calling process. .PP If the effective user .SM ID of the calling process is superuser, the real user (group) .SM ID and effective user (group) .SM ID are set to .IR uid " (" gid ). .PP If the effective user .SM ID of the calling process is not superuser, but its real user (group) .SM ID is equal to .IR uid " (" gid ), the effective user (group) .SM ID is set to .IR uid " (" gid ). .PP .IR Setuid " (" setgid ) fails if the real user (group) .SM ID of the calling process is not equal to .IR uid " (" gid ) and its effective user .SM ID is not superuser. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the$ ent of the path prefix. .SM \%[EACCES] .IP The effective user .SM ID does not match the owner of the file and the effective user .SM ID is not superuser. .SM \%[EPERM] .IP The named file resides on a read-only file system. .SM \%[EROFS] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chmod(2). .\" @(#)chown.2 1.5 .TH LINK 2 .SH NAME link \- link to a file .SH SYNOPSIS .BR "int link (" "path1, path2" ) .br .BR "char \(**" "path1," " \(**" "path2" ; .SH DESCRIPTION .I Path1\^ points to a pathname naming an existing file. .I Path2\^ points to a pathname naming the new directory entry to be created. .I Link\^ creates a new link (directory entry) for the existing file. .PP .I Link\^ fails and no link is created if one or more of the following are true: .IP A component of either path prefix is not a directory. .SM \%[ENOTDIR] .IP A component of either path prefix does not exist. .SM \%[ENOENT] .IP A component of either path prefix denies search permission. .SM \%[EACCES] .IP The file named by .I path1\^ does not exist. .SM \%[ENOENT] .IP The link named by .I path2\^ exists. .SM \%[EEXIST] .IP The file named by .I path1\^ is a directory and the effective user .SM ID is not superuser. .SM \%[EPERM] .IP The link named by .I path2\^ and the file named by .I path1\^ are on different logical devices (file systems). .SM \%[EXDEV] error. .SH "SEE ALSO" getuid(2), intro(2). .\" @(#)setuid.2 1.4 .TH CHROOT 2 .SH NAME chroot \- change root directory .SH SYNOPSIS .BR "int chroot (" path ) .br .BR "char \(**" path ; .PP .SH DESCRIPTION .I Path\^ points to a pathname naming a directory. .I Chroot\^ causes the named directory to become the root directory. The starting point for \fIpath\fP searches for pathnames that begin with .BR / . .PP The effective user .SM ID of the process must be superuser to change the root directory. .PP The .B .. entry in the root directory is interpreted to mean the root directory itself. Thus, .B .. cannot be used to access files outside the subtree rooted at the root directory. .PP .I Chroot\^ fails and the root directory remains unchanged if one or more of the following are true: .IP Any component of the pathname is not a directory. .SM \%[ENOTDIR] .IP The named directory does not exist. .SM \%[ENOENT] .IP The effective user .SM ID is not superuser. .SM \%[EPERM] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon succes$  .IP .I Path2\^ points to a null pathname. .SM \%[ENOENT] .IP The requested link requires writing in a directory with a mode that denies write permission. .SM \%[EACCES] .IP The requested link requires writing in a directory on a read-only file system. .SM \%[EROFS] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" unlink(2). .\" @(#)link.2 1.4 .TH SHMCTL 2 .SH NAME shmctl \- shared memory control operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int shmctl (" "shmid, cmd, buf" ) .BR int " shmid, cmd" ; .BR "struct shmid_ds \(**" buf ; .fi .SH DESCRIPTION .I Shmctl provides a variety of shared memory control operations as specified by .IR cmd . The following .IR cmd s are available: .RS .TP \w'IPC_RMID\ \ \ 'u .SM .B IPC_STAT Place the current value of each member of the data structure associated with .I shmid into the structure pointed to by .IR buf . The contents of this structure are defined in .IR intro (2). .SM {READ} .TP .SM .B IPC_SET Set the value of the following members of the data structure associated with .I shmid to the corresponding value found in the structure pointed to by .IR buf : .nf .RS \f2shm_perm.uid\f1 \f2shm_perm.gid\f1 \f2shm_perm.mode\f1 /\(** only low 9 bits \(**/ .fi .RE .IP This \fIcmd\fP can only be executed by a process that has an effective user .SM sful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chdir(2). .\" @(#)chroot.2 1.6 .hy device .TH LSEEK 2 .SH NAME lseek \- move read/write file pointer .SH SYNOPSIS .BR "long lseek (" "fildes, offset, whence" ) .br .BR "int" " fildes" ; .br .BR "long" " offset" ; .br .BR "int" " whence" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor returned from a .IR creat (2), .IR open (2), .IR dup (2), or .IR fcntl (2) system call. .I Lseek\^ sets the file pointer associated with .I fildes\^ as follows: .RS .HP 6 If .I whence\^ is 0, the pointer is set to .I offset\^ bytes. .HP 6 If .I whence\^ is 1, the pointer is set to its current location plus .IR offset . .HP 6 If .I whence\^ is 2, the pointer is set to the size of the file plus .IR offset . .RE .PP Upon successful completion, the resulting pointer location, measured in bytes from the beginning of the file, is returned. .PP .I Lseek\^ fails and the file pointer remains unchanged if one or more of the following are true: .IP .I Fildes\^ is not an open file descriptor. .SM \%[EBADF] .IP .I Fildes\^ is associated with a pipe or fifo. .SM \%[ESPI% ID equal to either that of superuser or to the value of .I shm_perm.uid in the data structure associated with .IR shmid . .TP .SM .B IPC_RMID Remove the shared memory identifier specified by .I shmid from the system and destroy the shared memory segment and data structure associated with it. This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I shm_perm.uid in the data structure associated with .IR shmid . .PP .I Shmctl fails if one or more of the following are true: .IP .I Shmid is not a valid shared memory identifier. .SM \%[EINVAL] .IP .I Cmd is not a valid command. .SM \%[EINVAL] .IP .I Cmd is equal to .SM .B IPC_STAT and .SM {READ} operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Cmd is equal to .SM .B IPC_RMID or .SM .B IPC_SET and the effective user .SM ID of the calling process is not equal to that of superuser and is not equal to the value of .I shm_perm.uid in the data.TH CLOSE 2 .SH NAME close \- close a file descriptor .SH SYNOPSIS .BR "int close (" fildes ) .br .BR int " fildes" ; .SH DESCRIPTION .PP .I Fildes\^ is a file descriptor obtained from a .IR creat (2), .IR open (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .I Close\^ closes the file descriptor indicated by .IR fildes . .PP .I Close\^ fails if .I fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), exec(2), fcntl(2), open(2), pipe(2). .\" @(#)close.2 1.5 PE] .IP .I Whence\^ is not 0, 1, or 2. .SM \%[EINVAL and .SM SIGSYS \%signal] .IP The resulting file pointer would be negative. .SM \%[EINVAL] .PP Some devices are incapable of seeking. The value of the file pointer associated with such a device is undefined. .SH "RETURN VALUE" Upon successful completion, a non-negative integer indicating the file pointer value is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), fcntl(2), open(2). .\" @(#)lseek.2 1.5  structure associated with .IR shmid . .SM \%[EPERM] .IP .I Buf points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO shmget(2), shmop(2). .\" @(#)shmctl.2 1.5 % .TH CREAT 2 .SH NAME creat \- create a new file or rewrite an existing one .SH SYNOPSIS .BR "int creat (" "path, mode" ) .br .BR "char \(**" path ; .br .BR int " mode" ; .SH DESCRIPTION .I Creat\^ creates a new ordinary file or prepares to rewrite an existing file named by the pathname pointed to by .IR path . .PP If the file exists, the length is truncated to 0 and the mode and owner are unchanged. Otherwise, the file's owner .SM ID is set to the process's effective user .SM ID\*S, the file's group .SM ID is set to the process's effective group .SM ID\*S, and the low-order 12 bits of the file mode are set to the value of .IR mode , modified as follows: .IP All bits set in the process's file mode creation mask are cleared; see .IR umask (2). .IP Mode bit 01000 (save text image after execution) is cleared; see .IR chmod (2). .PP Upon successful completion, a non-negative integer, namely the file descriptor, is returned and the file is open for writing, even if the mode does not permit writing. The file pointe.TH MAUS 2 "PDP-11 only" .SH NAME maus \- multiple-access-user-space (shared memory) operations .SH SYNOPSIS .B #include .PP .B int getmaus (path, oflag) .br .B char *path; .br .B int oflag; .PP .B int freemaus (mausdes) .br .B int mausdes; .PP .B char *enabmaus (mausdes) .br .B int mausdes; .PP .B int dismaus (saddr) .br .B char *saddr; .PP .B char *switmaus (mausdes, saddr) .br .B int mausdes; .br .B char *saddr; .SH DESCRIPTION .SM MAUS (Multiple Access User Space) is a dedicated portion of physical memory that is subdivided into logical subsections. These subsections can be attached to the calling process's data segment or released from its data segment with the following calls. .PP .I Path points to a path name naming a special file that is one of the .SM MAUS logical subsections. .I Getmaus opens a maus descriptor for the named file and sets the file status flag according to the value of .IR oflag . .I Oflag is one of the following: .RS 8 .TP 12 .SM .B O_RDONLY Open for reading only. .TP ..TH SHMGET 2 .SH NAME shmget \- get shared memory segment .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int shmget (" "key, size, shmflg" ) .BR key_t " key" ; .BR int " size, shmflg" ; .fi .SH DESCRIPTION .I Shmget returns the shared memory identifier associated with .IR key . .PP A shared memory identifier and associated data structure and shared memory segment of .I size bytes (see .IR intro (2)) are created for .I key if one of the following is true: .IP .I Key is equal to .SM .BR IPC_PRIVATE . .IP .I Key does not already have a shared memory identifier associated with it, and .RI ( shmflg " & " .SM .BR IPC_CREAT\*S ) is ``true''. .PP Upon creation, the data structure associated with the new shared memory identifier is initialized as follows: .IP .IR Shm_perm.cuid ", " shm_perm.uid , .IR shm_perm.cgid ", and " shm_perm.gid are set equal to the effective user .SM ID and effective group .SM ID\*S, respectively, of the calling process. .IP The low-r is set to the beginning of the file. The file descriptor is set to remain open across .I exec\^ system calls; see .IR fcntl (2). No process may have more than 20 files open simultaneously. A new file may be created with a mode that forbids writing. .PP .I Creat\^ fails if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP A component of the path prefix does not exist. .SM \%[ENOENT] .IP Search permission is denied on a component of the path prefix. .SM \%[EACCES] .IP The pathname is null. .SM \%[ENOENT] .IP The file does not exist and the directory in which the file is to be created does not permit writing. .SM \%[EACCES] .IP The named file resides or would reside on a read-only file system. .SM \%[EROFS] .IP The file is a pure procedure (shared text) file that is being executed. .SM \%[ETXTBSY] .IP The file exists and write permission is denied. .SM \%[EACCES] .IP The named file is an existing directory. .SM \%[EISDIR] .IP Twenty (20) file desc& SM .B O_WRONLY Open for writing only. .TP .SM .B O_RDWR Open for reading and writing. .RE .PP No process may have more than eight (8) maus descriptors open simultaneously. .PP The named file is opened unless one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP The named file is not a maus special file. .SM \%[EINVAL] .IP A component of the path prefix denies search permission. .SM \%[EACCES] .IP .I Oflag\^ permission is denied for the named file. .SM \%[EACCES] .IP Eight (8) maus descriptors are currently open. .SM \%[EMFILE] .IP The .SM MAUS area associated with the special file does not exist. .SM \%[ENXIO] .IP .I Path\^ points to an illegal address. .SM \%[EFAULT] .PP .I Freemaus closes the maus descriptor specified by .IR mausdes . Note that if a maus descriptor has been enabled (see .IR enabmaus " below)" it may still be closed: a .SM MAUS file remains attached to a process's data segment until order 9 bits of .I shm_perm.mode are set equal to the low-order 9 bits of .IR shmflg . .I Shm_segsz is set equal to the value of .IR size . .IP .IR Shm_lpid ", " shm_nattch ", .IR shm_atime ", and " shm_dtime " are set equal to 0. .IP .I Shm_ctime is set equal to the current time. .PP .I Shmget fails if one or more of the following are true: .IP .I Size is less than the system imposed minimum or greater than the system imposed maximum. .SM \%[EINVAL] .IP A shared memory identifier exists for .I key but operation permission (see .IR intro (2)), as specified by the low-order 9 bits of .IR shmflg , would not be granted. .SM \%[EACCES] .IP A shared memory identifier exists for .I key but the size of the segment associated with it is less than .I size and .I size is not equal to zero. .SM \%[EINVAL] .IP A shared memory identifier does not exist for .I key and .RI ( shmflg " &" .SM .BR IPC_CREAT\*S ) is ``false''. .SM \%[ENOENT] .IP A shared memory identifier is to be created but the system imposed limit on the mariptors are currently open. .SM \%[EMFILE] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a non-negative integer (i.e., the file descriptor) is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" close(2), dup(2), lseek(2), open(2), read(2), umask(2), write(2). .\" @(#)creat.2 1.5 a .I dismaus (see below) is used to free it. .PP .I Freemaus will fail if .I mausdes is not a valid open maus descriptor. .SM \%[EBADF] .PP .I Enabmaus attaches the .SM MAUS file associated with .I mausdes to the data segment of the calling process. The file is attached starting at the first available 8k-byte boundary address beyond the current break value (see .IR brk (2)). Note that multiple .I enabmaus calls can be made with the same maus descriptor. Each call will attach the file at a different 8k-byte boundary address. .PP .I Enabmaus will fail and not attach the .SM MAUS file if one or more of the following are true: .IP .I Mausdes is not a valid open maus descriptor. .SM \%[EBADF] .IP No more 8k-byte boundary starting addresses are available. .SM \%[ENOMEM] .PP .I Dismaus frees from the calling process's data segment the .SM MAUS file that starts at the data segment address given by .RI ( saddr " \-" .RI ( saddr " modulus 8192))." .PP .I Dismaus will fail and not free the .SM MAUS file if .RI ( sadd& ximum number of allowed shared memory identifiers system-wide would be exceeded. .SM \%[ENOSPC] .IP A shared memory identifier and associated shared memory segment are to be created but the amount of available physical memory is not sufficient to fill the request. .SM \%[ENOMEM] .IP A shared memory identifier exists for .I key but .RI "( (" shmflg " & " .SM .BR IPC_CREAT\*S ) " & " ( .IR shmflg " & " .SM .BR IPC_EXCL\*S ") )" is ``true''. .SM \%[EEXIST] .br .ne 7v .SH "RETURN VALUE" Upon successful completion a non-negative integer, i.e., a shared memory identifier, is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO shmctl(2), shmop(2). .\" @(#)shmget.2 1.6 .TH DUP 2 .SH NAME dup \- duplicate an open file descriptor .SH SYNOPSIS .BR "int dup (" fildes ) .br .BR int " fildes" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor obtained from a .IR creat (2), .IR open (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .I Dup\^ returns a new file descriptor having the following in common with the original: .IP Same open file (or pipe). .IP Same file pointer (i.e., both file descriptors share one file pointer). .IP Same access mode (read, write, or read/write). .PP The new file descriptor is set to remain open across .IR exec (2) system calls; see .IR fcntl (2). .PP The file descriptor returned is the lowest one available. .PP .I Dup\^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .IP Twenty (20) file descriptors are currently open. .SM \%[EMFILE] .SH "RETURN VALUE" Upon successful completion a non-negative integer (i.e., the file descriptor) is returned. Otherwise, a value of \-1 is retur " \-" .RI ( saddr " modulus 8192))" is not the data segment starting address of a .SM MAUS file. .SM \%[EINVAL] .PP .I Switmaus attaches the .SM MAUS file associated with .I mausdes to the data segment of the calling process. The file is attached starting at the address given by .RI ( saddr " \-" .RI ( saddr " modulus 8192))." .PP .I Switmaus will fail if one or more of the following are true: .IP .I Mausdes is not a valid open maus descriptor. .SM \%[EBADF] .IP The value of .RI ( saddr " \-" .RI ( saddr " modulus 8192))" is not a legal 8k-byte boundary address above the current break value. .SM \%[EINVAL] .SH RETURN VALUES Upon successful completion, the return value is as follows: .IP .I Getmaus returns a non-negative integer, namely a maus descriptor. .IP .I Freemaus returns a value of 0. .IP .I Enabmaus returns the data segment starting address of the attached .SM MAUS file. .IP .I Dismaus and .I switmaus return the maus descriptor previously associated with the data segment starting address given by.TH SHMOP 2 .SH NAME shmat, shmdt \- shared memory operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "char \(**shmat (" "shmid, shmaddr, shmflg" ) .BR int " shmid" ; .BR "char \(**" shmaddr .BR int " shmflg" ; .PP .BR "int shmdt (" shmaddr ) .BR "char \(**" shmaddr .fi .SH DESCRIPTION .I Shmat attaches the shared memory segment associated with the shared memory identifier specified by .I shmid to the data segment of the calling process. The segment is attached at the address specified by one of the following criteria: .IP If .I shmaddr is equal to zero, the segment is attached at the first available address as selected by the system. .IP If .I shmaddr is not equal to zero and .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``true'', the segment is attached at the address given by .RI ( shmaddr " -" .RI ( shmaddr " modulus" .SM .BR SHMLBA\*S "))." .IP If .I shmaddr is not equal to zero and .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``false'', the segmen' rned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), close(2), exec(2), fcntl(2), open(2), pipe(2). .\" @(#)dup.2 1.5  .RI ( saddr " \-" .RI ( saddr " modulus 8192))" if one exists. Otherwise, a value of \-2 is returned. .PP On other than successful completion, a value of \-1 is returned with .I errno set to indicate the error. .\" @(#)maus.2 1.1 t is attached at the address given by .IR shmaddr . .PP The segment is attached for reading if .RI ( shmflg " &" .SM .B SHM_RDONLY\*S) is ``true'' .SM \%{READ}\*S; otherwise it is attached for reading and writing .SM \%{READ/WRITE}\*S. .PP .I Shmat fails and does not attach the shared memory segment if one or more of the following are true: .IP .I Shmid is not a valid shared memory identifier. .SM \%[EINVAL] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \% [EACCES] .IP The available data space is not large enough to accommodate the shared memory segment. .SM \%[ENOMEM] .IP .I Shmaddr is not equal to zero, and the value of .RI ( shmaddr " -" .RI ( shmaddr " modulus" .SM .BR SHMLBA\*S "))" is an illegal address. .SM \%[EINVAL] .IP .I Shmaddr is not equal to zero, .RI ( shmflg " &" .SM .B SHM_RND\*S) is ``false'', and the value of .I shmaddr is an illegal address. .SM \%[EINVAL] .IP The number of shared memory segments attached to the calling process would exceed the system.TH EXEC 2 .SH NAME execl, execv, execle, execve, execlp, execvp \- execute a file .SH SYNOPSIS .BR "int execl (" "path, arg0, arg1, ..., argn, 0" ")" .br .BR "char \(**" "path," " \(**" "arg0," " \(**" "arg1, ...," .BR " \(**" "argn" ";" .PP .BR "int execv (" "path, argv" ) .br .BR "char \(**" "path," " \(**" "argv" "[ ];" .PP .BR "int execle (" "path, arg0, arg1, ..., argn, 0, envp" ")" .br .BR "char \(**" "path," " \(**" "arg0," " \(**" "arg1, ...," .BR " \(**" "argn," " \(**" "envp" "[ ];" .PP .BR "int execve (" "path, argv, envp" ) .br .BR "char \(**" "path," " \(**" "argv" "[ ], \(**" "envp" .B "[ ];" .PP .BR "int execlp (" "file, arg0, arg1, ..., argn, 0" ")" .br .BR "char \(**" "file," " \(**" "arg0," " \(**" "arg1, ...," .BR " \(**" "argn" ";" .PP .BR "int execvp (" "file, argv" ")" .br .BR "char \(**" "file," " \(**" "argv" "[ ];" .SH DESCRIPTION .I Exec\^ in all its forms transforms the calling process into a new process. The new process is constructed from an ordinary, executable file called the ' .TH MKNOD 2 .SH NAME mknod \- make a directory, or a special or ordinary file .SH SYNOPSIS .BR "int mknod (" "path, mode, dev" ) .br .BR "char \(**" "path" ; .br .BR "int" " mode, dev" ; .SH DESCRIPTION .I Mknod\^ creates a new file named by the pathname pointed to by .IR path . The mode of the new file is initialized from .IR mode , where the value of .I mode\^ is interpreted as follows: .sp .RS 0170000 file type; one of the following: .br 0010000 fifo special .br 0020000 character special .br 0040000 directory .br 0060000 block special .br 0100000 or 0000000 ordinary file .br 0004000 set user .SM ID on execution .br 0002000 set group .SM ID on execution .br 0001000 save text image after execution .br 0000777 access permissions; constructed from the following: .br 0000400 read by owner .br 0000200 write by owner .br 0000100 execute (search on directory) by owner .br 0000070 read, write, execute (search) by group .br 0000007 read, write, execute (search) by others .RE .PP The file's owner .SM ID is imposed limit. .SM \%[EMFILE] .PP .I Shmdt detaches from the calling process's data segment the shared memory segment located at the address specified by .IR shmaddr. .PP .I Shmdt fails and does not detach the shared memory segment if .I shmaddr is not the data segment start address of a shared memory segment. .SM \%[EINVAL] .SH RETURN VALUES Upon successful completion, the return value is as follows: .br .ne 8v .IP .I Shmat returns the data segment start address of the attached shared memory segment. .IP .I Shmdt returns a value of 0. .PP Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO exec(2), exit(2), fork(2), shmctl(2), shmget(2). .\" @(#)shmop.2 1.5 .IR "new process file" . This file consists of a header (see .IR a.out (4)), a text segment, and a data segment. The data segment contains an initialized portion and an uninitialized portion (bss). There can be no return from a successful .I exec\^ because the calling process is overlaid by the new process. .PP When a C program is executed, it is called as follows: .PP .RS .nf .BI "main (" "argc, argv, envp" ")" .BI "int" " argc" ";" .BI "char \(**\(**" "argv," " \(**\(**" "envp" ";" .fi .RE .PP where .I argc is the argument count and .I argv is an array of character pointers to the arguments themselves. As indicated, .I argc is conventionally at least one and the first member of the array points to a string containing the name of the file. .PP .I Path\^ points to a pathname that identifies the new process file. .I File\^ points to the new process file. The path prefix for this file is obtained by a search of the directories passed as the .I environment\^ line \f3\s-1PATH\s+1 =\f1 (see .IR environ (5)). The  set to the process's effective user .SM ID\*S. The file's group .SM ID is set to the process's effective group .SM ID\*S. .PP Values of .I mode other than those above are undefined and should not be used. The low-order 9 bits of .I mode are modified by the process's file mode creation mask; all bits set in the process's file mode creation mask are cleared (see .IR umask (2)). If .I mode\^ indicates a block or character special file, .I dev\^ is a configuration-dependent specification of a character or block I/O device. If .I mode\^ does not indicate a block special or character special device, .I dev\^ is ignored. .PP .I Mknod\^ may be invoked only by the superuser for file types other than .SM FIFO special. .PP .I Mknod\^ fails and the new file is not created if one or more of the following are true: .IP The process's effective user .SM ID is not superuser. .SM \%[EPERM] .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP A component of the path prefix does not exist. .SM \%[ENOENT] .( .TH SIGNAL 2 .SH NAME signal \- specify what to do upon receipt of a signal .SH SYNOPSIS .B #include .PP .BR "int (\(**signal (" "sig, func" ))(\|) .br .BR int " sig" ; .br .BR "int (\(**" func )(\|); .SH DESCRIPTION .I Signal\^ allows the calling process to choose one of three ways in which it is possible to handle the receipt of a specific signal. .I Sig\^ specifies the signal and .I func\^ specifies the choice. .PP .I Sig\^ can be assigned any one of the following except .BR \s-1SIGKILL\s+1 : .PP .DS .TS l l l. \fB\s-1SIGHUP\s+1\fR 01 hangup \fB\s-1SIGINT\s+1\fR 02 interrupt \fB\s-1SIGQUIT\s+1\fR 03* quit \fB\s-1SIGILL\s+1\fR 04* illegal instruction (not reset when caught) \fB\s-1SIGTRAP\s+1\fR 05* trace trap (not reset when caught) \fB\s-1SIGIOT\s+1\fR 06* \s-1IOT\s+1 instruction \fB\s-1SIGEMT\s+1\fR 07* \s-1EMT\s+1 instruction \fB\s-1SIGFPE\s+1\fR 08* floating point exception \fB\s-1SIGKILL\s+1\fR 09 kill (cannot be caught or ignored) \fB\s-1SIGBUS\s+1\fR 10* bus error \fB\s-1SIGSEGV\s+1\environment is supplied by the shell (see .IR sh (1)). .PP .IR Arg0 ", " arg1 ", " ... , .I argn\^ are pointers to null-terminated character strings. These strings constitute the argument list available to the new process. By convention, at least .I arg0\^ must be present and point to a string that is the same as .I path\^ (or its last component). .PP .I Argv\^ is an array of character pointers to null-terminated strings. These strings constitute the argument list available to the new process. By convention, .I argv\^ must have at least one member, and it must point to a string that is the same as .IR path\^ (or its last component). .I Argv\^ is terminated by a null pointer. .PP .I Envp\^ is an array of character pointers to null-terminated strings. These strings constitute the environment for the new process. .I Envp\^ is terminated by a null pointer. For .I execl\^ and .IR execv , the C run-time start-off routine places a pointer to the calling process's environment in the global cell .BR "extern char \(**\IP The directory in which the file is to be created is located on a read-only file system. .SM \%[EROFS] .IP The named file exists. .SM \%[EEXIST] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" mkdir(1), chmod(2), exec(2), umask(2), fs(4). .\" @(#)mknod.2 1.5 fR 11* segmentation violation \fB\s-1SIGSYS\s+1\fR 12* bad argument to system call \fB\s-1SIGPIPE\s+1\fR 13 write on a pipe with no one to read it \fB\s-1SIGALRM\s+1\fR 14 alarm clock \fB\s-1SIGTERM\s+1\fR 15 software termination signal \fB\s-1SIGUSR1\s+1\fR 16 user defined signal 1 \fB\s-1SIGUSR2\s+1\fR 17 user defined signal 2 \fB\s-1SIGCLD\s+1\fR 18 death of a child (see \fIWARNING\fR below) \fB\s-1SIGPWR\s+1\fR 19 power fail (see \fIWARNING\fR below) .TE .PP See below for the significance of the asterisk .RB ( \(** ) in the above list. .PP .I Func\^ is assigned one of three values: .BR \s-1SIG\(ruDFL\s+1 , .BR \s-1SIG\(ruIGN\s+1 , or a .IR "function address" . The actions prescribed by these values are as follows: .RS 2 .PP .SM .B SIG\(ruDFL \&\- terminate process upon receipt of a signal .RS 8 Upon receipt of the signal .IR sig , the receiving process is to be terminated with all of the consequences outlined in .IR exit (2); a ``core image'' is made in the current working directory of the receiving pro( (**environ;" . This pointer is used to pass the calling process's environment to the new process. .PP File descriptors open in the calling process remain open in the new process, except for those whose \%close-on-exec flag is set; see .IR fcntl (2). For those file descriptors that remain open, the file pointer is unchanged. .PP Signals set to terminate the calling process are set to terminate the new process. Signals set to be ignored by the calling process are set to be ignored by the new process. Signals set to be caught by the calling process are set to terminate the new process; see .IR signal (2). .PP If the set-user-\s-1ID\s+1 mode bit of the new process file is set (see .IR chmod (2)), .I exec\^ sets the effective user .SM ID of the new process to the owner .SM ID of the new process file. Similarly, if the set-group-\s-1ID\s+1 mode bit of the new process file is set, the effective group .SM ID of the new process is set to the group .SM ID of the new process file. The real user .SM ID and real group.TH MOUNT 2 .SH NAME mount \- mount a file system .SH SYNOPSIS .BR "int mount (" "spec, dir, rwflag" ) .br .BR "char \(**" "spec," " \(**" "dir" ; .br .BR "int" " rwflag" ; .SH DESCRIPTION .I Mount\^ requests that a removable file system contained on the block special file identified by .I spec\^ be mounted on the directory identified by .IR dir . .I Spec\^ and .I dir\^ are pointers to pathnames. .PP Upon successful completion, references to the file .I dir\^ refer to the root directory on the mounted file system. .PP The low-order bit of .I rwflag\^ is used to control write permission on the mounted file system. If the low-order bit is .BR 1 , writing is forbidden; otherwise writing is permitted according to individual file accessibility. .PP .I Mount\^ may be invoked only by the superuser. .PP .I Mount\^ fails if one or more of the following are true: .IP The effective user .SM ID is not superuser. .SM \%[EPERM] .IP Any of the named files does not exist. .SM \%[ENOENT] .IP A component of a path prefix is ncess if .I sig\^ is one for which an asterisk appears in the above list and the following conditions are met: .RS 8 .PP The effective user .SM ID and the real user .SM ID of the receiving process are equal. .PP An ordinary file named .B core exists and is writable or can be created. If the file must be created, it will have the following properties: .RS 8 .PP a mode of 0666 modified by the file creation mask .RI (see " umask" (2)) .PP a file owner .SM ID that is the same as the effective user .SM ID of the receiving process .PP a file group .SM ID that is the same as the effective group .SM ID of the receiving process .RE .RE .RE .RE .PP .SM .B SIG\(ruIGN \&\- ignore signal .RS 8 The signal .I sig\^ is to be ignored. .PP Note: the signal .B .SM SIGKILL cannot be ignored. .RE .PP .I function address\^ \&\- catch signal .RS 8 Upon receipt of the signal .IR sig , the receiving process is to execute the signal-catching function pointed to by .IR func . The signal number .I sig\^ is passed as the first argume .SM ID of the new process remain the same as those of the calling process. .PP The shared memory segments attached to the calling process are not attached to the new process (see .IR shmop (2)). Profiling is disabled for the new process; see .IR profil (2). .PP The new process also inherits the following attributes from the calling process: .PP .PD 0 .RS 0.5i .PP nice value (see .IR nice (2)) .PP process .SM ID .PP parent process .SM ID .PP process group .SM ID .PP semadj values (see .IR semop (2)) .PP tty group .SM ID (see .IR exit (2) and .IR signal (2)) .PP trace flag (see .IR ptrace "(2) request 0)" .PP time left until an alarm clock signal (see .IR alarm (2)) .PP current working directory .PP root directory .PP file mode creation mask (see .IR umask (2)) .PP file size limit (see .IR ulimit (2)) .PP .IR utime , .IR stime , .IR cutime , and .I cstime\^ (see .IR times (2)) .RE .PD .PP .I Exec\^ fails and returns to the calling process if one or more of the following are true: .IP One or more compon) ot a directory. .SM \%[ENOTDIR] .IP .I Spec\^ is not a block special device. .SM \%[ENOTBLK] .IP The device associated with .I spec\^ does not exist. .SM \%[ENXIO] .IP .I Dir\^ is not a directory. .SM \%[ENOTDIR] .IP .I Spec\^ or .I dir\^ points outside the process's allocated address space. .SM \%[EFAULT] .IP .I Dir\^ is currently mounted on, is someone's current working directory, or is otherwise busy. .SM \%[EBUSY] .IP The device associated with .I spec\^ is currently mounted. .SM \%[EBUSY] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" umount(2). .\" @(#)mount.2 1.4 nt to the signal-catching function. A second argument, \fIsig\(rucode\fP, is also passed to the function. \fISig\(rucode\fP has various contents, according to the value of \fIsig\fP. These values are provided in the table below. Before entering the signal-catching function, the value of .I func\^ for the caught signal is set to .SM .B SIG\(ruDFL unless the signal is .SM .BR SIGILL , .SM .BR SIGTRAP ", or" .SM .BR SIGPWR . .PP Upon return from the signal-catching function, the receiving process resumes execution at the point it was interrupted. See the WARNINGS section below. .PP When a signal that is to be caught occurs during a \fIread\fP(2), \fIwrite\fP(2), \fIopen\fP(2), or \fIioctl\fP(2) system call on a slow device (like a terminal; but not a file), during a .IR pause (2) system call, or during a .IR wait (2) system call that does not return immediately due to the existence of a previously stopped or zombie process, the signal catching function is executed; then the interrupted system call returns aents of the new process file's pathname do not exist. .SM \%[ENOENT] .IP A component of the new process file's path prefix is not a directory. .SM \%[ENOTDIR] .IP Search permission is denied for a directory listed in the new process file's path prefix. .SM \%[EACCES] .IP The new process file is not an ordinary file. .SM \%[EACCES] .IP The new process file mode denies execution permission. .SM \%[EACCES] .IP The \f2exec\f1 is not an .I execlp\^ or .IR execvp\^ , and the new process file has the appropriate access permission but an invalid magic number in its header. .SM \%[ENOEXEC] .IP The new process file is a pure procedure (shared text) file that is currently open for writing by some process. .SM \%[ETXTBSY] .IP The new process requires more memory than is allowed by the system-imposed maximum .SM MAXMEM. .SM \%[ENOMEM] .IP The number of bytes in the new process's argument list is greater than the system-imposed limit of 5,120 bytes. .SM \%[E2BIG] .IP The new process file is not as long as indicated by the .TH MSGCTL 2 .SH NAME msgctl \- message control operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int msgctl (" "msqid, cmd, buf" ) .BR "int" " msqid, cmd" ; .BR "struct msqid_ds \(**" "buf" ; .fi .SH DESCRIPTION .I Msgctl provides a variety of message control operations as specified by .IR cmd . The following .IR cmd s are available: .TP \w'\fB\s-1IPC_RMID\s+1\fP\ \ \ 'u .SM .B IPC_STAT Place the current value of each member of the data structure associated with .I msqid into the structure pointed to by .IR buf . The contents of this structure are defined in .IR intro (2). .SM {READ} .TP .SM .B IPC_SET Set the value of the following members of the data structure associated with .I msqid to the corresponding value found in the structure pointed to by .IR buf : .RS .RS .nf \f3msg_perm.uid\f1 \f3msg_perm.gid\f1 \f3msg_perm.mode \f1/\(** only low 9 bits \(**/ \f3msg_qbytes\f1 .fi .RE .RE .IP This \fIcmd\fP can only be executed by a process tha)  \-1 to the calling process with .I errno\^ set to .SM EINTR\*S. .PP Note: the signal .B .SM SIGKILL cannot be caught. .RE .RE .PP A call to .I signal\^ cancels a pending signal .I sig\^ except for a pending .B \s-1SIGKILL\s+1 signal. .PP .I Signal\^ fails if one or more of the following are true: .IP .I Sig\^ is an illegal signal number, including .SM .BR SIGKILL . .SM \%[EINVAL] .IP .I Func\^ points to an illegal address. .SM \%[EFAULT] .PP The table below shows how \*(5) handles M68000 traps. Most traps result in signals being sent to the user process that caused the trap. All other traps are considered to be STRAYFT, spurious interrupts. .PP The following meanings apply to information in the "SIGNAL CODE" column of the table: .IP code \=\= address means the address causing the fault .IP code \=\= pc means the program counter value at the time of the trap .IP code \=\= (%d0) means the user parameter to the TRAP instruction .sp .in The definitions of KINTDIV, KINTOVF, and KSUBRNG are provided in the includsize values in its header. .SM \%[EFAULT] .IP .IR Path , .IR argv , or .I envp\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE If .I exec\^ returns to the calling process an error has occurred; the return value is \-1 and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exit(2), fork(2), environ(5). .\" @(#)exec.2 1.8 t has an effective user .SM ID equal to either that of superuser or to the value of .I msg_perm.uid in the data structure associated with .IR msqid . Only superuser can raise the value of .IR msg_qbytes . .TP .SM .B IPC_RMID Remove the message queue identifier specified by .I msqid from the system and destroy the message queue and data structure associated with it. This \fIcmd\fP can only be executed by a process that has an effective user .SM ID equal to either that of superuser or to the value of .I msg_perm.uid in the data structure associated with .IR msqid . .PP .I Msgctl fails if one or more of the following are true: .IP .I Msqid is not a valid message queue identifier. .SM \%[EINVAL] .IP .I Cmd is not a valid command. .SM \%[EINVAL] .IP .I Cmd is equal to .SM .B IPC_STAT and .SM {READ} operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Cmd is equal to .SM .B IPC_RMID or .SM .B IPC_SET and the effective user .SM ID of the calling process is not equal to thae file \f3\f1. .DS .TS box center; l c l l l l c l l l l2 c2 l2 l2 l2. TRAP TRAP \& \& SIGNAL TYPE NO. ASSIGNMENT SIGNAL CODE = BUSERR 2 bus error SIGBUS address ADDRERR 3 address error SIGILL address INSTERR 4 illegal instruction SIGILL pc ZDVDERR 5 zero divide fault SIGFPE KINTDIV CHKTRAP 6 CHK instruction fault SIGFPE KSUBRNG TRAPVFT 7 TRAPV instruction fault SIGFPE KINTOVF PRIVFLT 8 T{ .nf privileged instruction fault .fi T} SIGILL pc TRCTRAP 9 trace trap SIGTRAP pc L1010FT 10 line 1010 emulator SIGILL pc L1111FT 11 line 1111 emulator SIGILL pc STRAYFT 24 spurious interrupt n/a n/a SYSCALL 32 TRAP 0 \- system call n/a (%d0) BPTFLT 33 TRAP 1 \- breakpoint SIGTRAP pc IOTTRAP 34 T{ .nf TRAP 2 \- simulate DEC IOT instruction .fi T} SIGIOT (%d0) EMTTRAP 35 T{ .nf TRAP 3 \- simulate DEC EMT instruction .fi T} SIGEMT (%d0) FPETRAP 36 T{ TRAP 4 \- floating point exception T} SIGFPE (%d0) .TE .DE .PD .PP .SH RETURN VALUE Upon successful completion, .I signal\^ returns the previous value of .I func\* .\" @(#)execl.2 1.2 .so /usr/man/u_man/man2/exec.2 t of superuser and is not equal to the value of .I msg_perm.uid in the data structure associated with .IR msqid . .SM \%[EPERM] .IP .I Cmd is equal to .SM .BR IPC_SET\*S, an attempt is being made to increase to the value of .IR msg_qbytes, and the effective user .SM ID of the calling process is not equal to that of superuser. .SM \%[EPERM] .IP .I Buf points to an illegal address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO msgget(2), msgop(2). .\" @(#)msgctl.2 1.5 ^ for the specified signal .IR sig . Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO kill(1), kill(2), pause(2), ptrace(2), wait(2), setjmp(3C). .SH WARNINGS Two other signals that behave differently than the signals described above exist in this release of the system. They are: .PP .RS 8 .nf .ta \w'SIGMMMM 'u +\w'15\(** 'u .BR \s-1SIGCLD\s+1 " 18 death of a child (reset when caught)" .BR \s-1SIGPWR\s+1 " 19 power fail (not reset when caught)" .fi .RE .PP There is no guarantee that, in future releases of the .SM UNIX System, these signals will continue to behave as described below; they are included only for compatibility with other versions of the .SM UNIX System. Their use in new programs is strongly discouraged. .PP For these signals, .I func\^ is assigned one of three values: .BR \s-1SIG\(ruDFL\s+1 , .BR \s-1SIG\(ruIGN\s+1 , or a .IR "function address" . The actions prescribed by these values are as follows: .RS 2 .PP .SM .B SIG\(ruDFL - ignore signal .R.\" @(#)execle.2 1.2 .so /usr/man/u_man/man2/exec.2 * .TH MSGGET 2 .SH NAME msgget \- get message queue .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int msgget (" "key, msgflg" ")" .BR key_t " key" ; .BR int " msgflg" ; .fi .SH DESCRIPTION .I Msgget returns the message queue identifier associated with .IR key . .PP A message queue identifier and associated message queue and data structure (see .IR intro (2)) are created for .I key if one of the following is true: .IP .I Key is equal to .SM .BR IPC_PRIVATE . .IP .I Key does not already have a message queue identifier associated with it, and .RI ( msgflg " & " .SM .BR IPC_CREAT\*S ) is ``true''. .PP Upon creation, the data structure associated with the new message queue identifier is initialized as follows: .IP .IR Msg_perm.cuid ", " msg_perm.uid , .IR msg_perm.cgid ", and " msg_perm.gid are set equal to the effective user .SM ID and effective group .SM ID\*S, respectively, of the calling process. .IP The low-order 9 bits of .I msg_perm.mode are set eqS 8 The signal is to be ignored. .RE .PP .SM .B SIG\(ruIGN - ignore signal .RS 8 The signal is to be ignored. If .I sig\^ is .SM .BR SIGCLD , the calling process's child processes do not create zombie processes when they terminate; see .IR exit (2). .RE .PP .I function address\^ - catch signal .RS 8 If the signal is .SM .BR SIGPWR , the action to be taken is the same as that described above for .I func\^ equal to .IR "function address" . The same is true if the signal is .SM .BR SIGCLD , except that, while the process is executing the signal-catching function, any received .SM .B SIGCLD signals are queued and the signal-catching function is continually reentered until the queue is empty. .RE .PP The .SM .B SIGCLD affects two other system calls .RI ( wait "(2) and " exit (2)) in the following ways: .TP 8 .I wait\^ If the .I func\^ value of .SM .B SIGCLD is set to .SM .B SIG\(ruIGN and a .I wait\^ is executed, the .I wait\^ blocks until all of the calling process's child processes terminate; it then returns a .\" @(#)execlp.2 1.2 .so /usr/man/u_man/man2/exec.2 ual to the low-order 9 bits of .IR msgflg . .IP .IR Msg_qnum ", " msg_lspid ", " msg_lrpid , .IR msg_stime ", and " msg_rtime " are set equal to 0. .IP .I Msg_ctime is set equal to the current time. .IP .I Msg_qbytes is set equal to the system limit. .PP .I Msgget fails if one or more of the following are true: .IP A message queue identifier exists for .I key but operation permission (see .IR intro (2)), as specified by the low-order 9 bits of .IR msgflg , would not be granted. .SM \%[EACCES] .IP A message queue identifier does not exist for .I key and .RI ( msgflg " &" .SM .BR IPC_CREAT\*S ) is ``false''. .SM \%[ENOENT] .IP A message queue identifier is to be created but the system imposed limit on the maximum number of allowed message queue identifiers system wide would be exceeded. .SM \%[ENOSPC] .IP A message queue identifier exists for .I key but .RI "( (" msgflg " & " .SM .BR IPC_CREAT\*S ") & (" .IR msgflg " & " .SM .BR IPC_EXCL\*S ") )" is ``true''. .SM \%[EEXIST] .SH "RETURN VALUE" Upon successful c+ value of \-1 with .I errno\^ set to .SM ECHILD. .TP 8 .I exit\^ If in the exiting process's parent process the .I func\^ value of .SM .B SIGCLD is set to .SM .BR SIG\(ruIGN , the exiting process does not create a zombie process. .PP When processing a pipeline, the shell makes the last process in the pipeline the parent of the preceding processes. A process that may be piped into in this manner (and thus become the parent of other processes) should take care not to set .SM .B SIGCLD to be caught. .sp The ability to resume execution upon return from the signal-catching function is machine-dependent. For the M68000, resumption cannot occur after faults requiring instruction recovery. These faults are bus errors and address errors. .\" @(#)signal.2 1.10 .\" @(#)execv.2 1.2 .so /usr/man/u_man/man2/exec.2 ompletion, a non-negative integer (i.e., a message queue identifier) is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO msgctl(2), msgop(2). .\" @(#)msgget.2 1.5 .TH STAT 2 .SH NAME stat, fstat \- get file status .SH SYNOPSIS .B #include .br .B #include .PP .BR "int stat (" "path, buf" ) .br .BR "char \(**" path ; .br .BR "struct stat \(**" buf ; .PP .BR "int fstat (" "fildes, buf" ) .br .BR int " fildes" ; .br .BR "struct stat \(**" buf ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. Read, write or execute permission of the named file is not required, but all directories listed in the pathname leading to the file must be searchable. .I Stat\^ obtains information about the named file. .PP Similarly, .I fstat\^ obtains information about an open file known by the file descriptor .IR fildes , obtained from a successful .IR open (2), .IR creat (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .PP .I Buf\^ is a pointer to a .I stat\^ structure into which information is placed concerning the file. .PP The contents of the structure pointed to by .I buf\^ include the following members: .sp .RS .ta 8n 18n \f3ushort \f2st_m+ .\" @(#)execve.2 1.2 .so /usr/man/u_man/man2/exec.2 .ds _ .ru .TH MSGOP 2 .SH NAME msgsnd, msgrcv \- message operations .SH SYNOPSIS .B #include .br .B #include .br .B #include .PP .nf .BR "int msgsnd (" "msqid, msgp, msgsz, msgflg" ) .BR int " msqid" ; .BR "struct msgbuf \(**" "msgp" ; .BR int " msgsz, msgflg" ; .PP .BR "int msgrcv (" "msqid, msgp, msgsz, msgtyp, msgflg" ) .BR int " msqid" ; .BR "struct msgbuf \(**" "msgp" ; .BR int " msgsz" ; .BR long " msgtyp" ; .BR int " msgflg" ; .fi .SH DESCRIPTION .I Msgsnd\^ is used to send a message to the queue associated with the message queue identifier specified by .IR msqid .\^\^\s-1{WRITE}\s+1 .I Msgp points to a structure containing the message. This structure is composed of the following members: .PP .RS .ta 8n 20n .nf \f3long\f2 mtype\f3;\f1 /\(** message type \(**/ \f3char\f2 mtext[]\f3;\f1 /\(** message text \(**/ .fi .RE .PP .I Mtype is a positive integer that can be used by the receiving process for message selection (see .IR msgrcv " below"). .I Mtext is any text of ode\f3;\f1 /\(** File mode; see .IR mknod (2) \(**/ .br \f3ino_t\f2 st_ino\f3;\f1 /\(** Inode number \(**/ .br \f3dev_t\f2 st_dev\f3;\f1 /\(** .SM ID of device containing \(**/ .br /\(** a directory entry for this file \(**/ .br \f3dev_t\f2 st_rdev\f3;\f1 /\(** .SM ID of device \(**/ .br /\(** This entry is defined only for \(**/ .br /\(** character special or block \(**/ .br /\(** special files \(**/ .br \f3short\f2 st_nlink\f3;\f1 /\(** Number of links \(**/ .br \f3ushort\f2 st_uid\f3;\f1 /\(** User .SM ID of the file's owner \(**/ .br \f3ushort\f2 st_gid\f3;\f1 /\(** Group .SM ID of the file's group \(**/ .br \f3off_t\f2 st_size\f3;\f1 /\(** File size in bytes \(**/ .br \f3time_t\f2 st_atime\f3;\f1 /\(** Time of last access \(**/ .br \f3time_t\f2 st_mtime\f3;\f1 /\(** Time of last data modification \(**/ .br \f3time_t\f2 st_ctime\f3;\f1 /\(** Time of last file status change \(**/ .br /\(** Times measured in seconds since \(**/ .br /\(** 00:00:00 .SM GMT\*S, Jan. 1, 1970 \(**/ .RE .DT .PP \fISt.\" @(#)execvp.2 1.2 .so /usr/man/u_man/man2/exec.2 , length .I msgsz bytes. .I Msgsz can range from 0 to a system imposed maximum. .PP .I Msgflg specifies the action to be taken if one or more of the following are true: .IP The number of bytes already on the queue is equal to .IR msg_qbytes .RI (see " intro" (2)). .IP The total number of messages on all queues system-wide is equal to the system imposed limit. .PP These actions are as follows: .IP If .RI ( msgflg " & " .SM .BR IPC_NOWAIT\*S ) is ``true'', the message is not sent and the calling process returns immediately. .IP If .RI ( msgflg " & " .SM .BR IPC_NOWAIT\*S ) is ``false'', the calling process suspends execution until one of the following occurs: .RS 8 .IP The condition responsible for the suspension no longer exists, in which case the message is sent. .IP .I Msqid is removed from the system (see .IR msgctl (2)). When this occurs, .I errno is set equal to .SM \%EIDRM\*S and a value of \-1 is returned. .IP The calling process receives a signal that is to be caught. In this case the message is not sen_atime\fP, \fIst_mtime\fP, and \fIst_ctime\fP are changed by system calls as stated below. .sp .TP 10 .I st_atime Time when file data was last accessed. Changed by the following system calls: .IR creat (2), .IR mknod (2), .IR pipe (2), .IR utime (2), and .IR read (2). .TP 10 .I st_mtime Time when data was last modified. Changed by the following system calls: .IR creat (2), .IR mknod (2), .IR pipe (2), .IR utime (2), and .IR write (2). .TP 10 .I st_ctime Time when file status was last changed. Changed by the following system calls: .IR chmod (2), .IR chown (2), .IR creat (2), .IR link (2), .IR mknod (2), .IR pipe (2), .IR unlink (2), .IR utime (2), and .IR write (2). .PP .I Stat\^ fails if one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied for a component of the path prefix. .SM \%[EACCES] .IP .I Buf\^ or .I path\^ points to an invalid address. .SM \%[EFAULT] .PP .I Fstat.TH EXIT 2 .SH NAME exit, _exit \- terminate process .SH SYNOPSIS .BR "void exit (" "status" ) .br .BR int " status" ; .br .BR "void _exit (" "status" ) .br .BR int " status" ; .SH DESCRIPTION .I Exit\^ terminates the calling process with the following consequences: .IP All the file descriptors open in the calling process are closed. .IP If the parent process of the calling process is executing a .IR wait , it is notified of the calling process's termination and the low-order 8 bits (i.e., bits 0377) of .I status\^ are made available to it; see .IR wait (2). .IP If the parent process of the calling process is not executing a .IR wait , the calling process is transformed into a zombie process. A .I "zombie process\^" is a process that only occupies a slot in the process table; it has no other space allocated in user space or kernel space. The process table slot that it occupies is partially overlaid with time accounting information (see .BR ) to be used by .IR times. .IP The parent process .SM IDt and the calling process resumes execution in the manner prescribed in .IR signal (2)). .RE .PP .I Msgsnd fails and no message is sent if one or more of the following are true: .IP .I Msqid is not a valid message queue identifier. .SM \%[EINVAL] .IP Operation permission is denied to the calling process (see .IR intro (2)). .SM \%[EACCES] .IP .I Mtype is less than 1. .SM \%[EINVAL] .IP The message cannot be sent for one of the reasons cited above and .RI ( msgflg " & " .SM .BR IPC_NOWAIT\*S ) is ``true''. .SM \%[EAGAIN] .IP .I Msgsz is less than zero or greater than the system imposed limit. .SM \%[EINVAL] .IP .I Msgp points to an illegal address. .SM \%[EFAULT] .PP Upon successful completion, the following actions are taken with respect to the data structure associated with .IR msqid (see intro (2)). .IP .I Msg_qnum is incremented by 1. .IP .I Msg_lspid is set equal to the process .SM ID of the calling process. .IP .I Msg_stime is set equal to the current time. .PP .I Msgrcv reads a message from the queue as, \^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .IP .I Buf\^ points to an invalid address. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" chmod(2), chown(2), creat(2), link(2), mknod(2), time(2), unlink(2). .\" @(#)stat.2 1.5  of all the calling process's existing child processes and zombie processes is set to 1. This means the initialization process (see .IR intro (2)) inherits each of these processes. .IP Each attached shared memory segment is detached and the value of .I shm_nattach in the data structure associated with its shared memory identifier is decremented by 1; see \fIshmop\fP(2). .IP For each semaphore for which the calling process has set a semaphore adjustment (semadj) value (see .IR semop (2)), that semadj value is added to the \fIsemval\fP of the specified semaphore. .IP If the process has a process, text, or data lock, an .I unlock\^ is performed (see .IR plock (2)). .IP An accounting record is written on the accounting file if the system's accounting routine is enabled; see .IR acct\^ (2). .IP If the process .SM ID\*S, tty group .SM ID\*S, and process group .SM ID of the calling process are equal, the .SM .B SIGHUP signal is sent to each process that has a process group .SM ID equal to that of the calling procesociated with the message queue identifier specified by .IR msqid and places it in the structure pointed to by .IR msgp .\^\^\s-1{READ}\s+1 This structure is composed of the following members: .PP .RS .ta 8n 20n .nf \f3long\f2 mtype\f3;\f1 /\(** message type \(**/ \f3char\f2 mtext[]\f3;\f1 /\(** message text \(**/ .fi .RE .PP .I Mtype is the received message's type, as specified by the sending process. .I Mtext is the text of the message. .I Msgsz specifies the size in bytes of .IR mtext. The received message is truncated to .IR msgsz " bytes" if it is larger than .I msgsz and .RI ( msgflg " &" .SM .BR MSG_NOERROR\*S ) is ``true''. The truncated part of the message is lost and no indication of the truncation is given to the calling process. .PP .I Msgtyp specifies the type of message requested as follows: .IP If .I msgtyp is equal to 0, the first message on the queue is received. .IP If .I msgtyp is greater than 0, the first message of type .I msgtyp is received. .IP If .I msgtyp is less than 0, the first mes.TH STIME 2 .SH NAME stime \- set time .SH SYNOPSIS .BR "int stime (" tp ) .br .BR "long \(**" tp ; .SH DESCRIPTION .I Stime\^ sets the system's idea of the time and date. .I Tp\^ points to the value of time as measured in seconds from 00:00:00 \s-1GMT\s0 January 1, 1970. .PP .I Stime\^ fails if the effective user .SM ID of the calling process is not superuser. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" time(2). .\" @(#)stime.2 1.4 - ss. .PP The C function .I exit\^ may cause cleanup actions before the process exits. The function .I _exit\^ circumvents all cleanup. .SH "SEE ALSO" acct(2), plock(2), semop(2), shmop(2), signal(2), times(2), wait(2). .SH WARNING See .SM .I WARNING\^ in .IR signal (2). .\" @(#)exit.2 1.6 sage of the lowest type that is less than or equal to the absolute value of .I msgtyp is received. .PP .I Msgflg specifies the action to be taken if a message of the desired type is not on the queue. These are as follows: .IP If .RI ( msgflg " & " .SM .BR IPC_NOWAIT\*S ) is ``true'', the calling process returns immediately with a return value of \-1 and .I errno set to .SM ENOMSG\*S. .IP If .RI ( msgflg " & " .SM .BR IPC_NOWAIT\*S ) is ``false'', the calling process suspends execution until one of the following occurs: .RS 8 .IP A message of the desired type is placed on the queue. .IP .I Msqid is removed from the system. When this occurs, .I errno is set equal to .SM \%EIDRM\*S, and a value of \-1 is returned. .IP The calling process receives a signal that is to be caught. In this case a message is not received and the calling process resumes execution in the manner prescribed in .IR signal (2)). .RE .PP .I Msgrcv fails and no message is received if one or more of the following are true: .IP .I Msqid is notsync.2sys3b.2time.2times.2ulimit.2umask.2umount.2uname.2unlink.2ustat.2utime.2wait.2write.2.TH FCNTL 2 .SH NAME fcntl \- file control .SH SYNOPSIS .B #include .PP .BR "int fcntl (" "fildes, cmd, arg" ) .br .BR int " fildes, cmd, arg" ; .SH DESCRIPTION .I Fcntl\^ provides control over open files. .I Fildes\^ is an open file descriptor obtained from a .IR creat (2), .IR open (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .PP The .IR cmd s available are: .TP 1i .SM \f3F_DUPFD\f1 Return a new file descriptor as follows: .IP Lowest numbered available file descriptor greater than or equal to .IR arg . .IP Same open file (or pipe) as the original file. .IP Same file pointer as the original file (i.e., both file descriptors share one file pointer). .IP Same access mode (read, write, or read/write). .IP Same file status flags (i.e., both file descriptors share the same file status flags). .IP The close-on-exec flag associated with the new file descriptor is set to remain open across .IR exec (2) system calls. .TP .SM \f3F_GETFD\f1 Get the close-on-exec flag associated with the file -  a valid message queue identifier. .SM \%[EINVAL] .IP Operation permission is denied to the calling process. .SM \%[EACCES] .IP .I Msgsz is less than 0. .SM \%[EINVAL] .IP .I Mtext\^ is greater than .I msgsz and .RI ( msgflg " &" .SM .BR MSG_NOERROR\*S ) is ``false''. .SM \%[E2BIG] .IP The queue does not contain a message of the desired type and .RI ( msgtyp " & " .SM .BR IPC_NOWAIT\*S ) is ``true''. .SM \%[ENOMSG] .IP .I Msgp points to an illegal address. .SM \%[EFAULT] .PP Upon successful completion, the following actions are taken with respect to the data structure associated with .IR msqid (see intro (2)). .IP .I Msg_qnum is decremented by 1. .IP .I Msg_lrpid is set equal to the process .SM ID of the calling process. .IP .I Msg_rtime is set equal to the current time. .SH RETURN VALUES .RI If " msgsnd " or " msgrcv" returns due to the receipt of a signal, a value of \-1 is returned to the calling process and .I errno is set to .SM \%EINTR\*S. If they return due to removal of .I msqid from the system, a val.TH SYNC 2 .SH NAME sync \- update super-block .SH SYNOPSIS .B void sync ( ) .SH DESCRIPTION .I Sync\^ causes all information in memory that should be on disk to be written out. This includes modified super-blocks, modified inodes, and delayed block I/O. .PP It should be used by programs which examine a file system, for example .IR fsck "(1M) and" .IR df (1M). It is mandatory before a boot. .PP The writing, although scheduled, is not necessarily complete upon return from .IR sync . .SH "SEE ALSO" .IR "\*(6) Administrator's Manual" . .\" @(#)sync.2 1.4 descriptor .IR fildes . If the low-order bit is .BR 0 , the file remains open across .IR exec ; otherwise the file is closed upon execution of .IR exec . .TP .SM \f3F_SETFD\f1 Set the close-on-exec flag associated with .I fildes\^ to the low-order bit of .I arg\^ .RB ( 0 or .B 1 as above). .TP .SM \f3F_GETFL\f1 Get .I file\^ status flags. .TP .SM \f3F_SETFL\f1 Set .I file\^ status flags to .IR arg . Only certain flags can be set; see .IR fcntl (5). .PP .I Fcntl\^ fails if one or more of the following are true: .IP .I Fildes\^ is not a valid open file descriptor. .SM \%[EBADF] .IP .I Cmd\^ is .SM \f3F_DUPFD\f1 and 20 file descriptors are currently open. .SM \%[EMFILE] .IP .I Cmd\^ is .SM \f3F_DUPFD\f1 and .I arg\^ is negative or greater than 20. .SM \%[EINVAL] .PP Refer to \fIfcntl\fR(5) for a list of the flag values contained in \fB\fR. .SH "RETURN VALUE" Upon successful completion, the value returned depends on .I cmd\^ as follows: .PD 0 .RS .TP 1i .SM \f3F_DUPFD\f1 A new file descriptor. .TP .SM \fue of \-1 is returned and .I errno is set to .SM \%EIDRM\*S. .PP Upon successful completion, the return value is as follows: .IP .I Msgsnd returns a value of 0. .IP .I Msgrcv returns a value equal to the number of bytes actually placed into .IR mtext . .PP Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO msgctl(2), msgget(2). .\" @(#)msgop.2 1.7 . .TH SYS3B 2 "3B20S only" .SH NAME sys3b \- 3B20S specific system calls .SH SYNOPSIS .B void sys3b (cmd, arg1[, arg2]) .br .B int cmd, arg1, arg2; .SH DESCRIPTION This system call provides for 3B20S specific actions. Most require super-user privileges as the effects can be dangerous. The .I cmd\^ values available are: .TP 5 .B 1 Reboot the processor. This call causes an immediate entry into the bootstrap code. .TP 5 .B 2 System \fIprintf\fP interface. .I Arg1 is taken as a pointer to a null terminated string to be copied into the operating system circular print buffer. .TP 5 .B 3 Attach to an address translation buffer. .TP 5 .B 4 System namelist interface. The value of .I arg1 is used to return the address of various data elements in the system. .TP 5 .B 5 Override for system Maintenance Reset Function (\s-1MRF\s+1) action. If .I arg1 is non-zero, it is taken as the indicator for handling a processor \s-1MRF\s+1. If zero, the current setting is returned. .TP 5 .B 6 Send a Processor Recovery Message (\s-1PRM\s3F_GETFD\f1 Value of flag (only the low-order bit is defined). .TP .SM \f3F_SETFD\f1 Value other than \-1. .TP .SM \f3F_GETFL\f1 Value of file flags. .TP .SM \f3F_SETFL\f1 Value other than \-1. .RE .PP .PD Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" close(2), exec(2), open(2), fcntl(5). .\" @(#)fcntl.2 1.7 .TH NICE 2 .SH NAME nice \- change priority of a process .SH SYNOPSIS .BR "int nice (" "incr" ) .br .BR int " incr" ; .SH DESCRIPTION .I Nice\^ adds the value of .I incr\^ to the nice value of the calling process. A process's .I nice value\^ is a positive number for which a more positive value results in lower .SM CPU priority. .PP A maximum nice value of 39 and a minimum nice value of 0 are imposed by the system. Requests for values above or below these limits result in the nice value being set to the corresponding limit. .PP .I Nice\^ fails and does not change the nice value if .I incr\^ is negative and the effective user .SM ID of the calling process is not superuser. .SM \%[EPERM] .SH RETURN VALUE Upon successful completion, .I nice\^ returns the new nice value minus 20. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO nice(1), exec(2). .\" @(#)nice.2 1.4 +1). .I Arg1 is used as a pointer to a 16 byte string to be converted to a \s-1PRM\s+1 and transmitted to the Emergency Action Interface (\s-1EAI\s+1). .TP 5 .B 7 Modify the System Status Register (\s-1SSR\s+1). Bits set in .I arg1 are set or cleared in the \s-1SSR\s+1 if .I arg2 is non-zero or zero, respectively. .TP 5 .B 8 Read \s-1EAI\s+1 Input Parameter Buffer. .I Arg1 is used as a location in user space where the current Input Parameter Buffer is to be placed. .TP 5 .B 9 Change default Field Test Set utility-id. .B 10 Change the floating point flag bits in the extended processor status word. .SH SEE ALSO fts(1M), ipb(1M), prm(1M), reboot(1M), setmrf(1M), ssr(1M), in the .IR "U\s-1NIX\s+1 System Administrator's Manual" . .\" @(#)sys3b.2 1.1 . .TH FORK 2 .SH NAME fork \- create a new process .SH SYNOPSIS .B int fork (\|) .SH DESCRIPTION .I Fork\^ causes creation of a new process. The new process (child process) is an exact copy of the calling process (parent process). This means the child process inherits the following attributes from the parent process: .PP .PD 0 .RS 0.5i .TP .5i \-\-\^ environment .TP .5i \-\-\^ close-on-exec flag (see .IR exec (2)) .TP .5i \-\-\^ signal handling settings (i.e., .SM .BR SIG_DFL ", " SIG_IGN , function address) .TP .5i \-\-\^ set-user-\s-1ID\s+1 mode bit .TP .5i \-\-\^ set-group-\s-1ID\s+1 mode bit .TP .5i \-\-\^ profiling on/off status .TP .5i \-\-\^ nice value (see .IR nice (2)) .TP .5i \-\-\^ all attached shared memory segments (see .IR shmop (2)) .TP .5i \-\-\^ process group .SM ID .TP .5i \-\-\^ tty group .SM ID (see .IR exit (2) and .IR signal (2)) .TP .5i \-\-\^ trace flag (see .IR ptrace "(2) request 0)" .TP .5i \-\-\^ time left until an alarm clock signal (see .IR alarm (2)) .TP .5i \-\-\^ current wor.TH OPEN 2 .SH NAME open \- open for reading or writing .SH SYNOPSIS .B #include .br .BR "int open (" "path, oflag," " [" "mode" "] )" .br .BR "char \(**" "path" ; .br .BR int " oflag, mode" ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. .I Open\^ opens a file descriptor for the named file and sets the file status flags according to the value of .IR oflag . .I Oflag\^ values are constructed by or-ing flags from the following list (only one of the first three flags below may be used): .PP .TP .88i .SM .B O\(ruRDONLY Open for reading only. .TP .SM .B O\(ruWRONLY Open for writing only. .TP .SM .B O\(ruRDWR Open for reading and writing. .TP .SM .B O\(ruNDELAY This flag may affect subsequent reads and writes. See .IR read (2) and .IR write (2). .IP When opening a .SM FIFO with .SM \f3O\(ruRDONLY\f1 or .SM \f3O\(ruWRONLY\f1 set: .IP If .SM \f3O\\(ruNDELAY\f1 is set: .RS .IP An .I open\^ for reading-only returns without delay. An .I open\^ for writing-only returns an error if no process c.TH TIME 2 .SH NAME time \- get time .SH SYNOPSIS .B long time ((long \(**) 0) .PP .BR "long time (" tloc ) .br .BR "long \(**" tloc ; .SH DESCRIPTION .I Time\^ returns the value of time in seconds since 00:00:00 \s-1GMT\s0, January 1, 1970. .PP If .I tloc\^ (taken as an integer) is non-zero, the return value is also stored in the location to which .I tloc\^ points. .PP .I Time\^ fails if .I tloc\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE Upon successful completion, .I time\^ returns the value of time. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stime(2). .\" @(#)time.2 1.4 king directory .TP .5i \-\-\^ root directory .TP .5i \-\-\^ file mode creation mask (see .IR umask (2)) .TP .5i \-\-\^ file size limit (see .IR ulimit (2)) .RE .PD .PP The child process differs from the parent process in the following ways: .IP The child process has a unique process .SM ID\*S. .IP The child process has a different parent process .SM ID (i.e., the process .SM ID of the parent process). .IP The child process has its own copy of the parent's file descriptors. Each of the child's file descriptors shares a common file pointer with the corresponding file descriptor of the parent. .IP All semadj values are cleared (see .IR semop (2)). .IP Process locks, text locks, and data locks are not inherited by the child (see .IR plock (2)). .IP The child process's .IR utime , " stime" , " cutime" , and .I cstime\^ are set to 0. .PP .I Fork\^ fails and no child process is created if one or more of the following are true: .IP The system-imposed limit on the total number of processes under execution would be ex/ urrently has the file open for reading. .RE .IP If .SM \f3O\(ruNDELAY\f1 is clear: .RS .IP An .I open\^ for reading-only blocks until a process opens the file for writing. An .I open\^ for writing-only blocks until a process opens the file for reading. .RE .IP When opening a file associated with a communication line: .IP If .SM \f3O\(ruNDELAY\f1 is set: .RS .IP The \fIopen\fP returns without waiting for carrier. .RE .IP If .SM \f3O\(ruNDELAY\f1 is clear: .RS .IP The \fIopen\fP blocks until carrier is present. .RE .TP .SM .B O\(ruAPPEND If set, the file pointer is set to the end of the file prior to each write. .TP .SM .B O\(ruCREAT If the file exists, this flag has no effect. Otherwise, the file's owner .SM ID is set to the process's effective user .SM ID\*S, the file's group .SM ID is set to the process's effective group .SM ID\*S, and the low-order 12 bits of the file mode are set to the value of .I mode\^ modified as follows (see .IR creat (2)): .RS .IP All bits set in the process's file mode creation mask.TH TIMES 2 .SH NAME times \- get process and child process times .SH SYNOPSIS .B #include .br .B #include .PP .BR "long times (" buffer ) .br .BR "struct tms \(**" buffer ; .SH DESCRIPTION .I Times\^ fills the structure pointed to by .I buffer\^ with time-accounting information. Contents of the structure are: .PP .nf .ta .5i 1i 1.75i \f3struct tms {\f1 \f3time_t\f2 tms_utime\f3;\f1 \f3time_t\f2 tms_stime\f3;\f1 \f3time_t\f2 tms_cutime\f3;\f1 \f3time_t\f2 tms_cstime\f3;\f1 \f3};\f1 .fi .PP This information comes from the calling process and each of its terminated child processes for which it has executed a .IR wait . All times are in 60ths of a second. .PP .I Tms_utime\^ is the .SM CPU time used while executing instructions in the user space of the calling process. .PP .I Tms_stime\^ is the .SM CPU time used by the system on behalf of the calling process. .PP .I Tms_cutime\^ is the sum of the .IR "tms_utime"s and .IR "tms_cutime"s of the child processes. .PP .I Tms_cstime\^ isceeded. .SM \%[EAGAIN] .IP The system-imposed limit on the total number of processes under execution by a single user would be exceeded. .SM \%[EAGAIN] .SH RETURN VALUE Upon successful completion, .I fork\^ returns a value of 0 to the child process and returns the process .SM ID of the child process to the parent process. Otherwise, a value of \-1 is returned to the parent process, no child process is created, and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exec(2), times(2), wait(2). .\" @(#)fork.2 1.7  are cleared. See .IR umask (2). .IP Mode bit 01000 (save text image after execution) is cleared. See .IR chmod (2). .RE .TP .SM .B O\(ruTRUNC If the file exists, its length is truncated to 0 and the mode and owner are unchanged. .TP .SM .B O\(ruEXCL If .SM .B O\(ruEXCL and .SM .B O\(ruCREAT are set, .I open\^ fails if the file exists. .PP Upon successful completion a non-negative integer, the file descriptor, is returned. .PP The file pointer used to mark the current position within the file is set to the beginning of the file. .PP The new file descriptor is set to remain open across .I exec\^ system calls. See .IR fcntl (2). .PP No process may have more than 20 file descriptors open simultaneously. .PP The named file is opened unless one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP .SM .B O\(ruCREAT is not set and the named file does not exist. .SM \%[ENOENT] .IP A component of the path prefix denies search permission. .SM \%[EACCES] .IP .I Of/  the sum of the .IR "tms_stime" s and .IR "tms_cstime" s of the child processes. .PP .I Times\^ fails if .I buffer\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE Upon successful completion, .I times\^ returns the elapsed real time, in 60ths of a second, since an arbitrary point in the past (e.g., system start-up time). This point does not change from one invocation of .I times\^ to another. If .I times\^ fails, a \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exec(2), fork(2), time(2), wait(2). .\" @(#)times.2 1.5 .\" @(#)fstat.2 1.2 .so /usr/man/u_man/man2/stat.2 lag\^ permission is denied for the named file. .SM \%[EACCES] .IP The named file is a directory and .I oflag\^ is write or read/write. .SM \%[EISDIR] .IP The named file resides on a read-only file system and .I oflag\^ is write or read/write. .SM \%[EROFS] .IP 20 file descriptors are currently open. .SM \%[EMFILE] .IP The named file is a character special or block special file, and the device associated with this special file does not exist. .SM \%[ENXIO] .IP The file is a pure procedure (shared text) file that is being executed and .I oflag\^ is write or read/write. .SM \%[ETXTBSY] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .IP .SM .B O\(ruCREAT and .SM .B O\(ruEXCL are set and the named file exists. .SM \%[EEXIST] .IP .SM .B O\(ruNDELAY is set, the named file is a .SM FIFO\*S, .SM .B O\(ruWRONLY is set, and no process has the file open for reading. .SM \%[ENXIO] .SH "RETURN VALUE" Upon successful completion, a non-negative integer (i.e., a file descriptor) is returned.TH ULIMIT 2 .SH NAME ulimit \- get and set user limits .SH SYNOPSIS .BR "long ulimit (" "cmd, newlimit" ) .br .BR int " cmd" ; .br .BR long " newlimit" ; .SH DESCRIPTION This function provides for control over process limits. The .I cmd\^ values available are: .TP 5 .B 1 Get the process's file size limit. The limit is in units of 512-byte blocks and is inherited by child processes. Files of any size can be read. .TP 5 .B 2 Set the process's file size limit to the value of .IR newlimit . Any process may decrease this limit, but only a process with an effective user .SM ID of superuser may increase the limit. .I Ulimit\^ fails and the limit remains unchanged if a process with an effective user .SM ID other than superuser attempts to increase its file size limit. .SM \%[EPERM] .TP 5 .B 3 Get the maximum possible break value. See .IR brk (2). .SH "RETURN VALUE" Upon successful completion, a non-negative value is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE 0 .\" @(#)getegid.2 1.2 .so /usr/man/u_man/man2/getuid.2 ; otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .PP Refer to \fIfcntl\fR(5) for a list of the flag values contained in \fB\fR. .SH "SEE ALSO" close(2), creat(2), dup(2), fcntl(2), lseek(2), read(2), write(2), fcntl(5). .\" @(#)open.2 1.10 ALSO brk(2), write(2). .\" @(#)ulimit.2 1.4 .\" @(#)geteuid.2 1.2 .so /usr/man/u_man/man2/getuid.2 0 .TH PAUSE 2 .SH NAME pause \- suspend process until signal .SH SYNOPSIS .B pause (\|) .SH DESCRIPTION .I Pause\^ suspends the calling process until it receives a signal. The signal must be one that is not currently set to be ignored by the calling process. .PP If the signal causes termination of the calling process, .I pause\^ does not return. .PP If the signal is caught by the calling process and control is returned from the signal-catching function (see .IR signal (2)), the calling process resumes execution from the point of suspension. A value of \-1 is returned from .I pause\^ and .I errno\^ is set to .SM EINTR. .SH SEE ALSO alarm(2), kill(2), signal(2), wait(2). .\" @(#)pause.2 1.5 .TH UMASK 2 .SH NAME umask \- set and get file creation mask .SH SYNOPSIS .PP .BR "int umask (" cmask ) .br .BR int " cmask" ; .SH DESCRIPTION .I Umask\^ sets the process's file mode creation mask to .I cmask\^ and returns the previous value of the mask. Only the low-order 9 bits of .I cmask\^ and the file mode creation mask are used. .SH "RETURN VALUE" The previous value of the file mode creation mask is returned. .SH SEE ALSO mkdir(1), sh(1), chmod(2), creat(2), mknod(2), open(2). .\" @(#)umask.2 1.3 .\" @(#)getgid.2 1.2 .so /usr/man/u_man/man2/getuid.2 .TH PIPE 2 .SH NAME pipe \- create an interprocess channel .SH SYNOPSIS .BR "int pipe (" "fildes" ) .br .BR int " fildes" [2]; .SH DESCRIPTION .I Pipe\^ creates an I/O mechanism called a pipe and returns two file descriptors, .IR fildes [0] and .IR fildes [1]. .IR Fildes [0] is opened for reading and .IR fildes [1] is opened for writing. .PP Writes of up to 5,120 bytes of data are buffered by the pipe before the writing process is blocked. A read on .IR fildes [0] accesses the data written to .IR fildes [1] on a first-in-first-out basis. .PP No process may have more than 20 file descriptors open simultaneously. .PP .I Pipe\^ fails if 19 or more file descriptors are currently open. .SM \%[EMFILE] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" sh(1), read(2), write(2). .\" @(#)pipe.2 1.6 1 .TH UMOUNT 2 .SH NAME umount \- unmount a file system .SH SYNOPSIS .BR "int umount (" spec ) .br .BR "char \(**" spec ; .SH DESCRIPTION .I Umount\^ requests that a previously mounted file system contained on the block special device identified by .I spec\^ be unmounted. .I Spec\^ is a pointer to a pathname. After unmounting the file system, the directory upon which the file system was mounted reverts to its ordinary interpretation. .PP .I Umount\^ may be invoked only by the superuser. .PP .I Umount\^ fails if one or more of the following are true: .IP The process's effective user .SM ID is not superuser. .SM \%[EPERM] .IP .I Spec\^ does not exist. .SM \%[ENXIO] .IP .I Spec\^ is not a block special device. .SM \%[ENOTBLK] .IP .I Spec\^ is not mounted. .SM \%[EINVAL] .IP A file on .I spec\^ is busy. .SM \%[EBUSY] .IP .I Spec\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion a value of 0 is returned. Otherwise, a value of \-1 is returned and .I e.\" @(#)getpgrp.2 1.2 .so /usr/man/u_man/man2/getpid.2 .TH PLOCK 2 .SH NAME plock \- lock process, text, or data in memory .SH SYNOPSIS .B #include .PP .BR "int plock (" "op" ) .br .BR int " op" ; .SH DESCRIPTION .I Plock allows the calling process to lock its text segment (text lock), its data segment (data lock), or both its text and data segments (process lock) into memory. Locked segments are immune to all routine swapping. .I Plock also allows these segments to be unlocked. The effective user \s-1ID\s+1 of the calling process must be superuser to use this call. .I Op specifies the following: .RS 8 .TP 14 .SM .B PROCLOCK lock text & data segments into memory (process lock) .TP .SM .B TXTLOCK lock text segment into memory (text lock) .TP .SM .B DATLOCK lock data segment into memory (data lock) .TP .SM .B UNLOCK remove locks .RE .PP .I Plock fails and does not perform the requested operation if one or more of the following are true: .IP The effective user \s-1ID\s+1 of the calling process is not superuser. .SM \%[EPERM] .IP .I Op is equal to .SM .Brrno\^ is set to indicate the error. .SH "SEE ALSO" mount(2). .\" @(#)umount.2 1.4 1 .TH GETPID 2 .SH NAME getpid, getpgrp, getppid \- get process, process group, and parent process \s-1ID\s+1s .SH SYNOPSIS .B int getpid (\|) .PP .B int getpgrp (\|) .PP .B int getppid (\|) .SH DESCRIPTION .I Getpid\^ returns the process .SM ID of the calling process. .PP .I Getpgrp\^ returns the process group .SM ID of the calling process. .PP .I Getppid\^ returns the parent process .SM ID of the calling process. .SH "SEE ALSO" exec(2), fork(2), intro(2), setpgrp(2), signal(2). .\" @(#)getpid.2 1.2  PROCLOCK and a process lock, a text lock, or a data lock already exists on the calling process. .SM \%[EINVAL] .IP .I Op is equal to .SM .B TXTLOCK and a text lock or a process lock already exists on the calling process. .SM \%[EINVAL] .IP .I Op is equal to .SM .B DATLOCK and a data lock or a process lock already exists on the calling process. .SM \%[EINVAL] .IP .I Op is equal to .SM .B UNLOCK and no type of lock exists on the calling process. .SM \%[EINVAL] .SH RETURN VALUE Upon successful completion, a value of 0 is returned to the calling process. Otherwise, a value of \-1 is returned and .I errno is set to indicate the error. .SH SEE ALSO exec(2), exit(2), fork(2). .\" @(#)plock.2 1.5 .TH UNAME 2 .SH NAME uname \- get name of current operating system .SH SYNOPSIS .B #include .PP .BR "int uname (" name ) .br .BR "struct utsname \(**" name ; .SH DESCRIPTION .I Uname\^ stores information identifying the current system in the structure pointed to by .IR name . .PP .I Uname\^ uses the structure defined in \f3\fP whose members are: .PP .RS \f3char\f2 sysname\f1[9]; .br \f3char\f2 nodename\f1[9]; .br \f3char\f2 release\f1[9]; .br \f3char\f2 version\f1[9]; .br \f3char\f2 machine\f1[9]; .RE .PP .I Uname\^ returns a null-terminated character string naming the current system in the character array .IR sysname . Similarly, .I nodename\^ contains the name that the system is known by on a communications network. .I Release\^ and .I version\^ further identify the operating system. .I Machine\^ contains a standard name that identifies the hardware that the system is running on. .PP .I Uname\^ fails if .I name\^ points to an invalid address. .SM \%[EFAULT] .SH "RETURN VALUE" .\" @(#)getppid.2 1.2 .so /usr/man/u_man/man2/getpid.2 2 .TH PROFIL 2 .SH NAME profil \- execution time profile .SH SYNOPSIS .BR "void profil (" "buff, bufsiz, offset, scale" ) .br .BR "char \(**" "buff" ; .br .BR int " bufsiz, offset, scale" ; .SH DESCRIPTION .I Buff\^ points to an area of core whose length (in bytes) is given by .IR bufsiz . After this call, the user's program counter (pc) is examined each clock tick (60th second); .I offset\^ is subtracted from it and the result is multiplied by .IR scale . If the resulting number corresponds to a word inside .IR buff , that word is incremented. .PP The scale is interpreted as an unsigned, fixed-point fraction with binary point at the left: 0177777 (octal) gives a 1-1 mapping of pc's to words in .IR buff ; 077777 (octal) maps each pair of instruction words together. 02(8) maps all instructions onto the beginning of .I buff\^ (producing a non-interrupting core clock). .PP Profiling is turned off by giving a .I scale\^ of 0 or 1. It is rendered ineffective by giving a .I bufsiz\^ of 0. Profiling is turned off wheUpon successful completion, a non-negative value is returned. Otherwise, \-1 is returned and .I errno\^ is set to indicate the error. .SH SEE ALSO uname(1). .\" @(#)uname.2 1.5 .\" @(#)cos.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH PASTE 1 .SH NAME paste \- merge same lines of several files or subsequent lines of one file .SH SYNOPSIS \f3paste \fPfile1 file2 .\|.\|. .br \f3paste \-d\fP\|list file1 file2 .\|.\|. .br \f3paste \-s [\-d\fP\|list\|\f3] \fPfile1 file2 .\|.\|. .SH DESCRIPTION In the first two forms, .I paste\^ concatenates corresponding lines of the given input files .IR file1 , .IR file2 , etc. It treats each file as a column or columns of a table and pastes them together horizontally (parallel merging). .I Paste is the counterpart of .IR cat (1) which concatenates vertically, i.e., one file after the other. In the last form above, .I paste\^ subsumes the function of an older command with the same name by combining subsequent lines of the input file (serial merging). In all cases, lines are glued together with the .I tab\^ character, or with characters from an optionally specified .IR list . Output is to the standard output, so it can be used as the start of a pipe, or as a filter, if \f3\-\fP is used in place of a filena2 .TH UNLINK 2 .SH NAME unlink \- remove directory entry .SH SYNOPSIS .BR "int unlink (" path ) .br .BR "char \(**" path ; .SH DESCRIPTION .I Unlink\^ removes the directory entry named by the pathname pointed to by .IR path . .PP The named file is unlinked unless one or more of the following are true: .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP The named file does not exist. .SM \%[ENOENT] .IP Search permission is denied for a component of the path prefix. .SM \%[EACCES] .IP Write permission is denied on the directory containing the link to be removed. .SM \%[EACCES] .IP The named file is a directory and the effective user .SM ID of the process is not superuser. .SM \%[EPERM] .IP The entry to be unlinked is the mount point for a mounted file system. .SM \%[EBUSY] .IP The entry to be unlinked is the last link to a pure procedure (shared text) file that is being executed. .SM \%[ETXTBSY] .IP The directory entry to be unlinked is part of a read-only file system. .SM \%[EROFS] .IP .I.TH COSH 3F .SH NAME cosh, dcosh \- FORTRAN hyperbolic cosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = cosh(" "r1" ")" .P .RB "dp2" " = dcosh(" "dp1" ")" .RB "dp2" " = cosh(" "dp1" ")" .SH DESCRIPTION .I Cosh\^ returns the real hyperbolic cosine of its real argument. .I Dcosh\^ returns the double-precision hyperbolic cosine of its double-precision argument. The generic form .I cosh\^ may be used to return the hyperbolic cosine in the type of its argument. .SH SEE ALSO sinh(3M). .\" @(#)cosh.3f 1.4 me. .PP The meanings of the options are: .TP .B "\-d" Replace the .I tab\^ character by one or more alternate characters specified in .IR list . Without this option, the new-line characters of each but the last file (or last line in case of the .B \-s option) are replaced by a .I tab\^ character. .TP .I "list\^" One or more characters immediately following .B \-d replace the default .I tab\^ as the line concatenation character. The list is used circularly; i.e., when exhausted, it is reused. In parallel merging (i.e., no .B \-s option), the lines from the last file are always terminated with a new-line character, not from the .IR list . The list may contain the special escape sequences: .B \e\|n (new line), .B \e\|t (tab), .B \e\e (backslash), and .B \e\|0 (empty string, not a null character). Quoting may be necessary if characters have special meaning to the shell (e.g., to get one backslash, use .B \-d\|``\e\e\e\e'' ). .TP .B "\-s" Merge subsequent lines rather than one from each input file. Use .I tab\^ fo Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .PP When all links to a file have been removed and no process has the file open, the space occupied by the file is freed and the file ceases to exist. If one or more processes have the file open when the last link is removed, the removal is postponed until all references to the file have been closed. .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" rm(1), close(2), link(2), open(2). .\" @(#)unlink.2 1.4 3 .\" @(#)cosh.3m 1.2 .so /usr/man/u_man/man3/sinh.3m r concatenation, unless a .I list\^ is specified with the .B \-d option. Regardless of the .IR list , the last character of the file is forced to be a new line. .TP .B "\-" May be used in place of any filename, to read a line from the standard input. (There is no prompting). .SH EXAMPLES .TP 15m \f3ls \|\(bv\| paste \|\-d``\|'' \|\-\f1 list directory in one column .TP \f3ls \|\(bv\| paste \|\- \|\- \|\- \|\-\f1 list directory in four columns .TP \f3paste \|\-s \|\-d``\e\|t\e\|n'' \|file\f1 combine pairs of lines into lines .SH "SEE ALSO" grep(1), cut(1), .br pr(1): .BR "pr \-t \-m" .\|.\|. works similarly, but creates extra blanks, tabs and new lines for a nice page layout. .SH DIAGNOSTICS .TP 17 .B "line too long\^" Output lines are restricted to 511 characters. .TP 17 .B "too many files\^" Except for the .B \-s option, no more than 12 input files may be specified. .\" @(#)paste.1 1.6 .TH USTAT 2 .SH NAME ustat \- get file system statistics .SH SYNOPSIS .B #include .br .B #include .sp .BR "int ustat (" "dev, buf" ) .br .BR int " dev" ; .br .BR "struct ustat \(**" buf ; .SH DESCRIPTION .I Ustat\^ returns information about a mounted file system. .I Dev\^ is a device number identifying a device containing a mounted file system. .I Buf\^ is a pointer to a .I ustat\^ structure that includes the following elements: .PP .RS .nf .ta 8n 25n 30n \f3daddr_t\f2 f_tfree\f3;\f1 /\(** Total free blocks \(**/ \f3ino_t\f2 f_tinode\f3;\f1 /\(** Number of free inodes \(**/ \f3char\f2 f_fname[6]\f3;\f1 /\(** Filsys name \(**/ \f3char\f2 f_fpack[6]\f3;\f1 /\(** Filsys pack name \(**/ .fi .RE .PP .I Ustat\^ fails if one or more of the following are true: .IP .I Dev\^ is not the device number of a device containing a mounted file system. .SM \%[EINVAL] .IP .I Buf\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value o.TH CRYPT 3C .SH NAME crypt, encrypt \- a one way hashing encryption algorithm .SH SYNOPSIS .nf .BR "char \(**crypt (" "key, salt" ")" .BR "char \(**" "key," " \(**" "salt" ; .PP .BR "void encrypt (" "block" ) .BR "char \(**" "block" ; .SH DESCRIPTION .I Crypt\^ is the password encryption function. It is based on a one way hashing encryption algorithm with variations intended (among other things) to frustrate use of hardware implementations of a key search. .PP .I Key\^ is a user's typed password. .I Salt\^ is a two-character string chosen from the set [\f3a-zA-Z0-9./\fP]; this string is used to perturb the hashing algorithm in one of 4096 different ways, after which the password is used as the key to encrypt repeatedly a constant string. The returned value points to the encrypted password. The first two characters are the salt itself. .PP There is a character array of length 64 containing only the characters with numerical value 0 and 1. When this string is divided into groups of 8, the low-order bit in each3 .\" @(#)pcat.1 1.2 .so /usr/man/u_man/man1/pack.1 f 0 is returned. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stat(2), fs(4). .\" @(#)ustat.2 1.6  group is ignored; this gives a 56-bit key which is set into the machine by \f2crypt\f1. .PP The .I encrypt\^ entry provides (rather primitive) access to the actual hashing algorithm. The argument to the .I encrypt\^ entry is a character array of length 64 containing only the characters with numerical value of 0 and 1. The argument array is modified in place to a similar array representing the bits of the argument after having been subjected to the hashing algorithm using the key set by .IR crypt . .SH SEE ALSO getpass(3C), passwd(4), login(1), passwd(1). .SH BUGS The return value points to static data that are overwritten by each call. .\" @(#)encrypt.3c 1.1 of 12/15/83 .\" @(#)pcc.1 1.2 .so /usr/man/u_man/man1/cc.1 4 .TH UTIME 2 .SH NAME utime \- set file access and modification times .SH SYNOPSIS .B #include .br .BR "int utime (" "path, times" ) .br .BR "char \(**" path ; .br .BR "struct utimbuf \(**" times ; .SH DESCRIPTION .I Path\^ points to a pathname naming a file. .I Utime\^ sets the access and modification times of the named file. .PP If .I times\^ is .SM .BR NULL , the access and modification times of the file are set to the current time. A process must be the owner of the file or have write permission to use .I utime\^ in this manner. .PP If .I times\^ is not .SM .BR NULL , .I times\^ is interpreted as a pointer to a .I utimbuf\^ structure and the access and modification times are set to the values contained in the designated structure. Only the owner of the file or the superuser may use .I utime\^ this way. .PP The times in the following structure are measured in seconds since 00:00:00 .SM GMT\*S, Jan. 1, 1970. .PP .RS .nf .ta .5i 1i 1.75i 2.5i \f3struct\f2 utimbuf\f3 {\f1 \f3time_t\f2 actime\f3;.\" @(#)csin.3f 1.2 .so /usr/man/u_man/man3/sin.3f 2630-*'$!  \f1 /\(** access time \(**/ \f3time_t\f2 modtime\f3;\f1 /\(** modification time \(**/ \f3};\f1 .fi .RE .PP .PP .I Utime\^ fails if one or more of the following are true: .IP The named file does not exist. .SM \%[ENOENT] .IP A component of the path prefix is not a directory. .SM \%[ENOTDIR] .IP Search permission is denied by a component of the path prefix. .SM \%[EACCES] .IP The effective user .SM ID is not superuser and not the owner of the file and .I times\^ is not .SM .BR NULL . .SM \%[EPERM] .IP The effective user .SM ID is not superuser and not the owner of the file, .I times\^ is .SM .BR NULL , and write access is denied. .SM \%[EACCES] .IP The file system containing the file is mounted read-only. .SM \%[EROFS] .IP .I Times\^ is not .SM .B NULL and points outside the process's allocated address space. .SM \%[EFAULT] .IP .I Path\^ points outside the process's allocated address space. .SM \%[EFAULT] .SH "RETURN VALUE" Upon successful completion, a value of 0 is returned. Otherwise, a value of \-1 is retu4 .\" @(#)csqrt.3f 1.2 .so /usr/man/u_man/man3/sqrt.3f .TH PR 1 .SH NAME pr \- print files .SH SYNOPSIS .B pr [ options ] [ files ] .SH DESCRIPTION .I Pr\^ prints the named files on the standard output. If .I file\^ is .BR \- , or if no files are specified, the standard input is assumed. By default, the listing is separated into pages, each headed by the page number, a date and time, and the name of the file. .PP By default, columns are of equal width, separated by at least one space; lines which do not fit are truncated. If the .B \-s option is used, lines are not truncated and columns are separated by the separation character. .PP If the standard output is associated with a terminal, error messages are withheld until .I pr\^ has completed printing. .PP The \fIoptions\fP below may appear singly or be combined in any order: .TP .BI + k\^ Begin printing with page .I k\^ (default is 1). .TP .BI \- k\^ Produce .IR k -column output (default is 1). The options .B \-e and .B \-i are assumed for multi-column output. .TP .B \-a Print multi-column output across the page. rned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" stat(2). .\" @(#)utime.2 1.6 .TH CTERMID 3S .SH NAME ctermid \- generate filename for terminal .SH SYNOPSIS .B #include .PP .BR "char \(**ctermid(" s ) .br .BR "char \(**" s ; .SH DESCRIPTION .I Ctermid\^ generates the pathname of the controlling terminal for the current process, and stores it in a string. .PP If .I s\^ is a .SM NULL pointer, the string is stored in an internal static area, the contents of which are overwritten at the next call to .IR ctermid , and the address of which is returned. Otherwise, .I s\^ is assumed to point to a character array of at least .B L_ctermid elements; the pathname is placed in this array and the value of .I s\^ is returned. The constant .B L_ctermid is defined in the .B header file. .SH NOTES The difference between .I ctermid\^ and .IR ttyname (3C) is that .I ttyname\^ must be handed a file descriptor and returns the actual name of the terminal associated with that file descriptor, while .I ctermid\^ returns a string .RB ( /dev/tty ) that refers to the terminal if used as a fil5 .TP .B \-m Merge and print all files simultaneously, one per column (overrides the \f3\-\fP\fIk\fP, and .B \-a options). .TP .B \-d Double-space the output. .TP .BI \-e ck\^ Expand .I input\^ tabs to character positions .IR k "+1, 2\(**" k "+1, 3\(**" k +1, etc. If .I k\^ is 0 or is omitted, default tab settings at every eighth position are assumed. Tab characters in the input are expanded into the appropriate number of spaces. If .I c\^ (any non-digit character) is given, it is treated as the input tab character (default for .I c\^ is the tab character). .TP .BI \-i ck\^ In .IR output , replace white space wherever possible by inserting tabs to character positions .IR k "+1, 2\(**" k "+1, 3\(**" k +1, etc. If .I k\^ is 0 or is omitted, default tab settings at every eighth position are assumed. If .I c\^ (any non-digit character) is given, it is treated as the output tab character (default for .I c\^ is the tab character). .TP .BI \-n ck\^ Provide .IR k -digit line numbering (default for .I k\^ is 5). The num.TH WAIT 2 .SH NAME wait \- wait for child process to stop or terminate .SH SYNOPSIS .BR "int wait (" stat_loc ) .br .BR "int \(**" stat_loc ; .PP .B int wait ((int \(**)0) .SH DESCRIPTION .I Wait\^ suspends the calling process until it receives a signal that is to be caught (see .IR signal (2)), or until any one of the calling process's child processes stops in a trace mode (see .IR ptrace (2)) or terminates. If a child process stopped or terminated prior to the call on .IR wait , return is immediate. .PP If .I stat_loc\^ (taken as an integer) is non-zero, 16 bits of information called \fIstatus\fP are stored in the low-order 16 bits of the location pointed to by .IR stat_loc . .I Status\^ can be used to differentiate between stopped and terminated child processes. If the child process terminated, \fIstatus\fP identifies the cause of termination and passes useful information to the parent. This is accomplished in the following manner: .IP If the child process stopped, the high-order 8 bits of \fIstatus\fP cename. For this reason, .I ttyname\^ is useful only if the process already has at least one file open to a terminal. .SH SEE ALSO ttyname(3C). .\" @(#)ctermid.3s 1.5 ber occupies the first .IR k +1 character positions of each column of normal output or each line of .B \-m output. If .I c\^ (any non-digit character) is given, it is appended to the line number to separate it from whatever follows (default for .I c\^ is a tab). .TP .BI \-w k\^ Set the width of a line to .I k\^ character positions (default is 72 for equal-width multi-column output, no limit otherwise). .TP .BI \-o k\^ Offset each line by .I k\^ character positions (default is 0). The number of character positions per line is the sum of the width and offset. .TP .BI \-l k\^ Set the length of a page to .I k\^ lines (default is 66). .TP .B \-h Use the next argument as the header to be printed instead of the filename. .TP .B \-p Pause before beginning each page if the output is directed to a terminal .RI ( pr\^ will ring the bell at the terminal and wait for a carriage return). .TP .B \-f Use form-feed character for new pages (default is to use a sequence of line feeds). Pause before beginning the first page if t5 ontain the number of the signal that caused the process to stop and the low-order 8 bits are set equal to 0177. .IP If the child process terminated due to an .I exit\^ call, the low-order 8 bits of \fIstatus\fP are zero and the high-order 8 bits contain the low-order 8 bits of the argument that the child process passed to .IR exit ; see .IR exit (2). .IP If the child process terminated due to a signal, the high-order 8 bits of \fIstatus\fP are zero and the low-order 8 bits contain the number of the signal that caused the termination. In addition, if the low-order seventh bit (i.e., bit 200) is set, a ``core image'' will have been produced; see .IR signal (2). .PP If a parent process terminates without waiting for its child processes to terminate, the parent process .SM ID of each child process is set to 1. This means the initialization process inherits the child processes; see .IR intro (2). .PP .PP .I Wait\^ fails and returns immediately if one or more of the following are true: .IP The calling process has n.TH CTIME 3C .SH NAME ctime, localtime, gmtime, asctime, tzset \- convert date and time to string .SH SYNOPSIS .nf .B #include .PP .BR "char \(**ctime (" clock ) .BR "long \(**" clock ; .PP .BR "struct tm \(**localtime (" clock ) .BR "long \(**" clock ; .PP .BR "struct tm \(**gmtime (" clock ) .BR "long \(**" clock ; .PP .BR "char \(**asctime (" tm ) .BR "struct tm \(**" tm ; .PP .B extern long timezone; .PP .B extern int daylight; .PP .B extern char \(**tzname[2]; .PP .B void tzset ( ) .SH DESCRIPTION .I Ctime\^ converts a long integer, pointed to by .IR clock , representing the time in seconds since 00:00:00 GMT, January 1, 1970, and returns a pointer to a 26-character string in the following form. All the fields have constant width. .PP .RS Sun Sep 16 01:03:52 1973\\n\\0 .RE .PP .I Localtime\^ and .I gmtime\^ return pointers to .I tm\^ structures, described below. .I Localtime\^ corrects for the time zone and possible Daylight Savings Time; .I gmtime\^ converts directly to Greenwich Mean Time (\s-he standard output is associated with a terminal. .TP .B \-r Print no diagnostic reports on failure to open files. .TP .B \-t Print neither the 5-line identifying header nor the 5-line trailer normally supplied for each page. Quit printing after the last line of each file without spacing to the end of the page. .TP .BI \-s c\^ Separate columns by the single character .I c\^ instead of by the appropriate number of spaces (default for .I c\^ is a tab). .SH EXAMPLES Print .B file1 and .B file2 as a double-spaced, three-column listing headed by ``file list'': .PP .RS .B "pr \|\-3dh \|"file \|list" \|file1 \|file2" .RE .PP Write .B file1 on .BR file2 , expanding tabs to columns 10, 19, 28, 37, .\|.\|. : .PP .RS .B "pr \|\-e9 \|\-t \|file2" .RE .SH FILES /dev/tty\(** to suspend messages .SH SEE ALSO cat(1). .\" @(#)pr.1 1.5 o existing unwaited-for child processes. .SM \%[ECHILD] .IP .I Stat_loc\^ points to an illegal address. .SM \%[EFAULT] .SH RETURN VALUE If .I wait\^ returns due to the receipt of a signal, a value of \-1 is returned to the calling process and .I errno\^ is set to .SM EINTR. If .I wait\^ returns due to a stopped or terminated child process, the process .SM ID of the child is returned to the calling process. Otherwise, a value of \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" exec(2), exit(2), fork(2), pause(2), signal(2). .SH WARNING See .SM .I WARNING\^ in .IR signal (2). .\" @(#)wait.2 1.4 6 1GMT\s0), which is the time the system uses. .PP .I Asctime\^ converts a \fItm\fP structure to a 26-character string, as shown in the above example, and returns a pointer to the string. .PP Declarations of all the functions and externals, and the .I tm\^ structure, are in the .I \^ header file. The structure declaration is: .RS .PP .nf \f3struct tm {\f1 \f3int tm_sec;\f1 /\(** seconds (0 - 59) \(**/ \f3int tm_min;\f1 /\(** minutes (0 - 59) \(**/ \f3int tm_hour;\f1 /\(** hours (0 - 23) \(**/ \f3int tm_mday;\f1 /\(** day of month (1 - 31) \(**/ \f3int tm_mon;\f1 /\(** month of year (0 - 11) \(**/ \f3int tm_year;\f1 /\(** year \- 1900 \(**/ \f3int tm_wday;\f1 /\(** day of week (Sunday = 0) \(**/ \f3int tm_yday;\f1 /\(** day of year (0 - 365) \(**/ \f3int tm_isdst;\f1 \f3};\f1 .fi .RE .PP .I Tm_isdst\^ is non-zero if Daylight Savings Time is in effect. .PP The external .B long variable .I timezone\^ contains the difference,.TH PROF 1 .SH NAME prof \- display profile data .SH SYNOPSIS .B prof .RB [ \-tcan ] .RB [ \-ox ] .RB [ \-g ] .RB [ \-z ] .RB [ \-h ] .RB [ \-s ] .RB [ \-m "\ mdata]" [prog] .SH DESCRIPTION .I Prof\^ interprets the profile file produced by the .IR monitor (3C) function. The symbol table in the object file .I prog\^ .RB ( a.out by default) is read and correlated with the profile file .RB ( mon.out by default). For each external text symbol the percentage of time spent executing between the address of that symbol and the address of the next is printed, together with the number of times that function was called and the average number of milliseconds per call. .PP The mutually exclusive options .B t, c, a,\^ and .B n\^ determine the type of sorting of the output lines: .TP .B \-t Sort by decreasing percentage of total time (default). .TP .B \-c Sort by decreasing number of calls. .TP .B \-a Sort by increasing symbol address. .TP .B \-n Sort lexically by symbol name. .PP The mutually exclusive options .B o\^ and ..TH WRITE 2 .SH NAME write \- write on a file .SH SYNOPSIS .BR "int write (" "fildes, buf, nbyte" ) .br .BR int " fildes" ; .br .BR "char \(**" buf ; .br .BR unsigned " nbyte" ; .SH DESCRIPTION .I Fildes\^ is a file descriptor obtained from a .IR creat (2), .IR open (2), .IR dup (2), .IR fcntl (2), or .IR pipe (2) system call. .PP .I Write\^ attempts to write .I nbyte\^ bytes from the buffer pointed to by .I buf\^ to the file associated with the .IR fildes . .PP On devices capable of seeking, the actual writing of data proceeds from the position in the file indicated by the file pointer. Upon return from .IR write , the file pointer is incremented by the number of bytes actually written. .PP On devices incapable of seeking, writing always takes place starting at the current position. The value of a file pointer associated with such a device is undefined. .PP If the .SM .B O_APPEND file status flag is set, the file pointer is set to the end of the file prior to each write. .PP .I Write\^ fails and the file p in seconds, between \s-1GMT\s0 and local standard time (in \s-1EST\s0, .I timezone\^ is 5\(**60\(**60); the external variable .I daylight\^ is non-zero if, and only if, the standard \s-1U.S.A.\s+1 Daylight Savings Time conversion should be applied. The program knows about the peculiarities of this conversion in 1974 and 1975; if necessary, a table for these years can be extended. .PP If an environment variable named .SM .B TZ is present, .I asctime\^ uses the contents of the variable to override the default time zone. The value of .SM .B TZ must be a 3-letter time zone name, followed by a number representing the difference between local time and Greenwich Mean Time in hours, followed by an optional 3-letter name for a daylight time zone. For example, the setting for New Jersey would be .SM .BR EST5EDT . The effects of setting .SM .B TZ are thus to change the values of the external variables .I timezone\^ and .IR daylight ; in addition, the time zone names contained in the external variable .PP .B char \(**6 B x\^ specify the printing of the address of each symbol monitored: .TP .B \-o Print each symbol address (in octal) along with the symbol name. .TP .B \-x Print each symbol address (in hexadecimal) along with the symbol name. .PP The following options may be used in any combination: .TP .B \-g Include non-global symbols (static functions). .TP .B \-z Include all symbols in the profile range (see .IR monitor (3C)), even if associated with zero number of calls and zero time. .TP .B \-h Suppress the heading normally printed on the report. (This is useful if the report is to be processed further.) .TP .B \-s Print a summary of several of the monitoring parameters and statistics on the standard error output. .TP .BR \-m " mdata\^" Use file .I mdata\^ instead of .B mon.out for profiling data. .PP For the number of calls to a function to be tallied, the .B \-p option of .IR cc (1) must have been given when the file containing the function was compiled. This option to the .I cc\^ command also arranges for the object ointer remains unchanged if one or more of the following are true: .IP .I Fildes\^ is not a valid file descriptor open for writing. .SM \%[EBADF] .IP An attempt is made to write to a pipe that is not open for reading by any process. .SM \%[EPIPE and .SM SIGPIPE signal] .IP An attempt is made to write a file that exceeds the process's file size limit or the maximum file size. See .IR ulimit (2). .SM \%[EFBIG] .IP .I Buf\^ points outside the process's allocated address space. .SM \%[EFAULT] .PP If a .I write\^ requests that more bytes be written than there is room for (e.g., the .I ulimit\^ (see .IR ulimit (2)) or the physical end of a medium), only as many bytes as there is room for are written. For example, if there is space for 20 bytes more in a file before reaching a limit, a write of 512 bytes returns 20. The next write of a non-zero number of bytes gives a failure return (except as noted below). .PP If the file being written is a pipe (or .SM FIFO\*S), no partial writes are permitted. Thus, the write ftzname[2] = { "\s-1EST\s0", "\s-1EDT\s0" }; .PP are set from the environment variable .SM .BR TZ . The function .I tzset\^ sets these external variables from .SM .BR TZ ; .I tzset\^ is called by .I asctime\^ and may also be called explicitly by the user. .PP .PP Note that in most installations, .SM .B TZ is set by default when the user logs on, to a value in the local \f3/etc/profile\f1 file (see .IR profile (4)). .SH "SEE ALSO" time(2), getenv(3C), profile(4), environ(5). .SH BUGS The return values point to static data whose content is overwritten by each call. .\" @(#)ctime.3c 1.7 file to include a special profiling start-up function that calls .IR monitor (3C) at the beginning and end of execution. It is the call to .I monitor\^ at the end of execution that causes the .B mon.out file to be written. Thus, only programs that call .IR exit (2) or return from .I main\^ cause the .B mon.out file to be produced. .SH FILES .ta \w'mon.out 'u mon.out for profile .br a.out for namelist .SH "SEE ALSO" cc(1), nm(1), exit(2), profil(2), monitor(3C). .br .ne 6v .SH BUGS There is a limit of 600 functions that may have call counters established during program execution. If this limit is exceeded, other data is overwritten and the .B mon.out file is corrupted. The number of call counters used is reported automatically by the .I prof\^ command whenever the number exceeds 250. .\" @(#)prof.1 1.4 7 ails if a write of .I nbyte\^ bytes would exceed a limit. .PP If the file being written is a pipe (or .SM FIFO\*S) and the .SM .B O_NDELAY flag of the file flag word is set, then write to a full pipe (or .SM FIFO\*S) returns a count of 0. If .SM .B O_NDELAY is clear, writes to a full pipe (or .SM FIFO\*S) block until space becomes available. .SH "RETURN VALUE" Upon successful completion the number of bytes actually written is returned. Otherwise, \-1 is returned and .I errno\^ is set to indicate the error. .SH "SEE ALSO" creat(2), dup(2), lseek(2), open(2), pipe(2), ulimit(2). .\" @(#)write.2 1.5 .TH CTYPE 3C .SH NAME isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii \- classify characters .SH SYNOPSIS .B #include .PP .BR "int isalpha (" c ) .br .BR int " c" ; .PP .B . . . .SH DESCRIPTION These macros classify character-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. .I Isascii\^ is defined on all integer values; the rest are defined only where .I isascii\^ is true and on the single non-\s-1ASCII\s0 value .SM .B EOF (\-1); see .IR stdio (3S)). .TP 15n .I isalpha\^ .I c\^ is a letter. .TP .I isupper\^ .I c\^ is an uppercase letter. .TP .I islower\^ .I c\^ is a lowercase letter. .TP .I isdigit\^ .I c\^ is a digit [0-9]. .TP .I isxdigit\^ .I c\^ is a hexadecimal digit [0-9], [A-F] or [a-f]. .TP .I isalnum\^ .I c\^ is an alphanumeric (letter or digit). .TP .I isspace\^ .I c\^ is a space, tab, carriage return, new line, vertical tab, or form feed. .TP .I ispunct\^ .I c\^ is a punctuat'\" t .tr ~ .nr f 0 .bd S B 3 .de SP .if n .ul \%[\f3\-\\$1\fP\\c .if n .ul 0 \\$2\\$3 .. .de SF .if n .ul \%[\f3\-\\$1\fP] .if n .ul 0 .. .de AR .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \f3\-\\$1\\fP \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .de A1 .if \\nf \{ \ . RE . nr f 0 \} .PP .RS 5 .TP 15 \f3\-\\$1\fP[\f2\\$2\^\fP] \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9 .nr f 1 .. .ds S) \s-1SCCS\s+1 .ds I) \s-1SID\s+1 .TH PRS 1 .SH NAME prs \- print an \s-1SCCS\s+1 file .SH SYNOPSIS .B prs .SP d [dataspec]] .SP r [\s-1SID\s+1]] .SF e .SF l .SF a files .SH DESCRIPTION .I Prs\^ prints, on the standard output, parts or all of an \*(S) file (see .IR sccsfile (4)) in a user supplied format. If a directory is named, .I prs\^ behaves as though each file in the directory were specified as a named file, except that non-\*(S) files (last component of the pathname does not begin with \f3s.\fP), and unreadable files are silently ignored. If a name of \f3\-\fP is given, the standard input is read; each l..._tolower.3c_toupper.3ca64l.3cabort.3cabort.3fabs.3cabs.3facos.3facos.3maimag.3faint.3falog.3falog10.3famax0.3famax1.3famin0.3famin1.3famod.3fand.3fanint.3fasctime.3casin.3fasin.3massert.3xatan.3fatan.3matan2.3fatan2.3matof.3catoi.3catol.3cbessel.3mbool.3fbsearch.3ccabs.3fcalloc.3cccos.3fceil.3mcexp.3fchar.3fclearerr.3sclock.3cclog.3fcmplx.3fconjg.3fconv.3ccos.3fcos.3mcosh.3fcosh.3mcrypt.3ccsin.3fcsqrt.3fctermid.3sctime.3cctype.3ccuserid.3sdabs.3fdacos.3fdasin.3fdatan.3fdatan2.3f7 ion character (neither control nor alphanumeric). .TP .I isprint\^ .I c\^ is a printing character, code 040 (space) through 0176 (tilde). .TP .I isgraph\^ .I c\^ is a printing character, similar to .I isprint\^ except false for space. .TP .I iscntrl\^ .I c\^ is a delete character (0177) or an ordinary control character (less than 040). .TP .I isascii\^ .I c\^ is an \s-1ASCII\s0 character, code less than 0200. .SH DIAGNOSTICS If the argument to any of these macros is not in the domain of the function, the result is undefined. .SH "SEE ALSO" ascii(5). .\" @(#)ctype.3c 1.5 ine of the standard input is taken to be the name of an \*(S) file or directory to be processed; non-\*(S) files and unreadable files are silently ignored. .PP Arguments to .IR prs , which may appear in any order, consist of .I keyletter\^ arguments, and filenames. .PP All the described .I keyletter\^ arguments apply independently to each named file: .A1 d dataspec Used to specify the output data specification. The .I dataspec\^ is a string consisting of \*(S) file .I "data keywords\^" (see .IR "\s-1DATA KEYWORDS\s+1" ) interspersed with optional user supplied text. .A1 r \s-1SID\s+1 Used to specify the .IR S "\s-1CCS\s+1 " ID entification (\*(I)) string of a delta for which information is desired. If no \*(I) is specified, the \*(I) of the most recently created delta is assumed. .AR e Requests information for all deltas created .I earlier\^ than and including the delta designated via the .B \-r keyletter. .AR l Requests information for all deltas created .I later\^ than and including the delta designated via.\" @(#)_tolower.3c 1.2 .so /usr/man/u_man/man3/conv.3c .TH CUSERID 3S .SH NAME cuserid \- get character login name of the user .SH SYNOPSIS .B #include .PP .BR "char \(**cuserid (" s ) .br .BR "char \(**" s ; .SH DESCRIPTION .I Cuserid\^ generates a character-string representation of the login name of the owner of the current process. If .I s\^ is a .SM NULL pointer, this representation is generated in an internal static area, the address of which is returned. Otherwise, .I s\^ is assumed to point to an array of at least .B L_cuserid characters; the representation is left in this array. The constant .B L_cuserid is defined in the .B header file. .SH DIAGNOSTICS If the login name cannot be found, .I cuserid\^ returns a .SM NULL pointer; if .I s\^ is not a .SM NULL pointer, a null character .B (\e0) is placed at .IR s[0] . .SH SEE ALSO getlogin(3C), getpwent(3C). .\" @(#)cuserid.3s 1.4 8  the .B \-r keyletter. .AR a Requests printing of information for both removed (i.e., delta type = .IR R ; (see .IR rmdel (1)) and existing (i.e., delta type = .IR D) deltas. If the .B \-a keyletter is not specified, information for existing deltas only is provided. .PP .i0 .SH "DATA KEYWORDS" Data keywords specify which parts of an \*(S) file are to be retrieved and output. All parts of an \*(S) file (see .IR sccsfile (4)) have an associated data keyword. There is no limit on the number of times a data keyword may appear in a .IR dataspec . .PP The information printed by .I prs\^ consists of: (1) the user supplied text; and (2) appropriate values (extracted from the \*(S) file) substituted for the recognized data keywords in the order of appearance in the \f2dataspec\^\fP. The format of a data keyword value is either .I Simple\^ (S), in which keyword substitution is direct, or .I "Multi-line\^" (M), in which keyword substitution is followed by a carriage return. .PP User supplied text is any text other tha.\" @(#)_toupper.3c 1.2 .so /usr/man/u_man/man3/conv.3c .\" @(#)dabs.3f 1.2 .so /usr/man/u_man/man3/abs.3f n recognized data keywords. A tab is specified by \f3\e\|t\fP and carriage return/new line is specified by \f3\e\|n\fP. .bp .ce SCCS FILES DATA KEYWORDS .DS .PD 0 .if t .vs -1p .if n .ll 66 .if t .ll 6.5i .TS center ; c c c c c c l c c c . .sp KEYWORD DATA ITEM FILE SECTION VALUE FORMAT _ \f3:\fPDt\f3:\fP Delta information Delta Table See below* S \f3:\fPDL\f3:\fP T{ Delta line statistics T} " \f3:\fPLi\f3:\fP/\f3:\fPLd\f3:\fP/\f3:\fPLu\f3:\fP S \f3:\fPLi\f3:\fP T{ .nf Lines inserted by Delta .fi T} " nnnnn S \f3:\fPLd\f3:\fP T{ Lines deleted by Delta T} " nnnnn S \f3:\fPLu\f3:\fP T{ .nf Lines unchanged by Delta .fi T} " nnnnn S \f3:\fPDT\f3:\fP Delta type " \f2D\^\fP~or~\f2R\^\fP S \f3:\fPI\f3:\fP T{ SCCS ID string (SID) T} " \f3:\fPR\f3:.:\fPL\f3:.:\fPB\f3:.:\fPS\f3:\fP S \f3:\fPR\f3:\fP Release number " nnnn S \f3:\fPL\f3:\fP Level number " nnnn S \f3:\fPB\f3:\fP Branch number " nnnn S \f3:\fPS\f3:\fP Sequence number " nnnn S \f3:\fPD\f3:\fP T{ Date Delta created T} " \f3:\fPDy\f3:\fP/\f3:\fPDm\f3:\fP/\f3:8 .TH A64L 3C .SH NAME a64l, l64a \- convert between long integer and base-64 \s-1ASCII\s0 string .SH SYNOPSIS .BR "long a64l (" s ) .br .BR "char \(**" s ; .PP .BR "char \(**l64a (" l ) .br .BR long " l" ; .SH DESCRIPTION These functions are used to maintain numbers stored in .I base-64\^ .SM ASCII characters. This is a notation by which long integers can be represented by up to 6 characters; each character represents a ``digit'' in a radix-64 notation. .PP The characters used to represent ``digits'' are .B . for 0, .B / for 1, .B 0 through .B 9 for 2\-11, .B A through .B Z for 12\-37, and .B a through .B z for 38\-63. .PP .I A64l\^ takes a pointer to a null-terminated base-64 representation and returns a corresponding .B long value. If the string pointed to by .I s\^ contains more than 6 characters, .I a64l\^ uses the first 6. .PP .I L64a\^ takes a .B long argument and returns a pointer to the corresponding base-64 representation. If the argument is 0, .I l64a\^ returns a pointer to a null string. .SH BUGS Th.\" @(#)dacos.3f 1.2 .so /usr/man/u_man/man3/acos.3f \fPDd\f3:\fP S \f3:\fPDy\f3:\fP T{ Year Delta created T} " nn S \f3:\fPDm\f3:\fP T{ Month Delta created T} " nn S \f3:\fPDd\f3:\fP T{ Day Delta created T} " nn S \f3:\fPT\f3:\fP T{ Time Delta created T} " \f3:\fPTh\f3:\fP\f3:\fP:Tm\f3:\fP\f3:\fP:Ts\f3:\fP S \f3:\fPTh\f3:\fP T{ Hour Delta created T} " nn S \f3:\fPTm\f3:\fP T{ Minutes Delta created T} " nn S \f3:\fPTs\f3:\fP T{ Seconds Delta created T} " nn S \f3:\fPP\f3:\fP T{ .nf Programmer who created Delta .fi T} " logname S \f3:\fPDS\f3:\fP T{ Delta seq. # T} " nnnn S \f3:\fPDP\f3:\fP T{ .nf Predecessor Delta seq. # .fi T} " nnnn S \f3:\fPDI\f3:\fP T{ Seq. # of deltas incl., excl., ignored T} " \f3:\fPDn\f3:\fP/\f3:\fPDx\f3:\fP/\f3:\fPDg\f3:\fP S \f3:\fPDn\f3:\fP T{ .nf Deltas included (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPDx\f3:\fP T{ .nf Deltas excluded (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPDg\f3:\fP T{ .nf Deltas ignored (seq. #) .fi T} " \f3:\fPDS\f3:\fP~\f3:\fPDS\f3:\fP\|\f3.\e value returned by .I l64a\^ is a pointer into a static buffer, the contents of which are overwritten by each call. .\" @(#)a64l.3c 1.4 9 .\" @(#)dasin.3f 1.2 .so /usr/man/u_man/man3/asin.3f ^.\^.\fP S \f3:\fPMR\f3:\fP MR numbers for delta " text M \f3:\fPC\f3:\fP Comments for delta " text M \f3:\fPUN\f3:\fP User names User Names text M \f3:\fPFL\f3:\fP Flag list Flags text M \f3:\fPY\f3:\fP Module type flag " text S \f3:\fPMF\f3:\fP T{ MR validation flag T} " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPMP\f3:\fP T{ .nf MR validation pgm name .fi T} " text S \f3:\fPKF\f3:\fP T{ .nf Keyword error/ warning flag .fi T} " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPBF\f3:\fP Branch flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPJ\f3:\fP Joint edit flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPLK\f3:\fP Locked releases " \f3:\fPR\f3:\fP\|\f3.\^.\^.\fP S \f3:\fPQ\f3:\fP User defined keyword " text S \f3:\fPM\f3:\fP Module name " text S \f3:\fPFB\f3:\fP Floor boundary " \f3:\fPR\f3:\fP S \f3:\fPCB\f3:\fP Ceiling boundary " \f3:\fPR\f3:\fP S \f3:\fPDs\f3:\fP Default SID " \f3:\fPI\f3:\fP S \f3:\fPND\f3:\fP Null delta flag " \f2yes\^\fP~or~\f2no\^\fP S \f3:\fPFD\f3:\fP T{ File descriptive text T} Comments text M \f3:\fPBD\f3:\fP Bo.TH ABORT 3C .SH NAME abort \- generate an \s-1IOT\s0 fault .SH SYNOPSIS .B int abort ( ) .SH DESCRIPTION .I Abort\^ causes an \s-1IOT\s0 signal to be sent to the process. This usually results in termination with a core dump. .PP It is possible for .I abort\^ to return control if .SM .B SIGIOT is caught or ignored, in which case the value returned is that of the .IR kill (2) system call. .SH "SEE ALSO" adb(1), exit(2), kill(2), signal(2). .SH DIAGNOSTICS If .SM .B SIGIOT is neither caught nor ignored, and the current directory is writable, a core dump is produced and the message .BR "abort \- core dumped" " is" written by the shell. .\" @(#)abort.3c 1.4 .\" @(#)datan.3f 1.2 .so /usr/man/u_man/man3/atan.3f 9 dy Body text M \f3:\fPGB\f3:\fP Gotten body " text M \f3:\fPW\f3:\fP T{ A form of \f2what\^\fP(1) string T} N/A \f3:\fPZ\f3:\fP\f3:\fPM\f3:\fP\e\|t\f3:\fPI\f3:\fP S \f3:\fPA\f3:\fP T{ A form of \f2what\^\fP(1) string T} N/A \f3:\fPZ\f3:\fP\f3:\fPY\f3:\fP~\f3:\fPM\f3:\fP~\f3:\fPI\f3:\fP\f3:\fPZ\f3:\fP S \f3:\fPZ\f3:\fP T{ \f2what\^\fP(1) string delimiter T} N/A @\&(#) S \f3:\fPF\f3:\fP SCCS filename N/A text S \f3:\fPPN\f3:\fP SCCS file pathname N/A text S .TE .sp .5v * \f3:\fPDt\f3:\fP~=~\f3:\fPDT\f3:\fP~\f3:\fPI\f3:\fP~\f3:\fPD\f3:\fP~\f3:\fPT\f3:\fP~\f3:\fPP\f3:\fP~\f3:\fPDS\f3:\fP~\f3:\fPDP\f3:\fP .DE .if t .ps +1 .if t .vs +1p .SH EXAMPLES The command .IP \f3prs \-d``Users and/or user \s-1ID\s+1s for :F: are:\e\|n:\s-1UN\s+1:'' s.file .PP may produce on the standard output: .PP .RS .nf \f3Users and/or user \s-1ID\s+1s for s.file are:\f1 \f3xyz\f1 \f3131\f1 \f3abc\f1 .fi .RE .PP The command .IP \f3prs \-d``Newest delta for pgm :M:: :I: Created :D: By :P:'' \-r s.file\f1 .PP may produce on the standard outp.TH ABORT 3F .SH NAME abort \- terminate FORTRAN program .SH SYNOPSIS .B "call abort ( )" .SH DESCRIPTION .I Abort\^ terminates the program which calls it, closing all open files, truncated to the current position of the file pointer. .SH DIAGNOSTICS When invoked, .I abort\^ prints .RB `` "Fortran abort routine called" '' on the standard error output. .SH SEE ALSO abort(3C). .\" @(#)abort.3f 1.5 .\" @(#)datan2.3f 1.2 .so /usr/man/u_man/man3/atan2.3f ut: .IP \f3Newest delta for pgm main.c: 3.7 Created 77/12/1 By cas\f1 .PP As a \f2special case:\^\fP .IP \f3prs s.file\f1 .PP may produce on the standard output: .PP .RS .nf \f3D 1.1 77/12/1 00:00:00 cas 1 000000/00000/00000\f1 \f3\s-1MR\s+1s:\f1 \f3bl78-12345\f1 \f3bl79-54321\f1 \f3\s-1COMMENTS\s+1:\f1 \f2this is the comment line for s.file initial delta\f1 .fi .RE .PP for each delta table entry of the ``D'' type. Only the .B \-a keyletter argument can be used with the .IR "special case" . .PP .SH FILES .RE .TP 10 /tmp/pr????? .i0 .SH "SEE ALSO" admin(1), delta(1), get(1), help(1), rmdel(1), sccsfile(4). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS Use .IR help (1) for explanations. .tr ~~ .\" @(#)prs.1 1.12 : .TH ABS 3C .SH NAME abs \- return integer absolute value .SH SYNOPSIS .BR "int abs (" i ) .br .BR int " i" ; .SH DESCRIPTION .I Abs\^ returns the absolute value of its integer operand. .SH BUGS In two's-complement representation, the absolute value of the negative integer with largest magnitude is undefined. Some implementations trap this error, but others simply ignore it. .SH SEE ALSO floor(3M). .\" @(#)abs.3c 1.3 dble.3fdcmplx.3fdconjg.3fdcos.3fdcosh.3fdexp.3fdial.3cdimag.3fdint.3fdlog.3fdlog10.3f.TH PS 1 .SH NAME ps \- report process status .SH SYNOPSIS .B ps [ options ] .SH DESCRIPTION .I Ps\^ prints information about active processes. Without .IR options , information is printed about processes associated with the current terminal. Otherwise, the displayed information is controlled by the following .IR options : .PP .PD 0 .TP 15 .B \-e Print information about all processes. .TP .B \-d Print information about all processes, except process group leaders. .TP .B \-a Print information about all processes, except process group leaders and processes not associated with a terminal. .TP .B \-f Generate a .I full\^ listing. Normally, a short listing containing only process .SM ID\*S, terminal (``tty'') identifier, cumulative execution time, and the command name is printed. See below for meaning of columns in a full listing. .TP .B \-l Generate a .I long\^ listing. See below. .TP .BI \-c " corefile\^" Use the file .I corefile\^ in place of .BR /dev/mem . .TP .BI \-s " swapdev\^" Use the file .I swapdev\^ in.TH ABS 3F .SH NAME abs, iabs, dabs, cabs, zabs \- Fortran absolute value .SH SYNOPSIS .nf .BR "integer" " i1, i2" .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .BR "complex" " cx1, cx2" .BR "double complex" " dx1, dx2" .P .RB "r2" " = abs(" "r1" ")" .P .RB "i2" " = iabs(" "i1" ")" .RB "i2" " = abs(" "i1" ")" .P .RB "dp2" " = dabs(" "dp1" ")" .RB "dp2" " = abs(" "dp1" ")" .P .RB "cx2" " = cabs(" "cx1" ")" .RB "cx2" " = abs(" "cx1" ")" .P .RB "dx2" " = zabs(" "dx1" ")" .RB "dx2" " = abs(" "dx1" ")" .SH DESCRIPTION .I Abs\^ is the family of absolute value functions. .I Iabs\^ returns the integer absolute value of its integer argument. .I Dabs\^ returns the double-precision absolute value of its double-precision argument. .I Cabs\^ returns the complex absolute value of its complex argument. .I Zabs\^ returns the double-complex absolute value of its double-complex argument. The generic form .I abs\^ returns the type of its argument. .SH SEE ALSO floor(3M). .\" @(#)abs.3f 1.3 : .\" @(#)dble.3f 1.2 .so /usr/man/u_man/man3/ftype.3f  place of .BR /dev/swap . This is useful when examining a .IR corefile ; a .I swapdev\^ of .B /dev/null\^ causes the user block to be zeroed out. .TP .BI \-n " namelist\^" The argument is taken as the name of an alternate .I namelist\^ .RB ( /unix is the default). .TP .BI \-t " tlist\^" Restrict listing to data about the processes associated with the terminals given in .IR tlist , where .I tlist\^ can be in one of two forms: a list of terminal identifiers separated by commas, or a list of terminal identifiers enclosed in double quotes and separated by a comma and/or one or more spaces. .TP .BI \-p " plist\^" Restrict listing to data about processes whose process .SM ID numbers are given in .IR plist , where .I plist\^ is in the same format as .IR tlist . .TP .BI \-u " ulist\^" Restrict listing to data about processes whose user .SM ID numbers or login names are given in .IR ulist , where .I ulist\^ is in the same format as .IR tlist . In the listing, the numerical user .SM ID is printed unless the .B \-f opt.TH ACOS 3F .SH NAME acos, dacos \- Fortran arccosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = acos(" "r1" ")" .P .RB "dp2" " = dacos(" "dp1" ")" .RB "dp2" " = acos(" "dp1" ")" .SH DESCRIPTION .I Acos\^ returns the real arccosine of its real argument. .I Dacos\^ returns the double-precision arccosine of its double-precision argument. The generic form .I acos\^ may be used with impunity because its argument determines the type of the returned value. .SH SEE ALSO trig(3M). .\" @(#)acos.3f 1.4 .\" @(#)dcmplx.3f 1.2 .so /usr/man/u_man/man3/ftype.3f ; ion is used, in which case the login name is printed. .TP .BI \-g " glist\^" Restrict listing to data about processes whose process groups are given in .IR glist , where .I glist\^ is a list of process group leaders and is in the same format as .IR tlist . .PD .PP The column headings and the meaning of the columns in a .I ps\^ listing are given below; the letters .B f and .B l indicate the option .RI ( full\^ or .IR long ) that causes the corresponding heading to appear; .B all means that the heading always appears. Note that these two options only determine what information is provided for a process; they do .I not\^ determine which processes are to be listed. .ta .65i .ne 7 .PP .PD 0 .TP 16 .SM .BR F\*S " (l)" Flags (octal and additive) associated with the process: .RS 20 .TP 6 01 in core .TP 6 02 system process .TP 6 04 locked in core (e.g., for physical .SM I/O\*S) .TP 6 10 being swapped .TP 6 20 being traced by another process .TP 6 40 another tracing flag .RE .TP .SM .BR S\*S " (l)" The state of the pro.\" @(#)acos.3m 1.2 .so /usr/man/u_man/man3/trig.3m .\" @(#)dconjg.3f 1.2 .so /usr/man/u_man/man3/conjg.3f cess: .RS 20 .TP 6 0 non-existent .TP 6 S sleeping .TP 6 W waiting .TP 6 R running .TP 6 I intermediate .TP 6 Z terminated .TP 6 T stopped .TP 6 X growing .RE .br .ne 2 .TP .SM .BR UID\*S " (f,l)" The user .SM ID number of the process owner; the login name is printed under the .B \-f option. .TP .SM .BR PID\*S " (all)" The process .SM ID of the process; it is possible to kill a process if you know the \fBPID\fR. .TP .SM .BR PPID\*S " (f,l)" The process .SM ID of the parent process. .TP .SM .BR C\*S " (f,l)" Processor utilization for scheduling. .TP .SM .BR STIME\*S " (f)" Starting time of the process. .TP .SM .BR PRI\*S " (l)" The priority of the process; higher numbers mean lower priority. .TP .SM .BR NI\*S " (l)" Nice value; used in priority computation. .TP .SM .BR ADDR\*S " (l)" The memory address of the process (a pointer to the segment table array on the 3B20S), if resident; otherwise, the disk address. .TP .SM .BR SZ\*S " (l)" The size in blocks of the core image of the process. .TP .SM .BR WCHAN\*S " ; .TH AIMAG 3F .SH NAME aimag, dimag \- FORTRAN imaginary part of complex argument .SH SYNOPSIS .nf .BR "real" " r" .BR "complex" " cxr" .BR "double precision" " dp" .BR "double complex" " cxd" .P .RB "r" " = aimag(" "cxr" ")" .P .RB "dp" " = dimag(" "cxd" ")" .SH DESCRIPTION .I Aimag\^ returns the imaginary part of its single-precision complex argument. .I Dimag\^ returns the double-precision imaginary part of its double-complex argument. .\" @(#)aimag.3f 1.4 .\" @(#)dcos.3f 1.2 .so /usr/man/u_man/man3/cos.3f (l)" The event for which the process is waiting or sleeping; if blank, the process is running. .TP .SM .BR TTY\*S " (all)" The controlling terminal for the process. .TP .SM .BR TIME\*S " (all)" The cumulative execution time for the process. .TP .SM .BR CMD\*S " (all)" The command name; the full command name and its arguments are printed under the .B \-f option. .DT .PD .PP A process that has exited and has a parent, but has not yet been waited for by the parent, is marked .BR . .PP Under the .B \-f option, .I ps\^ tries to determine the command name and arguments given when the process was created by examining memory or the swap area. Failing this, the command name, as it would appear without the .B \-f option, is printed in square brackets. .SH FILES .PD 0 .TP "\w'/etc/ps_data\ \ \ 'u" /unix system namelist. .TP /dev/mem memory. .TP /dev/swap the default swap device. .TP /etc/passwd supplies \s-1UID\s+1 information. .TP /etc/ps_data internal data structure. .TP /dev searched to find terminal (``tt.TH AINT 3F .SH NAME aint, dint \- FORTRAN integer part intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = aint(" "r1" ")" .P .RB "dp2" " = dint(" "dp1" ")" .RB "dp2" " = aint(" "dp1" ")" .SH DESCRIPTION .I Aint\^ returns the truncated value of its real argument in a real. .I Dint\^ returns the truncated value of its double-precision argument as a double-precision value. .I Aint\^ may be used as a generic function name, returning either a real or double-precision value depending on the type of its argument. .\" @(#)aint.3f 1.4 < .\" @(#)dcosh.3f 1.2 .so /usr/man/u_man/man3/cosh.3f y'') names. .DT .PD .SH SEE ALSO kill(1), nice(1). .SH BUGS Things can change while .I ps\^ is running; the picture it gives is only a close approximation to reality. Some data printed for defunct processes are irrelevant. .\" @(#)ps.1 1.4 .\" @(#)alog.3f 1.2 .so /usr/man/u_man/man3/log.3f .\" @(#)dexp.3f 1.2 .so /usr/man/u_man/man3/exp.3f < .TH PTX 1 .SH NAME ptx \- permuted index .SH SYNOPSIS .B ptx [ options ] [ input [ output ] ] .SH DESCRIPTION .I Ptx\^ generates the file .I output\^ that can be processed with a text formatter to produce a permuted index of file .I input\^ (standard input and output default). It has three phases: the first does the permutation, generating one line for each keyword in an input line. The keyword is rotated to the front. The permuted file is then sorted. Finally, the sorted lines are rotated so the keyword comes at the middle of each line. .I Ptx\^ output is in the form: .br .IP \&\f3.xx\fP ``tail'' ``before keyword'' ``keyword and after'' ``head'' .PP where .B \&.xx is assumed to be an .I nroff\^ or .IR troff (1) macro provided by the user, or provided by the .IR mptx (5) macro package. The .I "before keyword\^" and .I "keyword and after\^" fields incorporate as much of the line as will fit around the keyword when it is printed. .I Tail\^ and .IR head , at least one of which is always the empty string, are wra.\" @(#)alog10.3f 1.2 .so /usr/man/u_man/man3/log10.3f .TH DIAL 3C .SH NAME dial \- establish an out-going terminal line connection .SH SYNOPSIS .B #include .PP .BR "int dial (" call ) .br .BR "\s-1CALL\s+1 \(**" call ; .PP .BR "void undial (" fd ) .br .BR int " fd" ; .SH DESCRIPTION .I Dial\^ returns a file descriptor for a terminal line open for read/write. The argument to .I dial\^ is a \s-1CALL\s+1 structure (defined in the .B header file. .P When finished with the terminal line, the calling program must invoke .I undial\^ to release the semaphore that has been set during the allocation of the terminal device. .PP The .SM CALL typedef in the .B \^ header file is: .PP .nf .ta .5i 1.8i 2.2i 2.8i \f3typedef struct {\f1 \f3struct termio \(**attr;\f1 /\(** pointer to termio attribute struct \(**/ \f3int baud;\f1 /\(** transmission data rate \(**/ \f3int speed;\f1 /\(** 212A modem: low=300, high=1200 \(**/ \f3char \(**line;\f1 /\(** device name for out-going line \(**/ \f3char \(**telno;\f1 /\(** pointer to tel-no digits string \pped-around pieces small enough to fit in the unused space at the opposite end of the line. .PP The following \fIoptions\fP can be applied: .TP 11 .BR \-f Fold upper and lower case letters for sorting. .TP .BR \-t Prepare the output for the phototypesetter. .TP .BI \-w " n\^" Use the next argument, .IR n , as the length of the output line. The default line length is 72 characters for .I nroff\^ and 100 for .IR troff . .TP .BI \-g " n\^" Use the next argument, .IR n , as the number of characters that .I ptx\^ reserves in its calculations for each gap among the four parts of the line as finally printed. The default gap is 3. .TP .BI \-o " only\^" Use as keywords only the words given in the \fIonly\fR file. .TP .BI \-i " ignore\^" Do not use as keywords any words given in the .I ignore file. If the .B \-i and .B \-o options are missing, use .B /usr/lib/eign as the .I ignore file. .TP .BI \-b " break\^" Use the characters in the .I break file to separate words. Tab, new-line, and space characters are always used = .\" @(#)amax0.3f 1.2 .so /usr/man/u_man/man3/max.3f (**/ \f3int modem;\f1 /\(** specify modem control for direct lines \(**/ \f3} \s-1CALL\s+1;\f1 .fi .PP The \s-1CALL\s+1 element .I speed\^ is intended only for use with an outgoing dialed call, in which case its value should be either 300 or 1200 to identify the 113A modem, or the high-speed or low-speed setting on the 212A modem. The \s-1CALL\s+1 element .I baud is for the desired transmission baud rate. For example, one might set .I baud\^ to 110 and .I speed\^ to 300 (or 1200). .P If the desired terminal line is a direct line, a string pointer to its device name should be placed in the .I line\^ element in the \s-1CALL\s+1 structure. Legal values for such terminal device names are kept in the .I L-devices\^ file. In this case, the value of the .I baud\^ element need not be specified as it will be determined from the .I L-devices\^ file. .P The .I telno\^ element is for a pointer to a character string representing the telephone number to be dialed. Such numbers may consist only of symbols described on the as break characters. .TP .BR \-r Take any leading non-blank characters of each input line to be a reference identifier (e.g., a page or chapter reference), separate from the text of the line. Attach the reference identifier as a 5th field on each output line. .PP The index for this manual was generated using .IR ptx . .SH FILES /bin/sort .br /usr/lib/eign .br /usr/lib/tmac/tmac.ptx .PD .SH SEE ALSO .PD 0 nroff(1), troff(1), mm(5), mptx(5). .PD .SH BUGS Line length counts do not account for overstriking or proportional spacing. .br Lines that contain tildes (\f3~\fP) are botched, because . I ptx uses that character internally. .\" @(#)ptx.1 1.4 .\" @(#)amax1.3f 1.2 .so /usr/man/u_man/man3/max.3f = .IR acu (7). The termination symbol will be supplied by the .I dial\^ function, and should not be included in the .I telno\^ string passed to .I dial\^ in the \s-1CALL\s+1 structure. .P The \s-1CALL\s+1 element .I modem\^ is used to specify modem control for direct lines. This element should be non-zero if modem control is required. The \s-1CALL\s+1 element .I attr\^ is a pointer to a .I termio\^ structure, as defined in the .B \^ header file. A \s-1NULL\s+1 value for this pointer element may be passed to the .I dial\^ function, but if such a structure is included, the elements specified in it will be set for the outgoing terminal line before the connection is established. This is important for attributes such as parity and baud rate. .SH FILES /usr/lib/uucp/L-devices .br /usr/spool/uucp/\s-1LCK\s+1..\fItty-device\fP .SH "SEE ALSO" uucp(1C), alarm(2), read(2), write(2). .br termio(7) in the .IR "\*(6) Administrator's Manual" . .SH DIAGNOSTICS On failure, a negative value indicating the reason for th.TH PWD 1 .SH NAME pwd \- working directory name .SH SYNOPSIS .B pwd .SH DESCRIPTION .I Pwd\^ prints the pathname of the working (current) directory. .SH "SEE ALSO" cd(1). .SH DIAGNOSTICS .B "Cannot open .." and .B "Read error in .." indicate possible file system trouble. These messages should be referred to a system programming counselor. .\" @(#)pwd.1 1.3 .\" @(#)amin0.3f 1.2 .so /usr/man/u_man/man3/min.3f e failure is returned. Mnemonics for these negative indices as listed here are defined in the .B header file. .PP .nf .ta .5i 1.3i 2.0i \f3\s-1INTRPT\s+1 \-1\f1 /\(** interrupt occured \(**/ \f3\s-1D_HUNG\s+1 \-2\f1 /\(** dialer hung (no return from write) \(**/ \f3\s-1NO_ANS\s+1 \-3\f1 /\(** no answer within 10 seconds \(**/ \f3\s-1ILL_BD\s+1 \-4\f1 /\(** illegal baud-rate \(**/ \f3\s-1A_PROB\s+1 \-5\f1 /\(** acu problem (open() failure) \(**/ \f3\s-1L_PROB\s+1 \-6\f1 /\(** line problem (open() failure) \(**/ \f3\s-1NO_L\s+1dv \-7\f1 /\(** can't open \s-1LDEVS\s+1 file \(**/ \f3\s-1DV_NT_A\s+1 \-8\f1 /\(** requested device not available \(**/ \f3\s-1DV_NT_K\s+1 \-9\f1 /\(** requested device not known \(**/ \f3\s-1NO_BD_A\s+1 \-10\f1 /\(** no device available at requested baud \(**/ \f3\s-1NO_BD_K\s+1 \-11\f1 /\(** no device known at requested baud \(**/ .fi .SH WARNINGS Including the .B \^ header file automatically includes the .B \^ header file. .PP Because the above ro> .TH RATFOR 1 .SH NAME ratfor \- rational FORTRAN dialect .SH SYNOPSIS .B ratfor [ options ] [ files ] .SH DESCRIPTION .I Ratfor\^ converts a rational dialect of \s-1FORTRAN\s+1 into ordinary irrational \s-1FORTRAN\s+1. .I Ratfor\^ provides control flow constructs essentially identical to those in C: .RS .TP \(bu\|\|\|statement grouping: \f3{\f2 statement\f3;\f2 statement\f3;\f2 statement\f3 }\f1 .TP \(bu\|\|\|decision-making: .nf \f3if\fP (\f2condition\f1)\f2 statement\f1 [ \f3else\f2 statement\f1 ] \f3switch\fP (\f2integer value\f1)\f3 { \f3case\f2 integer\f3:\f2 statement\f1 ... [ \f3default\fP: ] \f2statement\f1 \f3}\f1 .fi .TP \(bu\|\|\|loops: .br .nf \f3while\fP (\f2condition\f1) \f2statement\f1 \f3for\fP (\f2expression\f3;\f2 condition\f3;\f2 expression\f1)\f2 statement\f1 \f3do\f2 limits statement\f1 \f3repeat\f2 statement\f1 [ \f3until\fP (\f2condition\f1) ] \f3break\fP \f3next\fP .fi .RE .PP and some syntactic sugar to make programs easier to read and write: .RS .TP \(bu\|\|\|free form input: mult.\" @(#)amin1.3f 1.2 .so /usr/man/u_man/man3/min.3f utine uses \fB\fP, the size of programs not otherwise using standard I/O is increased more than might be expected. .SH BUGS An .IR alarm (2) system call for 3,600 seconds is made (and caught) within the .I dial\^ module for the purpose of ``touching'' the \fI\s-1LCK\s+1..\fP file and constitutes the device allocation semaphore for the terminal device. Otherwise, .IR uucp (1C) may simply delete the \fI\s-1LCK\s+1..\fP entry on its 90-minute clean-up rounds. The alarm may go off while the user program is in a .IR read (2) or .IR write (2) system call, causing an apparent error return. If the user program is to run for an hour or more, error returns from .IR read s should be checked for \fB(errno==\s-1EINTR\s+1)\fP, and the .I read\^ possibly reissued. .\" @(#)dial.3c 1.8 iple statements/line; automatic continuation .TP \(bu\|\|\|comments: .B # \f2This is a comment.\f1 .TP \(bu\|\|\|translation of relationals: for example, .BR > , .BR >= , become .BR .\s-1GT\s+1. , .BR .\s-1GE\s+1. . .TP \(bu\|\|\|return expression to caller from function: \f3return\fP (\f2expression\f1) .TP \(bu\|\|\|define: .br .B define .I name replacement\^ .TP \(bu\|\|\|include: .br .B include .I file\^ .RE .PP The option .B \-h causes quoted strings to be turned into .B 27H constructs. The .B \-C option copies comments to the output and attempts to format it neatly. Normally, continuation lines are marked with a .B & in column 1; the option .B \-6x makes the continuation character .B x and places it in column 6. .PP .I Ratfor\^ is best used with .IR f77 (1). .SH SEE ALSO ef\&l(1), f77(1). .br B. W. Kernighan and P. J. Plauger, ``Software Tools'', Addison-Wesley, 1976. .br ``\s-1FORTRAN\s+1'' in the .IR "\*(6) Programming Guide" . .\" @(#)ratfor.1 1.6 > .\" @(#)amod.3f 1.2 .so /usr/man/u_man/man3/mod.3f .\" @(#)dimag.3f 1.2 .so /usr/man/u_man/man3/aimag.3f .\" @(#)red.1 1.2 .so /usr/man/u_man/man1/ed.1 .\" @(#)and.3f 1.2 .so /usr/man/u_man/man3/bool.3f ? .\" @(#)dint.3f 1.2 .so /usr/man/u_man/man3/aint.3f .TH REGCMP 1 .SH NAME regcmp \- regular expression compile .SH SYNOPSIS .B regcmp [ .B \- ] files .SH DESCRIPTION .IR Regcmp , in most cases, precludes the need for calling .IR regcmp (3X) from C programs. This saves both execution time and program size. The command .I regcmp\^ compiles the regular expressions in .I file\^ and places the output in .IB file .i\fR.\fP If the \fB\-\fP option is used, the output is placed in .IB file .c\fR.\fP The format of entries in .I file\^ is a name (C variable), followed by one or more blanks, followed by a regular expression enclosed in double quotes. The output of .I regcmp\^ is C source code. Compiled regular expressions are represented as .B "extern char" vectors. .IB File .i files may thus be .I included\^ into C programs, or .IB file .c files may be compiled and later loaded. In the C program which uses the .I regcmp\^ output, .IR regex ( abc , line ) applies the regular expression named .I abc\^ to .IR line . Diagnostics are self-explanatory. .SH EXAMPLES .TP "\w'tel.\" @(#)anint.3f 1.2 .so /usr/man/u_man/man3/round.3f .\" @(#)dlog.3f 1.2 .so /usr/man/u_man/man3/log.3f ? no\ \ \ \ 'u" name ``([A\-Za\-z][A\-Za\-z0\-9\_]\(**)$0'' .TP telno ``\\({0,1}([2\-9][01][1\-9])$0\\){0,1} \(**'' .br ``([2\-9][0\-9]{2})$1[ \-]{0,1}'' .br ``([0\-9]{4})$2'' .TP In the C program that uses the \fIregcmp\fP output, .PP .RS \f3regex(telno, line, area, exch, rest)\f1 .RE .PP applies the regular expression named \f3telno\f1 to \f3line\f1. .SH SEE ALSO regcmp(3X). .\" @(#)regcmp.1 1.4 .\" @(#)asctime.3c 1.2 .so /usr/man/u_man/man3/ctime.3c .\" @(#)dlog10.3f 1.2 .so /usr/man/u_man/man3/log10.3f .TH RM 1 .SH NAME rm, rmdir \- remove files or directories .SH SYNOPSIS .B rm [ .B \-fri ] file ... .PP .B rmdir dir ... .PP .SH DESCRIPTION .I Rm\^ removes the entries for one or more files from a directory. If an entry is the last link to the file, the file is destroyed. Removal of a file requires write permission in its directory, but neither read nor write permission on the file itself. .PP If a file has no write permission and the standard input is a terminal, its permissions are printed and a line is read from the standard input. If that line begins with \f3y\fP the file is deleted; otherwise, the file remains. No questions are asked when the .B \-f option is given or if the standard input is not a terminal. .PP If a designated file is a directory, an error comment is printed unless the optional argument .B \-r has been used. When \f3\-r\f1 is used, .I rm\^ recursively deletes the entire contents of the specified directory, and the directory itself. To remove a directory, you must be located at the ne@ .TH ASIN 3F .SH NAME asin, dasin \- FORTRAN arcsine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = asin(" "r1" ")" .P .RB "dp2" " = dasin(" "dp1" ")" .RB "dp2" " = asin(" "dp1" ")" .SH DESCRIPTION .I Asin\^ returns the real arcsine of its real argument. .I Dasin\^ returns the double-precision arcsine of its double-precision argument. The generic form .I asin\^ may be used with impunity as it derives its type from that of its argument. .SH SEE ALSO trig(3M). .\" @(#)asin.3f 1.4 B \-q Report average queue length while occupied, and % of time occupied: .br runq-sz, %runocc \- run queue of processes in memory and runnable; .br swpq-sz, %swpocc \- swap queue of processes swapped out but ready to run. .sp .TP .B \-v Report status of text, process, inode and file tables: .br text-sz, proc-sz, inod-sz, file-sz \- entries/size for each table, evaluated once at sampling point; .br text-ov, proc-ov, inod-ov, file-ov \- overflows occurring between sampling points. .sp .TP .B \-m Report message and semaphore activities: .br msg/s, sema/s \- primitives per second. .sp .TP .B \-A Report all data. Equivalent to .BR \-udqbwcayvm . .SH EXAMPLES To see today's .SM CPU activity so far: .PP .RS .B sar .RE .PP To watch .SM CPU activity evolve for 10 minutes and save data: .PP .RS .B "sar \|\-o temp 60 10" .RE .PP To later review disk and tape activity from that period: .PP .RS .B "sar \|\-d \|\-f temp" .RE .SH FILES .TP 18 .RI /usr/adm/sa/sa dd\^ daily data file, where .I dd\^ are digits representing txt higher level (parent directory) in the directory hierarchy. You cannot be located in the directory you are trying to remove. For example, if the full pathname of a directory is \f3/top/next\f1, you must be in \f3/top\f1 to remove the directory \f3next\f1. .PP If the .B \-i (interactive) option is in effect, .I rm\^ asks whether to delete each file. The name of the file is printed on the terminal followed by a colon. If you do not want to delete the file, press the carriage return. If you do want to delete the file, type input that begins with the letter ``\f3y\f1''. The \f3\-i\f1 option can be used in combination with the \f3\-r\f1 option to interactively delete directories. When the command \f3rm \-ir\f2 directory name\f1 is given, the message \f3directory\f2 directory name\f3:\f1 is printed on the terminal. As with interactive file deletion, type either input beginning with the letter \f3y\f1 or a carriage return alone to delete or not delete a directory. .PP .I Rmdir\^ removes entries for the name.\" @(#)asin.3m 1.2 .so /usr/man/u_man/man3/trig.3m @ he day of the month. .SH SEE ALSO sag(1G). .br sar(1M) in the .IR "\*(6) Administrator's Manual" . .\" @(#)sar.1 1.6 d directories, which must be empty. .SH SEE ALSO unlink(2). .SH DIAGNOSTICS Generally self-explanatory. It is forbidden to remove the file \f3..\fP merely to avoid the consequences of inadvertently doing something like: .PP .RS .B "rm \-r .\(**" .RE .\" @(#)rm.1 1.4 .TH ASSERT 3X .SH NAME assert \- verify program assertion .SH SYNOPSIS .B #include .PP .BR "assert (" expression ) .br .BR int " expression" ; .SH DESCRIPTION .PP This macro is useful for putting diagnostics into programs. If .I expression\^ is false (zero) when .I assert\^ is executed, .I assert\^ prints .PP .RS .B "Assertion failed:" .I "expression, file xyz, line nnn" .RE .PP on the standard error output and aborts. In the error message, .I xyz\^ is the name of the source file and .I nnn\^ is the source line number of the .I assert\^ statement. .PP Compiling with the preprocessor option .SM .B \-DNDEBUG (see .IR cpp\^ (1)), or with the preprocessor control statement .B "#define \s-1NDEBUG\s+1" ahead of the .B "#include " statement, stops assertions from being compiled into the program. .SH "SEE ALSO" cpp(1), abort(3C). .\" @(#)assert.3x 1.4 .TH SCAT 1 .SH NAME scat \- concatenate and print files on synchronous printer .SH SYNOPSIS .B scat [ .B \-u ] [ .B \-s ] file .\|.\|. .SH DESCRIPTION .I Scat\^ reads each .I file\^ in sequence and writes it on the standard output, which is assumed to be a synchronous printer device. Thus: .PP .RS .B "scat file > /dev/sp0" .RE .PP prints the file, and: .PP .RS .B "scat file1 file2 > /dev/sp0" .RE .PP concatenates .I file1\^ and .I file2\^ and places the result on the printer. .PP If no input file is given, or if the argument .B \- is encountered, .I scat\^ reads from the standard input file. Output is buffered in 512-byte blocks unless the .B \-u option is specified. The .B \-s option makes .I scat\^ silent about non-existent files. .SH SEE ALSO cp(1), pr(1), stty(1). .SH WARNINGS .I Scat\^ uses synchronous printers in line mode with the wrap around option enabled. This means that the maximum line length is 79 characters; longer lines are wrapped back to the beginning of the next line each time the end of a pA .\" @(#)rmail.1 1.2 .so /usr/man/u_man/man1/mail.1 .TH ATAN 3F .SH NAME atan, datan \- FORTRAN arctangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .P .RB "r2" " = atan(" "r1" ")" .P .RB "dp2" " = datan(" "dp1" ")" .RB "dp2" " = atan(" "dp1" ")" .SH DESCRIPTION .I Atan\^ returns the real arctangent of its real argument. .I Datan\^ returns the double-precision arctangent of its double-precision argument. The generic form .I atan\^ may be used with a double-precision argument returning a double-precision value. .SH SEE ALSO trig(3M). .\" @(#)atan.3f 1.4 rinter line is reached. .\" @(#)scat.1 1.3 .TH RMDEL 1 .SH NAME rmdel \- remove a delta from an \s-1SCCS\s+1 file .SH SYNOPSIS .B rmdel .if n .ul \fB\-r\fR\c .if n .ul 0 \s-1SID\s0 files .SH DESCRIPTION .I Rmdel\^ removes the delta specified by the .SM \fISID\fP from each named \s-1SCCS\s+1 file. The delta to be removed must be the newest (most recent) delta in its branch in the delta chain of each named \s-1SCCS\s+1 file. In addition, the specified .SM \fISID\fR must not be that of a version being edited for the purpose of making a delta (i. e., if a .I p-file\^ (see .IR get (1)) exists for the named \s-1SCCS\s+1 file, the specified .SM \fISID\fR must .I not\^ appear in any entry of the .I p-file\c\^ ). .PP If a directory is named, .I rmdel\^ behaves as though each file in the directory were specified as a named file, except that non-\s-1SCCS\s+1 files (last component of the pathname does not begin with \fBs.\fR) and unreadable files are silently ignored. If a name of \fB\-\fR is given, the standard input is read; each line of the standard input is tA .\" @(#)atan.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH SCC 1 .SH NAME scc \- C compiler for stand-alone programs .SH SYNOPSIS .B scc [ .B +\c [ lib ] ] [ option ] ... [ file ] ... .SH DESCRIPTION .I Scc\^ prepares the named files for stand-alone execution. The .I option\^ and .I file\^ arguments may be anything that can legally be used with the .I cc\^ command; it should be noted, though, that the .B \-p (profiling) option, as well as any object module that contains system calls, causes the executable not to run. .PP .I Scc\^ defines the compiler constant, .BR \s-1STANDALONE\s+1 , so that sections of C programs may be compiled conditionally when the executable is run stand-alone. .PP The first argument specifies an auxiliary library that defines the device configuration of the computer for which the stand-alone executable is being prepared. .I Lib\^ may be one of the following: .TP 8 .B A .SM RP\*S04/05/06 disk and .SM TU\*S16 magnetic tape, or equivalent on the \s-1PDP\s+1-11 plus \s-1RM\s+105 and \s-1RM\s+180 disks, and \s-1TU\s+178 and \s-1TS\s+111 tapes, aken to be the name of an \s-1SCCS\s+1 file to be processed; non-\s-1SCCS\s+1 files and unreadable files are silently ignored. .PP The exact permissions necessary to remove a delta are documented in the ``Source Code Control System User's Guide''. Simply stated, if you make a delta you can remove it; if you own the file and directory you can remove a delta. .SH FILES .PD 0 .TP 10 x-file (see .IR delta (1)) .TP 10 z-file (see .IR delta (1)) .PD .SH "SEE ALSO" delta(1), get(1), help(1), prs(1), sccsfile(4). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .br .SH DIAGNOSTICS Use .IR help (1) for explanations. .\" @(#)rmdel.1 1.5 .TH ATAN2 3F .SH NAME atan2, datan2 \- FORTRAN arctangent intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2, r3" .BR "double precision" " dp1, dp2, dp3" .P .RB "r3" " = atan2(" "r1, r2" ) .P .RB "dp3" " = datan2(" "dp1, dp2" ")" .RB "dp3" " = atan2(" "dp1, dp2" ")" .SH DESCRIPTION .I Atan2\^ returns the arctangent of .I arg1/arg2 as a real value. .I Datan2\^ returns the double-precision arctangent of its double-precision arguments. The generic form .I atan2\^ may be used with impunity with double-precision arguments. .SH SEE ALSO trig(3M). .\" @(#)atan2.3f 1.4 B or equivalent .TP .B B \s-1RK\s+111/\s-1RK\s+105 disk, \s-1RP\s+111/\s-1RP\s+103 disk, and \s-1TM\s+111/\s-1TU\s+116 magnetic tape, or equivalent .PP If no .BI + lib\^ argument is specified, .B +A is assumed. If the .B + argument is specified alone, no configuration library is loaded unless the user supplies his own. .SH FILES .nr t1 \w'/usr/lib/lib2A.a ' .nr t2 \n(t1+\w'+A configuration library ' .ta \n(t1u \n(t2u /lib/crt2.o execution start-off .br /usr/lib/lib2.a stand-alone library .br /usr/lib/lib2A.a +A configuration library (\s-1PDP\s+1-11 only) .br /usr/lib/lib2B.a +B configuration library (\s-1PDP\s+1-11 only) .SH SEE ALSO cc(1), ld(1), a.out(4). .\" @(#)scc.1 1.4 .\" @(#)rmdir.1 1.2 .so /usr/man/u_man/man1/rm.1 .\" @(#)atan2.3m 1.2 .so /usr/man/u_man/man3/trig.3m .TH SCCSDIFF 1 .SH NAME sccsdiff \- compare two versions of an \s-1SCCS\s+1 file .SH SYNOPSIS .B sccsdiff .BR \-r \s-1SID\s+1\&1 .BR \-r \s-1SID\s+1\&2 .RB [ \-p ] .RB [ \-s n] files .SH DESCRIPTION .I Sccsdiff\^ compares two versions of an .SM SCCS file and generates the differences between the two versions. Any number of .SM SCCS files may be specified, but arguments apply to all files. .RS 5 .TP 12 .BI \-r \s-1SID\s+1?\^ .IR \s-1SID\s+11 \ and \ \s-1SID\s+12 \ specify the deltas of an .SM SCCS file that are to be compared. Versions are passed to .IR bdiff (1) in the order given. .TP 12 .B \-p pipe output for each file through .IR pr (1). .TP 12 .BI \-s n\^ \fIn\fP is the file segment size that .I bdiff\^ will pass to .IR diff (1). This is useful when .I diff\^ fails due to a high system load. .SH FILES .TP "\w'/tmp/get?????\ \ 'u" /tmp/get????? Temporary files .SH "SEE ALSO" bdiff(1), get(1), help(1), pr(1). .br ``Source Code Control System'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS .I file: .B "NB .\" @(#)rsh.1 1.2 .so /usr/man/u_man/man1/sh.1 .TH ATOF 3C .SH NAME atof \- convert \s-1ASCII\s0 string to floating-point number .SH SYNOPSIS .BR "double atof (" nptr ) .br .BR "char \(**" nptr ; .SH DESCRIPTION .I Atof\^ converts a character string pointed to by .I nptr\^ to a double-precision floating-point number. The first unrecognized character ends the conversion. .I Atof\^ recognizes an optional string of white-space characters (blanks or tabs), then an optional sign, then a string of digits optionally containing a decimal point, then an optional .B e or .B E followed by an optionally signed integer. If the string begins with an unrecognized character, .I atof\^ returns the value zero. .SH DIAGNOSTICS When the correct value would overflow, .I atof\^ returns .SM .BR HUGE, and sets .I errno\^ to .SM .BR ERANGE\*S . Zero is returned on underflow. .SH SEE ALSO scanf(3S). .\" @(#)atof.3c 1.4 o differences" means the two versions are the same. .sp Use .IR help (1) for explanations. .PD .\" @(#)sccsdiff.1 1.6 .TH SACT 1 .SH NAME sact \- print current \s-1SCCS\s+1 file editing activity .SH SYNOPSIS .B sact files .SH DESCRIPTION .I Sact\^ informs the user of any impending deltas to a named .SM SCCS file. This situation occurs when .IR get (1) with the .B \-e option has been previously executed without a subsequent execution of .IR delta (1). If a directory is named on the command line, .I sact\^ behaves as though each file in the directory were specified as a named file, except that non-\s-1SCCS\s+1 files and unreadable files are silently ignored. If a name of .B \- is given, the standard input is read with each line being taken as the name of an .SM SCCS file to be processed. .P The output for each named file consists of five fields separated by spaces. .RS 5 .TP 12 Field 1 specifies the .SM SID of a delta that currently exists in the .SM SCCS file to which changes will be made to make the new delta. .TP 12 Field 2 specifies the .SM SID for the new delta to be created. .TP 12 Field 3 contains the login id of the usC .\" @(#)atoi.3c 1.2 .so /usr/man/u_man/man3/strtol.3c .TH SDB 1 .SH NAME sdb \- symbolic debugger .SH SYNOPSIS .B sdb [\fB\-w\fR] [\fB\-W\fR] [ objfil [ corfil [ directory ] ] ] .SH DESCRIPTION .I Sdb\^ is a symbolic debugger which can be used with C and F77 programs. It may be used to examine their object files and core files and to provide a controlled environment for their execution. .PP .I Objfil\^ is normally an executable program file which has been compiled with the .B \-g (debug) option; if it has not been compiled with the .B \-g option, or if it is not an executable file, the symbolic capabilities of .I sdb\^ are limited, but the file can still be examined and the program debugged. The default for .I objfil\^ is .BR a.out . .I Corfil\^ is assumed to be a core image file produced after executing .IR objfil ; the default for .I corfil\^ is .BR core . The core file need not be present. A .B \- in place of .I corfil\^ forces .I sdb\^ to ignore any core image file. Source files used in constructing .I objfil\^ must be in .I directory to be located. .PP It ier who will make the delta (i.e., executed a .I get\^ for editing). .TP 12 Field 4 contains the date that .B "get \-e" was executed. .TP 12 Field 5 contains the time that .B "get \-e" was executed. .SH "SEE ALSO" delta(1), get(1), unget(1). .br ``Source Code Control System User's Guide'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS Use .IR help (1) for explanations. .\" @(#)sact.1 1.6 .\" @(#)atol.3c 1.2 .so /usr/man/u_man/man3/strtol.3c C s useful to know that at any time there is a .I "current line\^" and .IR "current file" . If .I corfil\^ exists then they are initially set to the line and file containing the source statement at which the process terminated. Otherwise, they are set to the first line in .BR main (). The current line and file may be changed with the source file examination commands. .PP By default, warnings are provided if the source files used in producing .I objfil cannot be found or are newer than .IR objfil . This checking feature and the accompanying warnings may be disabled by the use of the .B \-W flag. .PP Names of variables are written just as they are in C or F77. Variables local to a procedure may be accessed using the form .IB procedure : variable\fR. If no procedure name is given, the procedure containing the current line is used by default. .P It is also possible to refer to structure members as .IB variable . member\fR, pointers to structure members as .IB variable \(mi> member , and array elements as .IB variab.TH SADP 1 .SH NAME sadp \- disk access profiler .SH SYNOPSIS .B sadp [ .B \-th ] [ .B \-d device[\|\-drive] ] s [ n ] .SH DESCRIPTION .I Sadp reports disk access location and seek distance, in tabular or histogram form. It samples disk activity once every second during an interval of .I s seconds. This is done repeatedly if .I n is specified. Cylinder usage and disk distance are recorded in units of eight cylinders. .PP The only valid value of .I device is .BR disk. .I Drive specifies the disk drives and it may be: a drive number in the range supported by .IR device , two numbers separated by a minus (indicating an inclusive range), or a list of drive numbers separated by commas. .PP Up to eight disk drives may be reported. The .B \-d option may be omitted, if only one .I device is present. .PP The .B \-t flag causes the data to be reported in tabular form. The .B \-h flag produces a histogram of the data on the printer. Default is .BR \-t . .SH EXAMPLE The command: .PP .RS \f3sadp \|\-d disk\|\-0 900 4 \f1.TH BESSEL 3M .SH NAME j0, j1, jn, y0, y1, yn \- Bessel functions .SH SYNOPSIS .nf .B #include .PP .BR "double j0 (" x ) .BR "double " x ; .PP .BR "double j1 (" x ) .BR "double " x ; .PP .BR "double jn (" "n, x" ) .BR int " n" ; .BR double " x" ; .PP .BR "double y0 (" x ) .BR double " x" ; .PP .BR "double y1 (" x ) .BR double " x" ; .PP .BR "double yn (" "n, x" ) .BR int " n" ; .BR double " x" ; .SH DESCRIPTION .I J0\^ and .I j1\^ return Bessel functions of .I x\^ of the first kind of orders 0 and 1 respectively. .I Jn\^ returns the Bessel function of .I x\^ of the first kind of order .IR n . .PP .I Y0\^ and .I y1\^ return the Bessel functions of .I x\^ of the second kind of orders 0 and 1 respectively. .I Yn\^ returns the Bessel function of .I x\^ of the second kind of order .IR n . The value of .I x\^ must be positive. .SH DIAGNOSTICS Non-positive arguments cause .IR y0 , .IR "y1\^" , and .I yn\^ to return the value .SM .B HUGE and to set .I errno\^ to .SM .BR EDOM . They also cause a message indile [ number ]\fR. Pointers may be dereferenced by using the form \fIpointer\fB[\fR0\fB]\fR. Combinations of these forms may also be used. F77 common variables may be referenced by using the name of the common block instead of the structure name. Blank common variables may be named by the form .BI . variable\fR. A number may be used in place of a structure variable name, in which case the number is viewed as the address of the structure, and the template used for the structure is that of the last structure referenced by .I sdb\fR. An unqualified structure variable may also be used with various commands. Generally, .I sdb interprets a structure as a set of variables; thus, it displays the values of all the elements of a structure when it is requested to display a structure. An exception to this interpretation occurs when displaying variable addresses. An entire structure does have an address, and it is this value .I sdb displays, not the addresses of individual elements. .P Elements of a multidimensional arrayD  .RE .PP generates 4 tabular reports, each describing cylinder usage and seek distance of disk drive 0 during a 15-minute interval. .SH FILES /dev/kmem .\" @(#)sadp.1 1.5 cating .SM DOMAIN error to be printed on the standard error output; the process will continue. .PP These error-handling procedures may be changed with the function .IR matherr (3M). .SH SEE ALSO matherr(3M). .\" @(#)bessel.3m 1.4  may be referenced as .IB variable [ number ][ number ]...\fR, or as .IB variable [ number,number,... ]\fR. In place of .I number\fR, the form .IB number ; number may be used to indicate a range of values, .B \(** may be used to indicate all legitimate values for that subscript, or subscripts may be omitted entirely if they are the last subscripts and the full range of values is desired. As with structures, .I sdb displays all the values of an array or of the section of an array if trailing subscripts are omitted. It displays only the address of the array itself or of the section specified by the user if subscripts are omitted. A multidimensional parameter in an F77 program cannot be displayed as an array, but it is actually a pointer, whose value is the location of the array. The array itself can be accessed symbolically from the calling function. .P A particular instance of a variable on the stack may be referenced by using the form .IB procedure : variable , number\fR. All the variations mentioned in namin.if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@ .if n .ds ' ' .if t .ds ` \h@.05m@\s+4\v@.333m@\`\v@-.333m@\s-4\h@.05m@ .if n .ds ` ` .TH SAG 1G .SH NAME sag \- system activity graph .SH SYNOPSIS .B "sag " [ options ] .SH DESCRIPTION .I Sag graphically displays the system activity data stored in a binary data file by a previous .IR sar (1) run. Any of the .I sar data items may be plotted singly, or in combination; as cross plots, or versus time. Simple arithmetic combinations of data may be specified. .I Sag invokes .I sar and finds the desired data by string-matching the data column header (run .I sar to see what's available). The following \fIoptions\fP may be passed to .IR sar : .TP 9 \fB\-s \fItime\fR Select data later than .I time in the form hh\|[\^:mm\^]\^. Default is 08:00. .TP 9 \fB\-e \fItime\fR Select data up to .IR time . Default is 18:00. .TP 9 \fB\-i \fIsec\fR Select data at intervals as close as possible to \fIsec \fRseconds. .TP 9 \fB\-f \fIfile\fR Use \fIfile \fRas the data sourcD .TH BOOL 3F .SH NAME and, or, xor, not, lshift, rshift \- FORTRAN bitwise Boolean functions .SH SYNOPSIS .nf .BR "integer" " i, j, k" .BR "real" " a, b, c" .BR "double precision" " dp1, dp2, dp3" .PP .RB "k" " = and(" "i, j" ")" .RB "c" " = or(" "a, b" ")" .RB "j" " = xor(" "i, a" ")" .RB "j" " = not(" "i" ")" .RB "k" " = lshift(" "i, j" ")" .RB "k" " = rshift(" "i, j" ")" .SH DESCRIPTION The generic intrinsic Boolean functions .IR and , .IR or , and .I xor\^ return the value of the binary operations on their arguments. .I Not\^ is a unary operator returning the one's complement of its argument. .I Lshift\^ and .I rshift\^ return the value of the first argument shifted left or right, respectively, the number of times specified by the second (integer) argument. .P The Boolean functions are generic, i.e., defined for all data types as arguments and return values. Where required, the compiler generates appropriate type conversions. .SH NOTE Although defined for all data types, use of Boolean functions on non-ig variables may be used. .IB Number\^ is the occurrence of the specified procedure on the stack, counting the top, or most current, as the first. If no procedure is specified, the procedure currently executing is used by default. .PP It is also possible to specify a variable by its address. All forms of integer constants which are valid in C may be used, so that addresses may be input in decimal, octal, or hexadecimal. .PP Line numbers in the source program are referred to as .IB file-name : number or .IB procedure : number\fR. In either case the number is relative to the beginning of the file. If no procedure or filename is given, the current file is used by default. If no number is given, the first line of the named procedure or file is used. .PP While a process is running under .IR sdb all addresses refer to the executing program; otherwise they refer to .I objfil\^ or .I corfil\^. An initial argument of .B \-w permits overwriting locations in .I objfil\^. .SS Addresses. The address in a file associated we for \fIsar\fR. Default is the current daily data file \fB/usr/adm/sa/sa\fIdd\fR. .P Other \fIoptions\fP: .TP 9 \fB\-T \fIterm\fR Produce output suitable for terminal \fIterm\fR. See \fItplot\fR(1G) for known terminals. If .I term is .BR vpr , output is processed by .B vpr \-p and queued to a Versatec printer. Default for .I term is .BR \s-1$TERM\s+1 . .TP 9 .BI "\-x\0" spec x axis specification with .I spec in the form: .RS "name\|[op \|name]\|.\|.\|.\|[lo \|hi]" .RE .TP 9 .BI "\-y\0" spec y axis specification with .I spec in the same form as above. .P \fIName\fR is either a string that matches a column header in the \fIsar \fR report, with an optional device name in square brackets, e.g., \fBr+w/s[dsk\-1]\fR, or an integer value. \fIOp \fR is \fB + \- \(**\fR or \fB/ \fRsurrounded by blanks. Up to five names may be specified. Parentheses are not recognized. Contrary to custom, .BR "\0+\0" "and" "\0\-\0" have precedence over .BR "\0\(**\0" "and" "\0/" "." Evaluation is left to right. Thus A\0/\0A\0+\0B\0\(*nteger data is not productive. .SH BUGS The implementation of the shift functions may cause large shift values to deliver unexpected results. .\" @(#)bool.3f 1.5 E ith a written address is determined by a mapping associated with that file. Each mapping is represented by two triples .RI ( "b1, e1, f1" ) and .RI ( "b2, e2, f2" ). The .I file address\^ corresponding to a written .I address\^ is calculated as follows: .PP .RS .IR b1 \*(LE address < e1 \*(IM .IR "file address" = address + f1\-b1 .RE otherwise .PP .RS .IR b2 \*(LE address < e2 \*(IM .IR "file address" = address + f2\-b2, .RE .PP otherwise, the requested .I address\^ is not legal. In some cases (e.g., for programs with separated I and D space) the two segments for a file may overlap. .PP The initial setting of both mappings is suitable for normal .B a.out and .B core files. If either file is not of the kind expected then, for that file, .I b1\^ is set to 0, .I e1\^ is set to the maximum file size, and .I f1\^ is set to 0; in this way the whole file can be examined with no address translation. .PP In order for .I sdb\^ to be used on large files, all appropriate values are kept as signed 32-bit integers. .SS C*\0100 is evaluated (A/(A+B))\(**100, and A\0+\0B\0/\0C\0+\0D is (A+B)/(C+D). .IR "Lo " "and " "hi " are optional numeric scale limits. If unspecified, they are deduced from the data. .P A single .I spec is permitted for the x axis. If unspecified, \fItime\fP is used. Up to 5 \fIspec\fR's separated by .B \|;\| may be given for .BR \-y . Enclose the .BR "\-x " "and " "\-y" arguments in double quotes (\fB"\|"\fR) if blanks or \fB\\\fR<\s-1CR\s+1> are included. The .B \-y default is: .PP .RS 0 \fB\-y\0"%usr\00\0100;\0%usr\0+\0%sys\00\0100;\0%usr\0+\0%sys\0+\0%wio\00\0100"\fR .RE .SH EXAMPLES To see today's .SM CPU utilization: .RS \f3sag\f1 .RE .P To see activity over 15 minutes of all disk drives: .RS \f3TS=\*`date\0+%H:%M\*`\f1 .br \f3sar\0\-o\0tempfile\060\015\f1 .br \f3TE=\*`date\0+%H:%M\*`\f1 .br \f3sag\0\-f\0tempfile\0\-s\0$TS\0\-e\0$TE\0\-y\0"r+w/s[dsk]"\f1 .RE .SH FILES .TP 22 /usr/adm/sa/sa\fIdd\fR daily data file for day \fIdd\fR. .SH SEE ALSO sar(1), tplot(1G). .\" @(#)sag.1g 1.4 .TH BSEARCH 3C .SH NAME bsearch \- binary search .SH SYNOPSIS .BR "char \(**bsearch ((char \(**)" " key" ", (char \(**)" " base, nel, sizeof" .BR " (\(**" "key" ")," " compar" ")" .br .BR unsigned " nel" ; .br .BR "int (\(**" "compar" ")( );" .SH DESCRIPTION .I Bsearch\^ is a binary search routine generalized from Knuth (6.2.1) Algorithm B. It returns a pointer into a table indicating where a datum may be found. The table must be previously sorted in increasing order according to a provided comparison function. .I Key\^ points to the datum to be sought in the table. .I Base\^ points to the element at the base of the table. .I Nel\^ is the number of elements in the table. .I Compar\^ is the name of the comparison function, which is called with two arguments that point to the elements being compared. The function must return an integer less than, equal to, or greater than zero, depending on whether the first argument is to be considered less than, equal to, or greater than the second. .SH DIAGNOSTICS A .SM .B ommands. .PP The commands for examining data in the program are: .TP 5 .B t Print a stack trace of the terminated or halted program. .TP 5 .B T Print the top line of the stack trace. .TP 5 .IB variable / clm Print the value of .I variable\^ according to length .I l\^ and format .IR m . A numeric count .I c indicates that a region of memory, beginning at the address implied by .IR variable , is to be displayed. The length specifiers are: .RS .RS .PD 0 .TP .BI b\^ one byte .TP .BI h\^ two bytes (half word) .TP .BI l\^ four bytes (long word) .RE .PD .br .ne 5 .PP Legal values for .I m\^ are: .RS .PD 0 .TP .BI c\^ character .TP .BI d\^ decimal .TP .BI u\^ decimal, unsigned .TP .BI o\^ octal .TP .BI x\^ hexadecimal .TP .BI f\^ 32-bit single precision floating point .TP .BI g\^ 64-bit double precision floating point .TP .BI s\^ Assume .I variable\^ is a string pointer and print characters starting at the address pointed to by the variable. .TP .BI a\^ Print characters starting at the variable's address. This formaE .TH SAR 1 .SH NAME sar \- system activity reporter .SH SYNOPSIS .B sar .RB [\| \-ubdycwaqvmA\| ] .RB [\| \-o\0 file\|] t [ n ] .PP .B sar .RB [\| \-ubdycwaqvmA\| ] .RB [\| \-s\0 time\|] .RB [\| \-e\0 time\|] .RB [\| \-i\0 sec\|] .RB [\| \-f\0 file\|] .SH DESCRIPTION .IR Sar, in the first instance, samples cumulative activity counters in the operating system at .I n intervals of .I t seconds. If the .B \-o option is specified, .I sar saves the samples in .I file in binary format. The default value of .I n is 1. In the second instance, with no sampling interval specified, .I sar extracts data from a previously recorded .IR file, either the one specified by the .B \-f option or, by default, the standard system activity daily data file .BI /usr/adm/sa/sa dd\^ for the current day .IR dd. The starting and ending times of the report can be bounded via the .B \-s and .B \-e .I time arguments of the form .IR hh [: mm [: ss ]].\^ The .B \-i option selects records at .I sec second intervals; otherwise, all intervals foNULL pointer is returned if the key cannot be found in the table. .SH NOTES The pointers to the key and the element at the base of the table should be of type pointer-to-element, and cast to type pointer-to-character. .br The comparison function need not compare every byte, so arbitrary data may be contained in the elements in addition to the values being compared. .br Although declared as type pointer-to-character, the value returned should be cast into type pointer-to-element. .SH SEE ALSO lsearch(3C), hsearch(3C), qsort(3C), tsearch(3C). .\" @(#)bsearch.3c 1.6 t may not be used with register variables. .TP .BI p\^ pointer to procedure .TP .BI i\^ Disassemble machine-language instruction with addresses printed numerically and symbolically. .TP .BI I\^ Disassemble machine-language instruction with addresses printed numerically only. .RE .PD The length specifiers are only effective with the formats \fBc\fP, \fBd\fP, \fBu\fP, \fBo\fP and \fBx\fP. Any of the specifiers, \fIc\fP, \fIl\fP, and \fIm\fP, may be omitted. If all are omitted, .I sdb chooses a length and a format suitable for the variable's type, as declared in the program. If .I m is specified, then this format is used for displaying the variable. A length specifier determines the output length of the value to be displayed, sometimes resulting in truncation. A count specifier .I c tells .I sdb to display that many units of memory, beginning at the address of .IR variable . The number of bytes in one such unit of memory is determined by the length specifier .IR l , or, if no length is given, by the size associaund in the data file are reported. .PP In either case, subsets of data to be printed are specified by the following options: .PP .PD 0 .TP 5 .B \-u Report .SM CPU utilization (the default): .br %usr, %sys, %wio, %idle \- portion of time running in user mode, running in system mode, idle with some process waiting for block .SM I/O, and otherwise idle. .sp .TP .B \-b Report buffer activity: .br bread/s, bwrit/s \- transfers per second of data between system buffers and disk or other block devices; .br lread/s, lwrit/s \- accesses of system buffers; .br %rcache, %wcache \- cache hit ratios, e. g., 1 \- bread/lread; .br pread/s, pwrit/s \- transfers via raw (physical) device mechanism. .sp .TP .B \-d Report activity for each block device, e. g., disk or tape drive: .br %busy, avque \- portion of time device was busy servicing a transfer request, average number of requests outstanding during that time; .br r+w/s, blks/s \- number of data transfers from or to device, number of bytes transferred in 512-byte units; F .\" @(#)cabs.3f 1.2 .so /usr/man/u_man/man3/abs.3f ted with the .IR variable. If a count specifier is used for the .B s or .B a command, then that many characters are printed. Otherwise successive characters are printed until either a null byte is reached or 128 characters are printed. The last variable may be redisplayed with the command .BR ./ . .PP The .IR sh (1) metacharacters .B \(** and .B ? may be used within procedure and variable names, providing a limited form of pattern matching. If no procedure name is given, variables local to the current procedure and global variables are matched; if a procedure name is specified, only variables local to that procedure are matched. To match only global variables, the form .BI : pattern\^ is used. .RE .TP 5 .PD 0 .IB linenumber ? lm .TP 5 \fIvariable:\fB?\fIlm\fR .PD Print the value at the address from .BR a.out or I space given by .I linenumber\^ or .IR variable (procedure name), according to the format .IR lm . The default format is `i'. .TP 5 .PD 0 .IB variable = lm .TP 5 .IB linenumber = lm .TP 5 .IB number .br avwait, avserv \- average time in ms. that transfer requests wait idly on queue, and average time to be serviced (which for disks includes seek, rotational latency and data transfer times). .sp .TP .B \-y Report TTY device activity: .br rawch/s, canch/s, outch/s \- input character rate, input character rate processed by canon, output character rate; .br rcvin/s, xmtin/s, mdmin/s \- receive, transmit and modem interrupt rates. .sp .TP .B \-c Report system calls: .br scall/s \- system calls of all types; .br sread/s, swrit/s, fork/s, exec/s \- specific system calls; .br rchar/s, wchar/s \- characters transferred by read and write system calls. .sp .TP .B \-w Report system swapping and switching activity: .br swpin/s, swpot/s, bswin/s, bswot/s \- number of transfers and number of 512-byte units transferred for swapins (including initial loading of some programs) and swapouts; .br pswch/s \- process switches. .sp .TP .B \-a Report use of file access system routines: .br iget/s, namei/s, dirblk/s. .sp .TP ..\" @(#)calloc.3c 1.2 .so /usr/man/u_man/man3/malloc.3c F = lm .PD Print the address of .I variable\^ or .IR linenumber , or the value of .IR number , in the format specified by .IR lm . If no format is given, then .B lx is used. The last variant of this command provides a convenient way to convert between decimal, octal and hexadecimal. .TP 5 .IB variable ! value Set .I variable\^ to the given .IR value . The value may be a number, a character constant or a variable. The value must be well defined; expressions that produce more than one value, such as structures, are not allowed. Character constants are denoted .BI ' character\fR. Numbers are viewed as integers unless a decimal point or exponent is used. In this case, they are treated as having the type double. Registers are viewed as integers. The .I variable may be an expression that indicates more than one variable, such as an array or structure name. If the address of a variable is given, it is regarded as the address of a variable of type .IR int . C conventions are used in any type conversions necessary to peB \-q Report average queue length while occupied, and % of time occupied: .br runq-sz, %runocc \- run queue of processes in memory and runnable; .br swpq-sz, %swpocc \- swap queue of processes swapped out but ready to run. .sp .TP .B \-v Report status of text, process, inode and file tables: .br text-sz, proc-sz, inod-sz, file-sz \- entries/size for each table, evaluated once at sampling point; .br text-ov, proc-ov, inod-ov, file-ov \- overflows occurring between sampling points. .sp .TP .B \-m Report message and semaphore activities: .br msg/s, sema/s \- primitives per second. .sp .TP .B \-A Report all data. Equivalent to .BR \-udqbwcayvm . .SH EXAMPLES To see today's .SM CPU activity so far: .PP .RS .B sar .RE .PP To watch .SM CPU activity evolve for 10 minutes and save data: .PP .RS .B "sar \|\-o temp 60 10" .RE .PP To later review disk and tape activity from that period: .PP .RS .B "sar \|\-d \|\-f temp" .RE .SH FILES .TP 18 .RI /usr/adm/sa/sa dd\^ daily data file, where .I dd\^ are digits representing t.\" @(#)ccos.3f 1.2 .so /usr/man/u_man/man3/cos.3f 8;>ADGJMPG 2}zwtqnkheb_\Y|yvspmjgda^[X{xurolifc`]ZWTQNKHEB?<9.\" @(#)ceil.3m 1.2 .so /usr/man/u_man/man3/floor.3m rform the indicated assignment. .TP 5 .B x Print the machine registers and the current machine-language instruction. .TP 5 .B X Print the current machine-language instruction. .PP The commands for examining source files are: .PP .PD 0 .TP 5 .BI "e " procedure\^ .TP 5 .BI "e " file-name\^ .TP 5 .BI "e " directory/\^ .TP 5 .BI "e " "directory file-name"\^ .PD The first two forms set the current file to the file containing .I procedure\^ or to .IR file-name . The current line is set to the first line in the named procedure or file. Source files are assumed to be in .IR directory . The default is the current working directory. The latter two forms change the value of .IR directory . If no procedure, filename, or directory is given, the current procedure name and filename are reported. .TP 5 .BI / "regular expression" / Search forward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B / may be elided. .TP 5 .BI ? "regular expression" ? Search ba.TH SCAT 1 .SH NAME scat \- concatenate and print files on synchronous printer .SH SYNOPSIS .B scat [ .B \-u ] [ .B \-s ] file .\|.\|. .SH DESCRIPTION .I Scat\^ reads each .I file\^ in sequence and writes it on the standard output, which is assumed to be a synchronous printer device. Thus: .PP .RS .B "scat file > /dev/sp0" .RE .PP prints the file, and: .PP .RS .B "scat file1 file2 > /dev/sp0" .RE .PP concatenates .I file1\^ and .I file2\^ and places the result on the printer. .PP If no input file is given, or if the argument .B \- is encountered, .I scat\^ reads from the standard input file. Output is buffered in 512-byte blocks unless the .B \-u option is specified. The .B \-s option makes .I scat\^ silent about non-existent files. .SH SEE ALSO cp(1), pr(1), stty(1). .SH WARNINGS .I Scat\^ uses synchronous printers in line mode with the wrap around option enabled. This means that the maximum line length is 79 characters; longer lines are wrapped back to the beginning of the next line each time the end of a pG .\" @(#)cexp.3f 1.2 .so /usr/man/u_man/man3/exp.3f ckward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B ? may be elided. .TP 5 .B p Print the current line. .TP 5 .B z Print the current line followed by the next 9 lines. Set the current line to the last line printed. .TP 5 .B w Window. Print the 10 lines around the current line. .TP 5 .I number\^ Set the current line to the given line number. Print the new current line. .TP 5 .IB count + Advance the current line by .I count\^ lines. Print the new current line. .TP 5 .IB count \(mi Retreat the current line by .I count\^ lines. Print the new current line. .PP The commands for controlling the execution of the source program are: .PP .TP 5 \fIcount\fB r \fIargs\fR .br .ns .TP 5 \fIcount\fB R Run the program with the given arguments. The \fBr\fP command with no arguments reuses the previous arguments to the program while the \fBR\fP command runs the program with no arguments. An argument beginning with .B < or .B > causes redirection for the rinter line is reached. .\" @(#)scat.1 1.3 .\" @(#)char.3f 1.2 .so /usr/man/u_man/man3/ftype.3f H standard input or output respectively. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fIlinenumber\fB c\fI count\fR .br .ns .TP 5 \fIlinenumber\fB C\fI count\fR Continue after a breakpoint or interrupt. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. \fBC\fP continues with the signal that caused the program to stop reactivated and \fBc\fP ignores it. If a linenumber is specified then a temporary breakpoint is placed at the line and execution is continued. The breakpoint is deleted when the command finishes. .TP 5 \fIlinenumber\fB g\fI count\fR Continue after a breakpoint with execution resumed at the given line. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fBs \fIcount\fR .br .ns .TP 5 \fBS \fIcount\fR Single step the program through \fIcount\fP lines. If no count is given then the program is run for one line. .B S is equivalent to .B s except it steps through procedure calls. .TP 5 \fBi\fR .br .ns ..TH SCC 1 .SH NAME scc \- C compiler for stand-alone programs .SH SYNOPSIS .B scc [ .B +\c [ lib ] ] [ option ] ... [ file ] ... .SH DESCRIPTION .I Scc\^ prepares the named files for stand-alone execution. The .I option\^ and .I file\^ arguments may be anything that can legally be used with the .I cc\^ command; it should be noted, though, that the .B \-p (profiling) option, as well as any object module that contains system calls, causes the executable not to run. .PP .I Scc\^ defines the compiler constant, .BR \s-1STANDALONE\s+1 , so that sections of C programs may be compiled conditionally when the executable is run stand-alone. .PP The first argument specifies an auxiliary library that defines the device configuration of the computer for which the stand-alone executable is being prepared. .I Lib\^ may be one of the following: .TP 8 .B A .SM RP\*S04/05/06 disk and .SM TU\*S16 magnetic tape, or equivalent on the \s-1PDP\s+1-11 plus \s-1RM\s+105 and \s-1RM\s+180 disks, and \s-1TU\s+178 and \s-1TS\s+111 tapes, .\" @(#)clearerr.3s 1.2 .so /usr/man/u_man/man3/ferror.3s TP 5 \fBI\fR Single step by one machine-language instruction. \fBI\fP steps with the signal that caused the program to stop reactivated and \fBi\fP ignores it. .TP 5 \fIvariable$\fBm \fIcount\fR .br .ns .TP 5 \fIaddress:\fBm \fIcount\fR Single step (as with \fBs\fP) until the specified location is modified with a new value. If \fIcount\fP is omitted, it is effectively infinity. \fIVariable\fR must be accessible from the current procedure. Since this command is done by software, it can be very slow. .TP 5 \fIlevel\fB v \fR Toggle verbose mode, for use when single stepping with \fBS\fP, \fBs\fP or \fBm\fP. If \fIlevel\fP is omitted, then just the current source file and/or subroutine name is printed when either changes. If \fIlevel\fP is 1 or greater, each C source line is printed before it is executed; if \fIlevel\fP is 2 or greater, each assembler statement is also printed. A \fBv\fP turns verbose mode off if it is on for any level. .TP 5 .B k Kill the program being debugged. .TP 5 procedure\fB(\fParg1,arg2,.H or equivalent .TP .B B \s-1RK\s+111/\s-1RK\s+105 disk, \s-1RP\s+111/\s-1RP\s+103 disk, and \s-1TM\s+111/\s-1TU\s+116 magnetic tape, or equivalent .PP If no .BI + lib\^ argument is specified, .B +A is assumed. If the .B + argument is specified alone, no configuration library is loaded unless the user supplies his own. .SH FILES .nr t1 \w'/usr/lib/lib2A.a ' .nr t2 \n(t1+\w'+A configuration library ' .ta \n(t1u \n(t2u /lib/crt2.o execution start-off .br /usr/lib/lib2.a stand-alone library .br /usr/lib/lib2A.a +A configuration library (\s-1PDP\s+1-11 only) .br /usr/lib/lib2B.a +B configuration library (\s-1PDP\s+1-11 only) .SH SEE ALSO cc(1), ld(1), a.out(4). .\" @(#)scc.1 1.4 .TH CLOCK 3C .SH NAME clock \- report CPU time used .SH SYNOPSIS .B long clock ( ) .SH DESCRIPTION .I Clock\^ returns the amount of CPU time (in microseconds) used since the first call to .IR clock . The time reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed .IR wait (2) or .IR system (3S). .PP The resolution of the clock is 16.667 milliseconds on M68000 or DEC processors. .SH SEE ALSO times(2), wait(2), system(3S). .SH BUGS The value returned by .I clock\^ is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution. Because of this, the value returned wraps around after accumulating only 2,147 seconds of CPU time (about 36 minutes). .\" @(#)clock.3c 1.4 ..\fB)\fP .br .ns .TP 5 procedure\fB(\fParg1,arg2,...\fB)/\fP\fIm\fP Execute the named procedure with the given arguments. Arguments can be integer, character or string constants or names of variables accessible from the current procedure. The second form causes the value returned by the procedure to be printed according to format \fIm\fP. If no format is given, it defaults to .BR d . .TP 5 \fIlinenumber\fB b\fR \fIcommands\fR Set a breakpoint at the given line. If a procedure name without a line number is given (e.g., \fBproc:\fR), a breakpoint is placed at the first line in the procedure even if it was not compiled with the .B \-g option. If no \fIlinenumber\fP is given, a breakpoint is placed at the current line. If no .I commands\^ are given, execution stops just before the breakpoint and control is returned to .IR sdb . Otherwise the .I commands\^ are executed when the breakpoint is encountered and execution continues. Multiple commands are specified by separating them with semicolons. If \fBk\fP is use.TH SCCSDIFF 1 .SH NAME sccsdiff \- compare two versions of an \s-1SCCS\s+1 file .SH SYNOPSIS .B sccsdiff .BR \-r \s-1SID\s+1\&1 .BR \-r \s-1SID\s+1\&2 .RB [ \-p ] .RB [ \-s n] files .SH DESCRIPTION .I Sccsdiff\^ compares two versions of an .SM SCCS file and generates the differences between the two versions. Any number of .SM SCCS files may be specified, but arguments apply to all files. .RS 5 .TP 12 .BI \-r \s-1SID\s+1?\^ .IR \s-1SID\s+11 \ and \ \s-1SID\s+12 \ specify the deltas of an .SM SCCS file that are to be compared. Versions are passed to .IR bdiff (1) in the order given. .TP 12 .B \-p pipe output for each file through .IR pr (1). .TP 12 .BI \-s n\^ \fIn\fP is the file segment size that .I bdiff\^ will pass to .IR diff (1). This is useful when .I diff\^ fails due to a high system load. .SH FILES .TP "\w'/tmp/get?????\ \ 'u" /tmp/get????? Temporary files .SH "SEE ALSO" bdiff(1), get(1), help(1), pr(1). .br ``Source Code Control System'' in the .IR "\*(6) User's Guide" . .SH DIAGNOSTICS .I file: .B "NI .\" @(#)clog.3f 1.2 .so /usr/man/u_man/man3/log.3f d as a command to execute at a breakpoint, control returns to .IR sdb , instead of continuing execution. .TP 5 .B B Print a list of the currently active breakpoints. .TP 5 \fIlinenumber\fB d\fR Delete a breakpoint at the given line. If no \fIlinenumber\fP is given, the breakpoints are deleted interactively. Each breakpoint location is printed and a line is read from the standard input. If the line begins with a .B y or .B d , the breakpoint is deleted. .TP 5 .B D Delete all breakpoints. .TP 5 .B l Print the last executed line. .TP 5 \fIlinenumber\fB a\fR Announce. If \fIlinenumber\fR is of the form .IB proc : number\fR, the command effectively does a .IB "linenumber " "b l\fR. If \fIlinenumber\fR is of the form .IB proc :\fR, the command effectively does a .IB proc ": b T"\fR. .PP Miscellaneous commands: .TP 5 .BI ! command\^ The command is interpreted by .IR sh (1). .TP 5 .B new-line If the previous command printed a source line, advance the current line by one line and print the new current line. If the preo differences" means the two versions are the same. .sp Use .IR help (1) for explanations. .PD .\" @(#)sccsdiff.1 1.6 .\" @(#)cmplx.3f 1.2 .so /usr/man/u_man/man3/ftype.3f I vious command displayed a memory location, display the next memory location. .TP 5 .B control-D Scroll. Print the next 10 lines of instructions, source, or data, depending on which was printed last. .TP 5 .BI "< " filename Read commands from .I filename until the end of file is reached, then continue to accept commands from standard input. When .I sdb is told to display a variable by a command in such a file, the variable name is displayed along with the value. This command may not be nested; .B < may not appear as a command in a file. .TP 5 .B M Print the address maps. .TP 5 .BR M\ [ ?/ ][ \(** "] \fIb \|e \|f\fP" Record new values for the address map. The arguments \fB?\fP and \fB/\fP specify the text and data maps, respectively. The first segment, .RI ( "b1, e1, f1" ), is changed unless \fB\(**\fP is specified, in which case the second segment, .RI ( "b1, e1, f1" ), of the mapping is changed. If fewer than three values are given, the remaining map parameters are left unchanged. .TP 5 \fB"\fI string\fR Prin.TH SDB 1 .SH NAME sdb \- symbolic debugger .SH SYNOPSIS .B sdb [\fB\-w\fR] [\fB\-W\fR] [ objfil [ corfil [ directory ] ] ] .SH DESCRIPTION .I Sdb\^ is a symbolic debugger which can be used with C and F77 programs. It may be used to examine their object files and core files and to provide a controlled environment for their execution. .PP .I Objfil\^ is normally an executable program file which has been compiled with the .B \-g (debug) option; if it has not been compiled with the .B \-g option, or if it is not an executable file, the symbolic capabilities of .I sdb\^ are limited, but the file can still be examined and the program debugged. The default for .I objfil\^ is .BR a.out . .I Corfil\^ is assumed to be a core image file produced after executing .IR objfil ; the default for .I corfil\^ is .BR core . The core file need not be present. A .B \- in place of .I corfil\^ forces .I sdb\^ to ignore any core image file. Source files used in constructing .I objfil\^ must be in .I directory to be located. .PP It i.TH CONJG 3F .SH NAME conjg, dconjg \- FORTRAN complex conjugate intrinsic function .SH SYNOPSIS .nf .BR "complex" " cx1, cx2" .BR "double complex" " dx1, dx2" .P .RB "cx2" " = conjg(" "cx1" ")" .P .RB "dx2" " = dconjg(" "dx1" ")" .SH DESCRIPTION .I Conjg\^ returns the complex conjugate of its complex argument. .I Dconjg\^ returns the double-complex conjugate of its double-complex argument. .\" @(#)conjg.3f 1.4 t the given string. The C escape sequences of the form .I "\\\\character" are recognized, where .I character is a nonnumeric character. .TP 5 .B q Exit the debugger. .PP The following commands also exist and are intended only for debugging the debugger: .PP .PD 0 .TP 5 .B V Print the version number. .TP 5 .B Q Print a list of procedures and files being debugged. .TP 5 .B Y Toggle debug output. .PD .SH FILES a.out .br core .SH SEE ALSO cc(1), f77(1), sh(1), a.out(4), core(4). .br .IR "\*(6) Programming Guide" . .SH WARNINGS On the .SM VAX\*S-11/780, C variables are identified internally with an underscore prepended. User variables which differ by only an initial underscore cannot be distinguished, as .I sdb recognizes both internal and external names. .PP Data stored in text sections are indistinguishable from functions. .PP Line number information in optimized functions is unreliable, and some information may be missing. .SH BUGS If a procedure is called when the program is .I not\^ stopped at a breakpoint (sJ s useful to know that at any time there is a .I "current line\^" and .IR "current file" . If .I corfil\^ exists then they are initially set to the line and file containing the source statement at which the process terminated. Otherwise, they are set to the first line in .BR main (). The current line and file may be changed with the source file examination commands. .PP By default, warnings are provided if the source files used in producing .I objfil cannot be found or are newer than .IR objfil . This checking feature and the accompanying warnings may be disabled by the use of the .B \-W flag. .PP Names of variables are written just as they are in C or F77. Variables local to a procedure may be accessed using the form .IB procedure : variable\fR. If no procedure name is given, the procedure containing the current line is used by default. .P It is also possible to refer to structure members as .IB variable . member\fR, pointers to structure members as .IB variable \(mi> member , and array elements as .IB variab.TH CONV 3C .SH NAME toupper, tolower, _toupper, _tolower, toascii \- translate characters .SH SYNOPSIS .nf .B #include .PP .BR "int toupper (" c ) .BR int " c" ; .PP .BR "int tolower (" c ) .BR int " c" ; .PP .BR "int _toupper (" c ) .BR int " c" ; .PP .BR "int _tolower (" c ) .BR int " c" ; .PP .BR "int toascii (" c ) .BR int " c" ; .SH DESCRIPTION .I Toupper\^ and .I tolower\^ have as domain the range of .IR getc (3S): the integers from \-1 through 255. If the argument of .I toupper\^ represents a lowercase letter, the result is the corresponding uppercase letter. If the argument of .I tolower\^ represents an uppercase letter, the result is the corresponding lowercase letter. All other arguments in the domain are returned unchanged. .PP .I _toupper\^ and .I _tolower\^ are macros that accomplish the same thing as .I toupper\^ and .I tolower\^ but have restricted domains and are faster. .I _toupper\^ requires a lowercase letter as its argument; its result is the corresponding uppercase letter. .I _uch as when a core image is being debugged), all variables are initialized before the procedure is started. This makes it impossible to use a procedure which formats data from a core image. .PP The default type for printing F77 parameters is incorrect. Their address is printed instead of their value. .PP Tracebacks containing F77 subprograms with multiple entry points may print too many arguments in the wrong order, but their values are correct. .PP The range of an F77 array subscript is assumed to be .I 1 to .IR n , where .I n is the dimension corresponding to that subscript. This is only significant when the user omits a subscript, or uses .B \(** to indicate the full range. There is no problem in general with arrays having subscripts whose lower bounds are not 1. .\" @(#)sdb.1 1.6 le [ number ]\fR. Pointers may be dereferenced by using the form \fIpointer\fB[\fR0\fB]\fR. Combinations of these forms may also be used. F77 common variables may be referenced by using the name of the common block instead of the structure name. Blank common variables may be named by the form .BI . variable\fR. A number may be used in place of a structure variable name, in which case the number is viewed as the address of the structure, and the template used for the structure is that of the last structure referenced by .I sdb\fR. An unqualified structure variable may also be used with various commands. Generally, .I sdb interprets a structure as a set of variables; thus, it displays the values of all the elements of a structure when it is requested to display a structure. An exception to this interpretation occurs when displaying variable addresses. An entire structure does have an address, and it is this value .I sdb displays, not the addresses of individual elements. .P Elements of a multidimensional arrayJ tolower\^ requires an uppercase letter as its argument; its result is the corresponding lowercase letter. Arguments outside the domain cause undefined results. .PP .I Toascii\^ yields its argument with all bits turned off that are not part of a standard .SM ASCII character; it is intended for compatibility with other systems. .SH SEE ALSO ctype(3C), getc(3S). .\" @(#)conv.3c 1.4 .TH SDIFF 1 .SH NAME sdiff \- side-by-side difference program .SH SYNOPSIS .B sdiff [ options ... ] file1 file2 .SH DESCRIPTION .I Sdiff\^ uses the output of .IR diff (1) to produce a side-by-side listing of two files indicating those lines that are different. Each line of the two files is printed with a blank gutter between them if the lines are identical, a .B < in the gutter if the line only exists in .IR file1 , a .B > in the gutter if the line only exists in .IR file2 , and a .B | for lines that are different. .PP For example: .PP .RS 11 .nf x | y a a b < c < d d > c .fi .RE .PP The following options exist: .TP 11 .BI \-w " n\^" Use the next argument, .IR n , as the width of the output line. The default line length is 130 characters. .TP .BR \-l Only print the left side of any lines that are identical. .TP .BR \-s Do not print identical lines. .TP .BI \-o " output\^" Use the next argument, .IR output , as the name of a third file that is created as a user controlled merging of .I file1\^ and  may be referenced as .IB variable [ number ][ number ]...\fR, or as .IB variable [ number,number,... ]\fR. In place of .I number\fR, the form .IB number ; number may be used to indicate a range of values, .B \(** may be used to indicate all legitimate values for that subscript, or subscripts may be omitted entirely if they are the last subscripts and the full range of values is desired. As with structures, .I sdb displays all the values of an array or of the section of an array if trailing subscripts are omitted. It displays only the address of the array itself or of the section specified by the user if subscripts are omitted. A multidimensional parameter in an F77 program cannot be displayed as an array, but it is actually a pointer, whose value is the location of the array. The array itself can be accessed symbolically from the calling function. .P A particular instance of a variable on the stack may be referenced by using the form .IB procedure : variable , number\fR. All the variations mentioned in namin.TH COS 3F .SH NAME cos, dcos, ccos \- FORTRAN cosine intrinsic function .SH SYNOPSIS .nf .BR "real" " r1, r2" .BR "double precision" " dp1, dp2" .B" "complex" " cx1, cx2" .P .RB "r2" " = cos(" "r1" ")" .P .RB "dp2" " = dcos(" "dp1" ")" .RB "dp2" " = cos(" "dp1" ")" .P .RB "cx2" " = ccos(" "cx1" ")" .RB "cx2" " = cos(" "cx1" ")" .SH DESCRIPTION .I Cos\^ returns the real cosine of its real argument. .I Dcos\^ returns the double-precision cosine of its double-precision argument. .I Ccos\^ returns the complex cosine of its complex argument. The generic form .I cos\^ may be used with impunity because its returned type is determined by that of its argument. .SH SEE ALSO trig(3M). .\" @(#)cos.3f 1.5 K .IR file2 . Identical lines of .I file1\^ and .I file2\^ are copied to .IR output . Sets of differences produced by .IR diff (1) are printed, where a set of differences share a common gutter character. After printing each set of differences, .I sdiff\^ prompts the user with a .B % and waits for one of the following user-typed commands: .PP .RS 19 .TP .B l append the left column to the output file .TP .B r append the right column to the output file .TP .B s turn on silent mode; do not print identical lines .TP .B v turn off silent mode .TP .B "e l" call the editor with the left column .TP .B "e r" call the editor with the right column .TP .B "e b" call the editor with the concatenation of left and right .TP .B e call the editor with a zero length file .TP .B q exit from the program .RE .sp .2i .RS 11 On exit from the editor, the resulting file is concatenated on the end of the .I output\^ file. .RE .SH SEE ALSO diff(1), ed(1). .\" @(#)sdiff.1 1.3 g variables may be used. .IB Number\^ is the occurrence of the specified procedure on the stack, counting the top, or most current, as the first. If no procedure is specified, the procedure currently executing is used by default. .PP It is also possible to specify a variable by its address. All forms of integer constants which are valid in C may be used, so that addresses may be input in decimal, octal, or hexadecimal. .PP Line numbers in the source program are referred to as .IB file-name : number or .IB procedure : number\fR. In either case the number is relative to the beginning of the file. If no procedure or filename is given, the current file is used by default. If no number is given, the first line of the named procedure or file is used. .PP While a process is running under .IR sdb all addresses refer to the executing program; otherwise they refer to .I objfil\^ or .I corfil\^. An initial argument of .B \-w permits overwriting locations in .I objfil\^. .SS Addresses. The address in a file associated wvious command displayed a memory location, display the next memory location. .TP 5 .B control-D Scroll. Print the next 10 lines of instructions, source, or data, depending on which was printed last. .TP 5 .BI "< " filename Read commands from .I filename until the end of file is reached, then continue to accept commands from standard input. When .I sdb is told to display a variable by a command in such a file, the variable name is displayed along with the value. This command may not be nested; .B < may not appear as a command in a file. .TP 5 .B M Print the address maps. .TP 5 .BR M\ [ ?/ ][ \(** "] \fIb \|e \|f\fP" Record new values for the address map. The arguments \fB?\fP and \fB/\fP specify the text and data maps, respectively. The first segment, .RI ( "b1, e1, f1" ), is changed unless \fB\(**\fP is specified, in which case the second segment, .RI ( "b1, e1, f1" ), of the mapping is changed. If fewer than three values are given, the remaining map parameters are left unchanged. .TP 5 \fB"\fI string\fR Princommand. The command name is passed as argument 0 (see .IR exec (2)). The .I value\^ of a simple-command is its exit status if it terminates normally, or (octal) 200+\f2status\^\fP if it terminates abnormally (see .IR signal (2) for a list of status values). .PP A .I pipeline\^ is a sequence of one or more .I commands\^ separated by .B \(bv (or, for historical compatibility, by ^). The standard output of each command except the last one is connected by a .IR pipe (2) to the standard input of the next command. Each command is run as a separate process; the shell waits for the last command to terminate. .PP A .I list\^ is a sequence of one or more pipelines separated by .BR ; , .BR & , .BR && , or .BR \(bv\|\(bv , and optionally terminated by .B ; or .BR & . Of these four symbols, .B ; and .B & have equal precedence, which is lower than that of .B && and .BR \(bv\|\(bv . The symbols .B && and .B \(bv\|\(bv also have equal precedence. A semicolon .RB ( ; ) causes sequential execution of the preceding pipeline; aK ith a written address is determined by a mapping associated with that file. Each mapping is represented by two triples .RI ( "b1, e1, f1" ) and .RI ( "b2, e2, f2" ). The .I file address\^ corresponding to a written .I address\^ is calculated as follows: .PP .RS .IR b1 \*(LE address < e1 \*(IM .IR "file address" = address + f1\-b1 .RE otherwise .PP .RS .IR b2 \*(LE address < e2 \*(IM .IR "file address" = address + f2\-b2, .RE .PP otherwise, the requested .I address\^ is not legal. In some cases (e.g., for programs with separated I and D space) the two segments for a file may overlap. .PP The initial setting of both mappings is suitable for normal .B a.out and .B core files. If either file is not of the kind expected then, for that file, .I b1\^ is set to 0, .I e1\^ is set to the maximum file size, and .I f1\^ is set to 0; in this way the whole file can be examined with no address translation. .PP In order for .I sdb\^ to be used on large files, all appropriate values are kept as signed 32-bit integers. .SS Ct the given string. The C escape sequences of the form .I "\\\\character" are recognized, where .I character is a nonnumeric character. .TP 5 .B q Exit the debugger. .PP The following commands also exist and are intended only for debugging the debugger: .PP .PD 0 .TP 5 .B V Print the version number. .TP 5 .B Q Print a list of procedures and files being debugged. .TP 5 .B Y Toggle debug output. .PD .SH FILES a.out .br core .SH SEE ALSO cc(1), f77(1), sh(1), a.out(4), core(4). .br .IR "\*(6) Programming Guide" . .SH WARNINGS On the .SM VAX\*S-11/780, C variables are identified internally with an underscore prepended. User variables which differ by only an initial underscore cannot be distinguished, as .I sdb recognizes both internal and external names. .PP Data stored in text sections are indistinguishable from functions. .PP Line number information in optimized functions is unreliable, and some information may be missing. .SH BUGS If a procedure is called when the program is .I not\^ stopped at a breakpoint (sn ampersand .RB ( & ) causes asynchronous execution of the preceding pipeline (i.e., the shell does .I not\^ wait for that pipeline to finish). The symbol .B && .RB (\| \(bv\|\(bv \^) causes the .I list\^ following it to be executed only if the preceding pipeline returns a zero (non-zero) exit status. An arbitrary number of new-line characters may appear in a .IR list , instead of semicolons, to delimit commands. .PP A .I command\^ is either a simple-command or one of the following. Unless otherwise stated, the value returned by a command is that of the last simple-command executed in the command. .PP .PD 0 .TP \f3for\fP \f2name\^\fP \*(OK \f3in\fP \f2word\^\fP .\|.\|. \*(CK \f3do\fP \f2list\^\fP \f3done\fP Each time a .B for command is executed, .I name\^ is set to the next .I word\^ taken from the .B in .I word\^ list. If .BI in " word\^" \&.\|.\|. is omitted, then the .B for command executes the \f3do\fP \f2list\^\fP once for each positional parameter that is set (see .I "Parameter Substitution\^" below). ommands. .PP The commands for examining data in the program are: .TP 5 .B t Print a stack trace of the terminated or halted program. .TP 5 .B T Print the top line of the stack trace. .TP 5 .IB variable / clm Print the value of .I variable\^ according to length .I l\^ and format .IR m . A numeric count .I c indicates that a region of memory, beginning at the address implied by .IR variable , is to be displayed. The length specifiers are: .RS .RS .PD 0 .TP .BI b\^ one byte .TP .BI h\^ two bytes (half word) .TP .BI l\^ four bytes (long word) .RE .PD .br .ne 5 .PP Legal values for .I m\^ are: .RS .PD 0 .TP .BI c\^ character .TP .BI d\^ decimal .TP .BI u\^ decimal, unsigned .TP .BI o\^ octal .TP .BI x\^ hexadecimal .TP .BI f\^ 32-bit single precision floating point .TP .BI g\^ 64-bit double precision floating point .TP .BI s\^ Assume .I variable\^ is a string pointer and print characters starting at the address pointed to by the variable. .TP .BI a\^ Print characters starting at the variable's address. This formaL uch as when a core image is being debugged), all variables are initialized before the procedure is started. This makes it impossible to use a procedure which formats data from a core image. .PP The default type for printing F77 parameters is incorrect. Their address is printed instead of their value. .PP Tracebacks containing F77 subprograms with multiple entry points may print too many arguments in the wrong order, but their values are correct. .PP The range of an F77 array subscript is assumed to be .I 1 to .IR n , where .I n is the dimension corresponding to that subscript. This is only significant when the user omits a subscript, or uses .B \(** to indicate the full range. There is no problem in general with arrays having subscripts whose lower bounds are not 1. .\" @(#)sdb.1 1.6 Execution ends when there are no more words in the list. .TP \f3case\fP \f2word\^\fP \f3in\fP \*(OK \f2pattern\^\fP \*(OK \(bv \ \f2pattern\^\fP \*(CK .\|.\|. \f3)\fP \f2list\^\fP \f3;;\fP \*(CK .\|.\|. \f3esac\fP A .B case command executes the .I list\^ associated with the first .I pattern\^ that matches .IR word . The form of the patterns is the same as that used for filename generation (see .I "Filename Generation\^" below). .TP \f3if\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(OK \ \f3elif\fP \f2list\^\fP \f3then\fP \f2list\^\fP \*(CK .\|.\|. \ \*(OK \f3else\fP \f2list\^\fP \*(CK \f3f\&i\fP The .I list\^ following \f3if\fP is executed and, if it returns a zero exit status, the .I list\^ following the first .B then is executed. Otherwise, the .I list\^ following \f3elif\fP is executed and, if its value is zero, the .I list\^ following the next .B then is executed. Failing that, the .B else .I list\^ is executed. If no .B else .I list\^ or .B then .I list\^ is executed, then the .B if command returns a zerot may not be used with register variables. .TP .BI p\^ pointer to procedure .TP .BI i\^ Disassemble machine-language instruction with addresses printed numerically and symbolically. .TP .BI I\^ Disassemble machine-language instruction with addresses printed numerically only. .RE .PD The length specifiers are only effective with the formats \fBc\fP, \fBd\fP, \fBu\fP, \fBo\fP and \fBx\fP. Any of the specifiers, \fIc\fP, \fIl\fP, and \fIm\fP, may be omitted. If all are omitted, .I sdb chooses a length and a format suitable for the variable's type, as declared in the program. If .I m is specified, then this format is used for displaying the variable. A length specifier determines the output length of the value to be displayed, sometimes resulting in truncation. A count specifier .I c tells .I sdb to display that many units of memory, beginning at the address of .IR variable . The number of bytes in one such unit of memory is determined by the length specifier .IR l , or, if no length is given, by the size associa.TH SDIFF 1 .SH NAME sdiff \- side-by-side difference program .SH SYNOPSIS .B sdiff [ options ... ] file1 file2 .SH DESCRIPTION .I Sdiff\^ uses the output of .IR diff (1) to produce a side-by-side listing of two files indicating those lines that are different. Each line of the two files is printed with a blank gutter between them if the lines are identical, a .B < in the gutter if the line only exists in .IR file1 , a .B > in the gutter if the line only exists in .IR file2 , and a .B | for lines that are different. .PP For example: .PP .RS 11 .nf x | y a a b < c < d d > c .fi .RE .PP The following options exist: .TP 11 .BI \-w " n\^" Use the next argument, .IR n , as the width of the output line. The default line length is 130 characters. .TP .BR \-l Only print the left side of any lines that are identical. .TP .BR \-s Do not print identical lines. .TP .BI \-o " output\^" Use the next argument, .IR output , as the name of a third file that is created as a user controlled merging of .I file1\^ and L  exit status. .TP \f3while\fP \f2list\^\fP \f3do\fP \f2list\^\fP \f3done\fP A .B while command repeatedly executes the .B while .I list\^ and, if the exit status of the last command in the list is zero, executes the .B do .IR list ; otherwise the loop terminates. If no commands in the .B do .I list\^ are executed, then the .B while command returns a zero exit status; .B until may be used in place of .B while to negate the loop termination test. .TP \f3(\fP\f2list\^\fP\f3)\fP .br Execute .I list\^ in a sub-shell. .TP \f3{\fP\f2list\^\fP\f3;}\fP .br .I list\^ is simply executed. .PD .PP The following words are only recognized as the first word of a command and when not quoted: .if t .RS .PP .B .if n if then else elif fi case esac for while until do done { } .if t if then else elif f\&i case esac for while until do done { } .if t .RE .SS Comments. A word beginning with .B # causes that word and all the following characters up to a new line to be ignored. .SS Command Substitution. The standard outputted with the .IR variable. If a count specifier is used for the .B s or .B a command, then that many characters are printed. Otherwise successive characters are printed until either a null byte is reached or 128 characters are printed. The last variable may be redisplayed with the command .BR ./ . .PP The .IR sh (1) metacharacters .B \(** and .B ? may be used within procedure and variable names, providing a limited form of pattern matching. If no procedure name is given, variables local to the current procedure and global variables are matched; if a procedure name is specified, only variables local to that procedure are matched. To match only global variables, the form .BI : pattern\^ is used. .RE .TP 5 .PD 0 .IB linenumber ? lm .TP 5 \fIvariable:\fB?\fIlm\fR .PD Print the value at the address from .BR a.out or I space given by .I linenumber\^ or .IR variable (procedure name), according to the format .IR lm . The default format is `i'. .TP 5 .PD 0 .IB variable = lm .TP 5 .IB linenumber = lm .TP 5 .IB number .IR file2 . Identical lines of .I file1\^ and .I file2\^ are copied to .IR output . Sets of differences produced by .IR diff (1) are printed, where a set of differences share a common gutter character. After printing each set of differences, .I sdiff\^ prompts the user with a .B % and waits for one of the following user-typed commands: .PP .RS 19 .TP .B l append the left column to the output file .TP .B r append the right column to the output file .TP .B s turn on silent mode; do not print identical lines .TP .B v turn off silent mode .TP .B "e l" call the editor with the left column .TP .B "e r" call the editor with the right column .TP .B "e b" call the editor with the concatenation of left and right .TP .B e call the editor with a zero length file .TP .B q exit from the program .RE .sp .2i .RS 11 On exit from the editor, the resulting file is concatenated on the end of the .I output\^ file. .RE .SH SEE ALSO diff(1), ed(1). .\" @(#)sdiff.1 1.3  from a command enclosed in a pair of grave accents (\^\f3\*`\^\*`\fP\^) may be used as part or all of a word; trailing new lines are removed. .SS Parameter Substitution. The character .B $ is used to introduce substitutable .IR parameters . Positional parameters may be assigned values by .BR set . Variables may be set by writing: .RS .PP .IB name = value\^ \*(OK .IB name = value\^ \*(CK .\|.\|. .RE .PP Pattern-matching is not performed on .IR value . .PP .PD 0 .TP \f3${\fP\f2parameter\^\fP\f3}\fP A .I parameter\^ is a sequence of letters, digits, or underscores (a .IR name ), a digit, or any of the characters .BR \(** , .BR @ , .BR # , .BR ? , .BR \- , .BR $ , and .BR !\\^ . The value, if any, of the parameter is substituted. The braces are required only when .I parameter\^ is followed by a letter, digit, or underscore that is not to be interpreted as part of its name. A .I name\^ must begin with a letter or underscore. If .I parameter\^ is a digit then it is a positional parameter. If .I parameter\^ is .B \M = lm .PD Print the address of .I variable\^ or .IR linenumber , or the value of .IR number , in the format specified by .IR lm . If no format is given, then .B lx is used. The last variant of this command provides a convenient way to convert between decimal, octal and hexadecimal. .TP 5 .IB variable ! value Set .I variable\^ to the given .IR value . The value may be a number, a character constant or a variable. The value must be well defined; expressions that produce more than one value, such as structures, are not allowed. Character constants are denoted .BI ' character\fR. Numbers are viewed as integers unless a decimal point or exponent is used. In this case, they are treated as having the type double. Registers are viewed as integers. The .I variable may be an expression that indicates more than one variable, such as an array or structure name. If the address of a variable is given, it is regarded as the address of a variable of type .IR int . C conventions are used in any type conversions necessary to pe.TH SED 1 .SH NAME sed \- stream editor .SH SYNOPSIS .B sed [ .B \-n ] [ .B \-e script ] [ .B \-f sfile ] [ files ] .SH DESCRIPTION .I Sed\^ copies the named .I files\^ (standard input default) to the standard output, edited according to a script of commands. The .B \-f option causes the script to be taken from file .IR sfile ; these options accumulate. If there is just one .B \-e option and no .B \-f option, the flag .B \-e may be omitted. The .B \-n option suppresses the default output. A script consists of editing commands, one per line, of the following form: .sp .RS [ \|address \|[ \|, \|address \|] \|] \|function \|[ \|arguments \|] .RE .sp In normal operation, .I sed\^ cyclically copies a line of input into a .I pattern space\^ (unless there is something left after a .B D command), applies in sequence all commands whose .I addresses\^ select that pattern space, and at the end of the script copies the pattern space to the standard output (except under .BR \-n ) and deletes the pattern space. .PP Some of(** or .BR @ , then all the positional parameters, starting with .BR $1 , are substituted (separated by spaces). Parameter .B $0 is set from argument zero when the shell is invoked. .TP \f3${\fP\f2parameter\^\fP\f3:\-\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise substitute .IR word . .TP \f3${\fP\f2parameter\^\fP\f3:=\fP\f2word\^\fP\f3}\fP If .I parameter\^ is not set or is null, set it to .IR word ; the value of the parameter is then substituted. Positional parameters may not be assigned in this way. .TP \f3${\fP\f2parameter\^\fP\f3:?\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute its value; otherwise, print .I word\^ and exit from the shell. If .I word\^ is omitted, the message .B "parameter null or not set" is printed. .TP \f3${\fP\f2parameter\^\fP\f3:+\fP\f2word\^\fP\f3}\fP If .I parameter\^ is set and is non-null, substitute .IR word ; otherwise substitute nothing. .PD .PP In the above structures, .I word\^ is not evaluated ulorux{X[^M  the commands use a .I hold space\^ to save all or part of the .I pattern space\^ for subsequent retrieval. .PP An .I address\^ is either a decimal number that counts input lines cumulatively across files, a .B $ that addresses the last line of input, or a context address, i.e., a .BI / "regular expression" / in the style of .IR ed (1) modified thus: .PP .TP 5 \(bu In a context address, the construction \f3\e\fP\f2?regular expression?\^\fP, where .IR ? is any character, is identical to .BI / "regular expression" /\fR.\fP Note that in the context address .BR \exabc\exdefx , the second .B x stands for itself, so that the regular expression is .BR abcxdef . .TP 5 \(bu The escape sequence .B \en matches a new-line character .I embedded\^ in the pattern space. .TP 5 \(bu A period .B . matches any character except the .I terminal\^ new-line character of the pattern space. .TP 5 \(bu A command line with no addresses selects every pattern space. .TP 5 \(bu A command line with one address selects each pattern space thnless it is to be used as the substituted string; in the following example, .B pwd is executed only if .B d is not set or is null: .RS .PP \f3echo \|${d:\-\^\*`\^pwd\^\*`\^}\f1 .RE .PP If the colon .RB ( : ) is omitted from the above expressions, then the shell only checks whether .I parameter\^ is set or not. .PP The following parameters are automatically set by the shell: .RS .PD 0 .TP .B # The number of positional parameters in decimal. .TP .B \- Flags supplied to the shell on invocation or by the .B set command. .TP .B ? The decimal value returned by the last synchronously executed command. .TP .B $ The process number of this shell. .TP .B ! The process number of the last background command invoked. .PD .RE .PP The following parameters are used by the shell: .RS .PD 0 .TP .B .SM HOME The default argument (home directory) for the .I cd\^ command. .TP .B .SM PATH The search path for commands (see .I Execution\^ below). The user may not change .B \s-1PATH\s+1 if executing under .IR rsh . .TP .B .SM CDPATH Trform the indicated assignment. .TP 5 .B x Print the machine registers and the current machine-language instruction. .TP 5 .B X Print the current machine-language instruction. .PP The commands for examining source files are: .PP .PD 0 .TP 5 .BI "e " procedure\^ .TP 5 .BI "e " file-name\^ .TP 5 .BI "e " directory/\^ .TP 5 .BI "e " "directory file-name"\^ .PD The first two forms set the current file to the file containing .I procedure\^ or to .IR file-name . The current line is set to the first line in the named procedure or file. Source files are assumed to be in .IR directory . The default is the current working directory. The latter two forms change the value of .IR directory . If no procedure, filename, or directory is given, the current procedure name and filename are reported. .TP 5 .BI / "regular expression" / Search forward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B / may be elided. .TP 5 .BI ? "regular expression" ? Search baat matches the address. .TP 5 \(bu A command line with two addresses selects the inclusive range from the first pattern space that matches the first address through the next pattern space that matches the second. (If the second address is a number less than or equal to the line number first selected, only one line is selected.)\ Thereafter the process is repeated, looking again for the first address. .PP Editing commands can be applied only to non-selected pattern spaces by use of the negation function .B ! (below). .PP In the following list of functions the maximum number of permissible addresses for each function is indicated in parentheses. .PP The .I text\^ argument consists of one or more lines, all but the last of which end with .B \e to hide the new-line character. Backslashes in text are treated like backslashes in the replacement string of an .B s command, and may be used to protect initial blanks and tabs against the stripping that is done on every script line. The .I rfile\^ or .I wfile\^ argumentN he search path for the .I cd command. .TP .B .SM MAIL If this variable is set to the name of a mail file, then the shell informs the user of the arrival of mail in the specified file. .TP .SM .B PS1 Primary prompt string, by default .RB `` "$ \|" ''. .TP .SM .B PS2 Secondary prompt string, by default .RB `` "> \|" ''. .TP .SM .B IFS Internal field separators, normally .BR space , .BR tab , and .BR "new line" . .PD .RE .PP The shell gives default values to \f3\s-1PATH\s+1\fP, \f3\s-1PS1\s+1\fP, \f3\s-1PS2\s+1\fP, and \f3\s-1IFS\s+1\fP, while .SM .B HOME and .SM .B MAIL are not set at all by the shell (although .SM .B HOME is set by .IR login (1)). .SS Blank Interpretation. After parameter and command substitution, the results of substitution are scanned for internal field separator characters (those found in .BR \s-1IFS\s+1 ) and split into distinct arguments where such characters are found. Explicit null arguments (\^\f3"\^"\fP or \f3\*'\^\*'\fP\^) are retained. Implicit null arguments (those resulting from .ckward from the current line for a line containing a string matching .I regular expression\^ as in .IR ed (1). The trailing .B ? may be elided. .TP 5 .B p Print the current line. .TP 5 .B z Print the current line followed by the next 9 lines. Set the current line to the last line printed. .TP 5 .B w Window. Print the 10 lines around the current line. .TP 5 .I number\^ Set the current line to the given line number. Print the new current line. .TP 5 .IB count + Advance the current line by .I count\^ lines. Print the new current line. .TP 5 .IB count \(mi Retreat the current line by .I count\^ lines. Print the new current line. .PP The commands for controlling the execution of the source program are: .PP .TP 5 \fIcount\fB r \fIargs\fR .br .ns .TP 5 \fIcount\fB R Run the program with the given arguments. The \fBr\fP command with no arguments reuses the previous arguments to the program while the \fBR\fP command runs the program with no arguments. An argument beginning with .B < or .B > causes redirection for the  must terminate the command line and must be preceded by exactly one blank. Each .I wfile\^ is created before processing begins. There can be at most 10 distinct .I wfile\^ arguments. .PP .PD 0 .TP 10 (1)\|\f3a\e\fP .br .ns .TP .I text\^ Append. Place .I text\^ on the output before reading the next input line. .TP .RI (2)\|\f3b\fP " label\^" Branch to the .B : command bearing the .IR label . If .I label\^ is empty, branch to the end of the script. .br .ne 2.1v .TP (2)\|\f3c\e\fP .br .ns .TP .I text\^ Change. Delete the pattern space. With 0 or 1 address or at the end of a 2-address range, place .I text\^ on the output. Start the next cycle. .TP (2)\|\f3d\fP Delete the pattern space. Start the next cycle. .TP (2)\|\f3D\fP Delete the initial segment of the pattern space through the first new-line character. Start the next cycle. .TP (2)\|\f3g\fP Replace the contents of the pattern space by the contents of the hold space. .TP (2)\|\f3G\fP Append the contents of the hold space to the pattern space. .TP (2)\|\f3h\I parameters\^ that have no values) are removed. .SS Filename Generation. Following substitution, each command .I word\^ is scanned for the characters .BR \(** , .BR ? , and .BR \*(OK . If one of these characters appears then the word is regarded as a .IR pattern . The word is replaced with alphabetically sorted filenames that match the pattern. If no filename is found that matches the pattern, then the word is left unchanged. The character .B . at the start of a filename or immediately following a .BR / , as well as the character .B / itself, must be matched explicitly. .PP .PD 0 .RS .TP .B \(** Matches any string, including the null string. .TP .B ? Matches any single character. .TP .BR \*(OK .\|.\|.\^ \*(CK Matches any one of the enclosed characters. A pair of characters separated by .B \- matches any character lexically between the pair, inclusive. If the first character following the opening \`\`\*(OK\'\' is a .B "``!''" then any character not enclosed is matched. .PD .RE .SS Quoting. The following charN standard input or output respectively. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fIlinenumber\fB c\fI count\fR .br .ns .TP 5 \fIlinenumber\fB C\fI count\fR Continue after a breakpoint or interrupt. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. \fBC\fP continues with the signal that caused the program to stop reactivated and \fBc\fP ignores it. If a linenumber is specified then a temporary breakpoint is placed at the line and execution is continued. The breakpoint is deleted when the command finishes. .TP 5 \fIlinenumber\fB g\fI count\fR Continue after a breakpoint with execution resumed at the given line. If \fIcount\fP is given, it specifies the number of breakpoints to be ignored. .TP 5 \fBs \fIcount\fR .br .ns .TP 5 \fBS \fIcount\fR Single step the program through \fIcount\fP lines. If no count is given then the program is run for one line. .B S is equivalent to .B s except it steps through procedure calls. .TP 5 \fBi\fR .br .ns .fP Replace the contents of the hold space by the contents of the pattern space. .TP (2)\|\f3H\fP Append the contents of the pattern space to the hold space. .TP (1)\|\f3i\e\fP .br .ns .TP .I text\^ Insert. Place .I text\^ on the standard output. .TP (2)\|\f3l\fP List the pattern space on the standard output in an unambiguous form. Non-printing characters are spelled in two-digit .SM ASCII and long lines are folded. .TP (2)\|\f3n\fP Copy the pattern space to the standard output. Replace the pattern space with the next line of input. .TP (2)\|\f3N\fP Append the next line of input to the pattern space with an embedded new-line character. (The current line number changes.) .TP (2)\|\f3p\fP Print. Copy the pattern space to the standard output. .TP (2)\|\f3P\fP Copy the initial segment of the pattern space through the first new-line character to the standard output. .TP (1)\|\f3q\fP Quit. Branch to the end of the script. Do not start a new cycle. .TP .RI (2)\|\f3r\fP " rfile\^" Read the contents of .IR rfile . Placwz}TP 5 \fBI\fR Single step by one machine-language instruction. \fBI\fP steps with the signal that caused the program to stop reactivated and \fBi\fP ignores it. .TP 5 \fIvariable$\fBm \fIcount\fR .br .ns .TP 5 \fIaddress:\fBm \fIcount\fR Single step (as with \fBs\fP) until the specified location is modified with a new value. If \fIcount\fP is omitted, it is effectively infinity. \fIVariable\fR must be accessible from the current procedure. Since this command is done by software, it can be very slow. .TP 5 \fIlevel\fB v \fR Toggle verbose mode, for use when single stepping with \fBS\fP, \fBs\fP or \fBm\fP. If \fIlevel\fP is omitted, then just the current source file and/or subroutine name is printed when either changes. If \fIlevel\fP is 1 or greater, each C source line is printed before it is executed; if \fIlevel\fP is 2 or greater, each assembler statement is also printed. A \fBv\fP turns verbose mode off if it is on for any level. .TP 5 .B k Kill the program being debugged. .TP 5 procedure\fB(\fParg1,arg2,.O e them on the output before reading the next input line. .TP .RI (2)\|\f3s\fP/ "regular expression" / replacement / flags\^ Substitute the .I replacement\^ string for instances of the .I regular expression\^ in the pattern space. Any character may be used instead of .BR / . For a fuller description see .IR ed (1). .I Flags\^ is zero or more of: .RS .RS .TP .B g Global. Substitute for all nonoverlapping instances of the .I regular expression\^ rather than just the first one. .TP .B p Print the pattern space if a replacement was made. .TP .BI w " wfile\^" Write. Append the pattern space to .I wfile\^ if a replacement was made. .RE .RE .TP .RI (2)\|\f3t\fP " label\^" Test. Branch to the .B : command bearing the .I label\^ if any substitutions have been made since the most recent reading of an input line or execution of a .BR t . If .I label\^ is empty, branch to the end of the script. .TP .RI (2)\|\f3w\fP " wfile\^" Write. Append the pattern space to .IR wfile . .TP (2)\|\f3x\fP Exchange the contents of the pattacters have a special meaning to the shell and cause termination of a word unless quoted: .RS .PP \f3; & ( ) \(bv ^ < > new\^line space tab\fP .RE .PP A character may be .I quoted\^ (i.e., made to stand for itself) by preceding it with a .BR \e . The pair .B \enew line is ignored. All characters enclosed between a pair of single quote marks (\^\f3\*'\^\*'\fP\^), except a single quote, are quoted. Inside double quote marks (\f3"\^"\fP), parameter and command substitution occur and .B \e quotes the characters .BR \e , .BR \*` , \f3"\fP, and .BR $ . .B "$\(**" is equivalent to \f3"$1 \|$2\fP \|.\|.\|.\f3"\fP, whereas .B "$@" is equivalent to .B "$1"\| .B "$2"\| \&.\|.\|.\|. .SS Prompting. When used interactively, the shell prompts with the value of .SM .B PS1 before reading a command. If at any time a new-line character is typed and further input is needed to complete a command, then the secondary prompt (i.e., the value of .BR \s-1PS2\s+1 ) is issued. .SS Input/Output. Before a command is executed, it..\fB)\fP .br .ns .TP 5 procedure\fB(\fParg1,arg2,...\fB)/\fP\fIm\fP Execute the named procedure with the given arguments. Arguments can be integer, character or string constants or names of variables accessible from the current procedure. The second form causes the value returned by the procedure to be printed according to format \fIm\fP. If no format is given, it defaults to .BR d . .TP 5 \fIlinenumber\fB b\fR \fIcommands\fR Set a breakpoint at the given line. If a procedure name without a line number is given (e.g., \fBproc:\fR), a breakpoint is placed at the first line in the procedure even if it was not compiled with the .B \-g option. If no \fIlinenumber\fP is given, a breakpoint is placed at the current line. If no .I commands\^ are given, execution stops just before the breakpoint and control is returned to .IR sdb . Otherwise the .I commands\^ are executed when the breakpoint is encountered and execution continues. Multiple commands are specified by separating them with semicolons. If \fBk\fP is useern and hold spaces. .TP .RI (2)\|\f3y\fP/ string1 / string2 /\^ Transform. Replace all occurrences of characters in .I string1\^ with the corresponding character in .IR string2 . The lengths of .I string1 and .I string2\^ must be equal. .TP .RI (2)\f3!\fP " function\^" Don't. Apply the .I function\^ (or group, if .I function\^ is .BR {\| ) only to lines .I not\^ selected by the address(es). .TP .RI (0)\|\f3:\fP " label\^" This command does nothing; it bears a .I label\^ for .B b and .B t commands to branch to. .TP (1)\|\f3=\fP Place the current line number on the standard output as a line. .TP (2)\|\f3{\fP Execute the following commands through a matching .B } only when the pattern space is selected. .TP (0)\| An empty command is ignored. .PD .SH SEE ALSO awk(1), ed(1), grep(1). .br ``Stream Editor'' in the .IR "\*(6) Document Processing Guide" . .\" @(#)sed.1 1.7 O s input and output may be redirected using a special notation interpreted by the shell. The following may appear anywhere in a simple-command or may precede or follow a command and are not passed on to the invoked command; substitution occurs before .I word\^ or .I digit\^ is used: .PP .PD 0 .TP 14 .B word Use file .I word\^ as standard output (file descriptor 1). If the file does not exist, it is created; otherwise, it is truncated to zero length. .TP .B >\h@-.3m@>word Use file .I word\^ as standard output. If the file exists, output is appended to it (by first seeking to the end-of-file); otherwise, the file is created. .TP \f3<\h@-.3m@<\fP\*(OK\f3\-\fP\*(CK\f3word\fP The shell input is read up to a line that is the same as .IR word , or to an end-of-file. The resulting document becomes the standard input. If any character of .I word\^ is quoted, then no interpretation is placed upon the characters of the document; otherwise, parameter d as a command to execute at a breakpoint, control returns to .IR sdb , instead of continuing execution. .TP 5 .B B Print a list of the currently active breakpoints. .TP 5 \fIlinenumber\fB d\fR Delete a breakpoint at the given line. If no \fIlinenumber\fP is given, the breakpoints are deleted interactively. Each breakpoint location is printed and a line is read from the standard input. If the line begins with a .B y or .B d , the breakpoint is deleted. .TP 5 .B D Delete all breakpoints. .TP 5 .B l Print the last executed line. .TP 5 \fIlinenumber\fB a\fR Announce. If \fIlinenumber\fR is of the form .IB proc : number\fR, the command effectively does a .IB "linenumber " "b l\fR. If \fIlinenumber\fR is of the form .IB proc :\fR, the command effectively does a .IB proc ": b T"\fR. .PP Miscellaneous commands: .TP 5 .BI ! command\^ The command is interpreted by .IR sh (1). .TP 5 .B new-line If the previous command printed a source line, advance the current line by one line and print the new current line. If the pre.if t .ds ' \h@.05m@\s+4\v@.333m@\'\v@-.333m@\s-4\h@.05m@ .if n .ds ' ' .if t .ds ` \h@.05m@\s+4\v@.333m@\`\v@-.333m@\s-4\h@.05m@ .if n .ds ` ` .ds OK [\| .ds CK \|] .TH SH 1 .SH NAME sh, rsh \- shell, the standard/restricted command programming language .SH SYNOPSIS .B sh [ .B \-ceiknrstuvx ] [ args ] .br .B rsh [ .B \-ceiknrstuvx ] [ args ] .SH DESCRIPTION .I Sh\^ is a command programming language that executes commands read from a terminal or a file. .I Rsh\^ is a restricted version of the standard command interpreter .IR sh ; it is used to set up login names and execution environments whose capabilities are more controlled than those of the standard shell. See .I Invocation\^ below for the meaning of arguments to the shell. .SS Commands. A .I simple-command\^ is a sequence of non-blank .I words\^ separated by .I blanks\^ (a .I blank\^ is a tab or a space). The first word specifies the name of the command to be executed. Except as specified below, the remaining words are passed as arguments to the invoked substitution and command substitution occur, (unescaped) .B \enew line is ignored, and .B \e must be used to quote the characters .BR \e , .BR $ , .BR \*` , and the first character of .IR word . If .B \- is appended to .BR <\h@-.3m@< , all leading tabs are stripped from .I word\^ and from the document. .TP .B <&digit The standard input is duplicated from file descriptor .I digit\^ (see .IR dup (2)). The standard output can be duplicated similarly, using .B > in place of .BR < . .TP .B <&\- The standard input is closed. The standard output can be closed similarly, using .B > in place of .BR < . .PD .PP If one of the above is preceded by a digit, the file descriptor created is that specified by the digit (instead of the default 0 or 1). For example: .RS .PP \f3\&.\|.\|. \|2>&1\f1 .RE .PP creates file descriptor 2 that is a duplicate of file descriptor 1. .PP If a command is followed by .BR & , the default standard input for the command is the empty file .BR /dev/null . Otherwise, the environment for the execu