XG 5 16 88_5.0_XENIX_2.3_Users_Reference_May88 88 5.0 XENIX 2.3 Users Reference May88

User Manual: XG-5-16-88_5.0_XENIX_2.3_Users_Reference_May88

Open the PDF directly: View PDF PDF.
Page Count: 864

DownloadXG-5-16-88_5.0_XENIX_2.3_Users_Reference_May88 XG-5-16-88 5.0 XENIX 2.3 Users Reference May88
Open PDF In BrowserView PDF
XENIX® System V
Operating System

User's Reference

Infonnation in this document is subject to change without notice and does not represent
a commitment on the part of The Santa Cruz Operation, Inc. nor Microsoft Corporation.
The software described in this document is furnished under a license agreement or
nondisclosure agreement. The software may be used or copied only in accordance with
the tenns of the agreement. It is against the law to copy this software on magnetic tape,
disk, or any other medium for any purpose other than the purchaser's personal use.

Portions © 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988 Microsoft
Corporation.
All rights reserved.
Portions © 1983,1984, 1985, 1986, 1987, 1988 The Santa Cruz Operation, Inc.
All rights reserved.

ALL USE, DUPLICATION, OR DISCLOSURE WHATSOEVER BY THE
GOVERNMENT SHALL BE EXPRESSLY SUBJECT TO RESTRICTIONS AS SET
FORTH IN SUBDIVISION (b) (3) (ii) FOR RESTRICTED RIGHTS IN COMPUTER
SOFTWARE AND SUBDIVISION (b) (2) FOR LIMITED RIGHTS IN TECHNICAL
DATA, BOTH AS SET FORTH IN FAR 52.227-7013.

Microsoft, MS-DOS, and XENIX are trademarks of Microsoft Corporation.

SCO Document Number: XG-S-16-88-S.0

Preface

The complete XENIX Reference is actually divided into
distributed as individual reference sections in the various
XENIX Operating, Text Processing, and Development
following table lists the name, content, and location of
section.

Section

nine parts and
volumes of the
Systems. The
each reference

Description

XENIX Volume

ADM

Administrative Commands - used
for system administration.

System Administrator's Guide

C

Commands - used with the XENIX
Operating System.

User's Reference

CP

Programming Commands - used
with the Development System.

Programmer's Reference

CT

Text Processing Commands - used
with the Text Processing System.

Text Processing Guide

DOS

Routines
used with
Development System

Programmer's Reference

F

File Formats - description of
various system files not defined in
section M.

User's Reference

HW

Hardware specific manual pages XENIX
information
about
procedures specific to your
computer.

System Administrator's Guide

M

Miscellaneous - information used
for access to devices, system
maintenance,
and
communications.

User's Reference

S

System
Calls
and Library
Routines - available for C and
assembly language programming.

Programmer's Reference

the

In the manual pages, a given command, routine, or file is referred to by
name and section. For example, the programming command "cc", which
is described in the Programming Commands (CP) section, is listed as

cc(CP).
The alphabetized table of contents given on the following pages is a
complete listing of all XENIX commands, system calls, library routines,
and file formats. The permuted index, found at the end of the XENIX
User's Reference, and the the end of the XENIX Programmer's Reference,
is useful in matching a desired task with the manual page that describes
it.

Alphabetized List
Commands, Systems Calls, Library Routines and File Formats
8087 ......................... 8087 (HW)
86rel ............................ 86rel(F)
a641 ............................... a641(S)
a.out ............................. a.out(F)
abort ........................... abort(S)
abs ................................... abs(S)
accept ....................... accept(C)
access ........................ access (S)
acct ................................ acct (F)
acct ................................ acct(S)
acctcom .......... acctcom (ADM)
accton ................ accton (ADM)
acos ................................ trig (S)
adb ............................... adb(CP)
adfmt ................... adftnt(ADM)
admin ...................... admin(CP)
alarm ......................... alarm(S)
aliases ..................... aliases (M)
aliases. hash ............ aliases (M)
aliashash ...... aliashash(ADM)
ar .................................... ar(CP)
ar ....................................... ar(F)
archive .................... archive (F)
ascii ............................. ascii (M)
asctime ....................... ctime (S)
asin ................................. trig (S)
asktime ............ asktime (ADM)
assert .......................... assert(S)
assign ........................ assign(C)
asx ................................ asx(CP)
at ....................................... at(C)
atan ................................ trig (S)
atan2 .............................. trig (S)
atof ................................. atof(S)
atof .............................. strtod(S)
atol ................................. atof(S)
atol ............................... strtol (S)
autoboot ........ autoboot(ADM)
awk ................................ awk(C)
backup .................... backup(C)
backup ..................... backup (F)

badtrk ................ badtrk(ADM)
banner ..................... banner(C)
basename ........... basename(C)
batch ................................. at(C)
bc ...................................... bc(C)
bdiff ............................. bdijJ(C)
bdos ........................ bdos (DOS)
bessel ......................... bessel (S)
bfs .................................... bfs(C)
boot .......................... boot(HW)
brk ................................. sbrk(S)
brkctl ......................... brkctl (S)
bsearch ................... bsearch(S)
cabs ............................. hypot(S)
cal ................................... cal(C)
calendar ............... calendar (C)
calIoc ........................ maUoc (S)
cancel ............................... lp (C)
capinfo .................... capinfo(C)
cat ................................... cat(C)
catimp ................... catimp (CT)
cb ................................... cb(CP)
cc .................................... cc(CP)
cd ...................................... cd(C)
cdc ............................... cdc (CP)
ceil ................................ jloor(S)
cftow ......................... cjlow(CP)
cgets ....................... cgets (DOS)
character ............ eqnchar(CT)
charmap ............ charmap(CT)
chdir ............................ chdir(S)
checkcw ....................... cw(CT)
checkeq ....................... eqn{CT)
checklist ............... checklist (F)
checkmm .......... checkmm(CT)
chgrp .......................... chgrp(C)
chmod ....................... chmod(C)
chmod ....................... chmod(S)
chown ....................... chown(C)
chown ........................ chown(S)
chroot ................ chroot(ADM)

chroot ........................ chroot(S)
chsh ....................... chsh (ADM)
chsize ......................... chsize (S)
clear ............................ clear(C)
clear err ..................... ferror(S)
clock ............................ clock (F)
clock ............................ clock (S)
close ............................. close (S)
clri ........................... clri (ADM)
cmchk ....................... cmchk(C)
cmos ........................ cmos (HW)
cmp ............................... cmp(C)
coffconv ............... coffconv (M)
col ........................... ...... col (CT)
comb ......................... comb (CP)
comm ......................... comm(C)
compress ............. compress (C)
config ................. config(ADM)
configure ...... configure(ADM)
console ................... console (M)
consoleprint. consoleprint (ADM)
contains ............... eqnchar(CT)
conv .............................. con v (S)
convkey ................. mapkey (M)
copy ............................. copy(C)
core ............................... core (F)
cos ................................... trig(S)
cosh ............................... sinh(S)
cp ...................................... cp(C)
cpio ............................... cpio(C)
cpio ............................... cpio (F)
cpp ............................... cpp(CP)
cprintf ................ cprintj(DOS)
cputs ...................... cputs(DOS)
creat ............................ createS)
creatsem ............... creatsem (S)
cref .............................. cref(CP)
cron .............................. cron(C)
cscanf .................. cscmif(DOS)
csh .................................. csh(C)
csplit ........................... csplit(C)
ct ....................................... ct(C)
ctags .......................... ctags(CP)
ctermid ................... ctermid(S)
ctime ........................... ctime (S)
ctype ............................ ctype (S)
ii

cu ...................................... cu(C)
curses ........................ curses (S)
cuserid ..................... cuserid(S)
custom .............. custom (ADM)
cut ................................ cut(CT)
cw .................................. cw(CT)
cwcheck ....................... cw(CT)
cxref .......................... cxref(CP)
daemon.mn ..... daemon.mn(M)
date ............................... date (C)
dbminit ......................... dbm(S)
dc ...................................... dc(C)
dd ..................................... dd(C)
deassign .................... assign (C)
deco ........................... deco (CT)
default ...................... default (F)
definitions ........... eqnchar(CT)
defopen ................... defopen (S)
defread ................... defopen (S)
delete ............................ dbm(S)
delta .......................... delta (CP)
deroff ...................... deroff(CT)
devnm ....................... devnm (C)
df ....................................... df(C)
dial ......................... dial(ADM)
dial ................................. dial (S)
diction ................... diction (CT)
diff .................................. dijJ(C)
dift3 .............................. diff3 (C)
diflink .................... dijJmk (CT)
dir .................................... dir(F)
dircmp ..................... dircmp(C)
dirname ................. dirname(C)
disable ..................... disable (C)
diskcmp .................... diskcp (C)
diskcp ....................... diskcp(C)
divvy .................... divvy (ADM)
dmesg ................. dmesg(ADM)
dos .................................. dos(C)
doscat ............................. dos(C)
doscp .............................. dos(C)
dosdir ............................. dos(C)
dosexterr ......... dosexter (DOS)
dosformat ...................... dos(C)
dosld ......................... dosld(CP)

dosls ............................... dos(C)
dosmkdir ....................... dos(C)
dosrm ............................. dos(C)
dosrmdir ....................... dos (C)
dparam ............ dparam(ADM)
drand48 ................. drand48(S)
dtype ........................... dtype(C)
du ..................................... du(C)
dump .......................... dump(C)
dump ........................... dump(F)
dumpdir ................ dumpdir(C)
dup ................................. dup(S)
dup2 ............................... dup(S)
dviimp ................... dviimp(CT)
echo .............................. echo (C)
ecvt ................................ ecvt(S)
ed ...................................... ed(C)
edata .............................. end(S)
egrep ............................ grep(C)
enable ....................... enable (C)
en co ........................... deco(CT)
end .................................. end(S)
endgrent ................ getgrent (S)
endpwent .............. getpwent (S)
env .................................. env(C)
environ .................. environ (M)
eof .............................. eof(DOS)
eqn ............................... eqn(CT)
eqn .................... eqnchar(CT)
eqnchar ............... eqnchar(CT)
eqncheck .................... eqn(CT)
erand48 .................. drand48(S)
erf .................................... eif(S)
erfc .................................. eif(S)
errno ......................... perror(S)
error .......................... error(M)
etext ................................ end(S)
ex ...................................... ex (C)
execl .............................. exec (S)
execle ............................ exec (S)
execlp ........................... exec(S)
execseg .................... execseg (S)
execv ............................. exec (S)
execve ........................... exec(S)
execvp .......................... exec (S)
exit ........................... exit (DOS)
<0.

exit ............................... exit(S)
exp .................................. exp(S)
explain .................. explain (CT)
expr .............................. expr(C)
fabs ............................... jloor(S)
factor ......................... factor(C)
faliases .................... aliases (M)
false .............................. false(C)
fclose .................... fclose (DOS)
fclose .......................... fclose (S)
fcloseall ................ fclose (DOS)
fcntl .............................. fcntl (S)
fcvt ................................. ecvt (S)
fd ................................... fd(HW)
fdisk ...................... fdisk(ADM)
fdopen ......................... fopen(S)
fdswap .............. fdswap (ADM)
feof ............................. ferror(S)
ferror ......................... ferror(S)
fetch .............................. dbm(S)
mush .......................... fclose(S)
fgetc ....................... fgetc (DOS)
fgetc .............................. getc (S)
fgetchar ................. fgetc (DOS)
fgets ............................... gets (S)
fgrep ............................. grep (C)
file .................................. file(C)
filelength .......... fileleng (DOS)
fileno .......................... ferror(S)
filesys ........................ filesys (F)
filesystem ........... filesystem (F)
find ................................ find(C)
finger ......................... finger(C)
firstkey ......................... dbm(S)
fixhdr ........................ fixhdr(C)
fixpad ...................... capinfo (C)
fixperm ............ fixperm(ADM)
floor ............................. jloor(S)
flushall .............. jlus hall (DOS)
fmod ............................. jloor(S)
fopen ........................... fopen(S)
for ........................ eqnchar(CT)
fork ................................ fork(S)
format ...................... format(C)
fp_off ................... fp_seg(DOS)
fprintf ......................... printj(S)

iii

fp_seg .................. fp_seg(DOS)
fputc ...................... fputc(DOS)
fputc .............................. putc(S)
fputchar ................ fputc (DOS)
fputs .............................. puts(S)
fread ............................ fread(S)
free ............................ malloc(S)
freopen ....................... fopen(S)
frexp ............................ frexp (S)
fsave ..................... fsave (ADM)
fscanf ........................... scanf(S)
fsck ......................... fsck(ADM)
fsdb ........................ fsdb(ADM)
fseek ............................. fseek (S)
fsname .............. fsname(ADM)
fsphoto ............. fsphoto(ADM)
fstab .. ,................ ,......... fstab (F)
fstat ................................ stat(S)
ftell ............................... fseek(S)
ftime ............................. time(S)
ftok ............................. stdipc(S)
ftw ................................... ftw(S)
fwrite .......................... .fread(S)
fxlist .............................. xlist(S)
gamma ..................... gamma(S)
gcvt ................................ ecvt(S)
get ................................. get(CP)
getc ................................ getc (S)
getch ..................... getch (DOS)
getchar .......................... getc(S)
getche .................. getche (DOS)
getcwd ...................... getcwd(S)
getegid ....................... getuid (S)
getenv ....................... getenv (S)
geteuid ....................... getuid (S)
getgid ......................... getuid(S)
getgrent ................. getgrent(S)
getgrgid ................. getgrent(S)
getgrnam ............... getgrent(S)
getlogin .................. getlogin (S)
getopt ........................ getopt(C)
getopt ......................... getopt(S)
getpass ..................... getpass(S)
getpgrp ...................... getpid(S)
getpid ........................ getpid(S)
getppid ...................... getpid(S)
iv

getpw .......................... getpw(S)
getpwent ............... getpwent(S)
getpwnam ............ getpwent(S)
getpwuid .............. getpwent (S)
gets .............................. gets (CP)
gets ................................ gets(S)
getty ............................ getty (M)
gettydefs ............... gettydefs (F)
getuid ........................ getuid (S)
getutent ....................... getut(S)
getutid ......................... getut(S)
getutline ...................... getut(S)
getw ............................... getc (S)
gmtime ....................... ctime (S)
grep .............................. grep(C)
group .......................... group(F)
grpcheck .............. grpcheck(C)
gsignal ...................... ssignal (S)
haltsys ............... haltsys (ADM)
hashcheck ................. spell (CT)
hashmake ................. spell (CT)
hcreate .................... hsearch (S)
hd ..................................... hd(C)
hd ................................. hd(ffW)
hdestroy ................. hsearch (S)
hdr ............................... hdr(CP)
head ............................. head(C)
hello ............................. hello (C)
help ............................... help (C)
help ............................ help (CP)
hsearch ................... hsearch(S)
hwconfig .............. hwconfig(C)
hyphen .................. hyphen(CT)
hypot ........................... hypot(S)
id ....................................... id(C)
idleout ............... idleout{ADM)
imacct ...................... imacct(C)
imagen ................... imagen (M)
imagen.pbs ............ imagen (M)
imagen. remote ...... imagen (M)
imagen.sbs ............. imagen (M)
imagen.spp ............ imagen (M)
imprint ................... imprint(C)
imprint ................. imprint(CT)
inir ................................ init(M)
init ................................. init (M)

inittab ....................... inittab (F)
inode ........................... inode (F)
inp ............................. inp(DOS)
install ................. install (ADM)
int86 ....................... int86(DOS)
int86x ................... int86x(DOS)
intdos ................... intdos(DOS)
intdosx ............... intdosx(DOS)
intro ...................... Intro(ADM)
intro ............................. I ntro (C)
intro .......................... Intro(CP)
intro .......................... Intro(CT)
intro ............... ;....... intro(DOS)
intro ............................. Intro(F)
intro ........................ I ntro (HW)
intro ............................ Intro(M)
intro ............................. Intro(S)
ioctl ............................... ioctl (S)
ipbs ........................... ips (ADM)
ipcrm .................. ipcrm(ADM)
ipcs ......................... ipcs (ADM)
ipr ................................... ipr(C)
iprint .......................... iprint(C)
ips ............................. ips(ADM)
isalnum ....................... ctype (S)
isalpha ........................ ctype (S)
isascii .......................... ctype (S)
isatty ..................... isatty(DOS)
isatty ....................... ttyname (S)
isbs ........................... ips (ADM)
iscntrl .......................... ctype (S)
isdigit .......................... ctype (S)
isgraph ........................ ctype (S)
islower ........................ ctype (S)
isprint ......................... ctype (S)
ispunct ........................ ctype (S)
isspace ......................... ctype (S)
isupper ........................ ctype (S)
isxdigit ........................ ctype (S)
itoa ........................... itoa (DOS)
itroff ......................... itroff(CT)
jO ................................ bessel (S)
jl ................................ bessel (S)
jn ................................ bessel (S)
join ................................ join(C)
jrand48 .................. drand48(S)

kbhit ...................... kbhit(DOS)
kbmode ........... kbmode(ADM)
keyboard ......... keyboard (HW)
kill .................................. kill (C)
kill ................................... kill (S)
kmem ........................... mem(F)
I ........................................... I(C)
13tol .............................. l3tol (S)
164a .....
a641(S)
labs ............ ~ ............. labs(DOS)
last ................................. last(C)
Ic ........................................ Ic(C)
Id ...................................... ld(M)
Id ..................................... ld(CP)
Idexp ............................ frexp (S)
lex ................................. lex (CP)
Ifind ......................... lsearch (S)
line ................................. line (C)
link ................................. link(S)
lint ................................ lint(CP)
In ....................................... In(C)
localtime .................... ctime (S)
lock ............................... lock(C)
lock ................................ lock(S)
lockf ............................. lockj(S)
locking ..................... locking (S)
log ................................... exp(S)
10glO ............................... exp(S)
login ........................... login (M)
logname ................ logname(C)
logname ................. logname(S)
longjmp .................... setjmp (S)
look ............................ look(CT)
lorder ...................... lorder(CP)
Ip ....................................... lp(C)
Ip ................................... lp(HW)
IpO ................................. lp(HW)
Ipl ................................. lp(HW)
Ip2 ................................. lp(HW)
Ipadmin .......... Ipadmin (ADM)
Ipinit .................... lpinit (ADM)
Ipmove ............. lpsched (ADM)
Ipr ..................................... lp(C)
Ipr ................................... lpr(C)
Iprint .......................... lprint(C)
Ipsched ............ lpsched (ADM)
'0 • • • • • • • • • • • • • • • • • • • • • • • • •

v

Ipshut ............... lpsched (ADM)
Ipstat .......................... lpstat(C)
Irand48 .................. drand48(S)
Is ........................................ Is(C)
Isearch ..................... lsearch (S)
Iseek ............................. Iseek(S)
Itoa ........................... ltoa(DOS)
ltol3 .............................. 13tol (S)
m4 ................................. m4(CP)
machine ............ machine (HW)
mail .............................. mail (C)
make ......................... make (CP)
makekey ........ makekey (ADM)
maliases .................. aliases (M)
maliases.hash ......... aliases (M)
mallinfo .................... maUoc (S)
malloc ....................... maUoc (S)
mallopt ..................... maUoc (S)
man ............................ man (CT)
mapchan .............. mapchan(F)
mapchan ............. mapchan(M)
map key .................. mapkey (M)
mapscrn ................ mapkey (M)
mapstr ................... mapkey(M)
masm ....................... masm(CP)
master ...................... master (F)
matherr .................. matherr(S)
mem ............................. mem(F)
memccpy ................ memory(S)
memchr .................. memory(S)
memcmp ................ memory(S)
memcpy ................. memory(S)
memset ................... memory(S)
mesg ............................ mesg(C)
messages ............. messages (M)
micnet ....................... micnet (F)
mkdev ................ mkdev (ADM)
mkdir ......................... mkdir(C)
mkdir ................... mkdir (DOS)
mkfs ...................... mkfs(ADM)
mkinittab ........... telinit (ADM)
mknod ...................... mknod(C)
mknod ....................... mknod(S)
mkstr ....................... mkstr(CP)
mktemp .................. mktemp(S)
mkuser ............. mkuser(ADM)
vi

mm .............................. mm(CT)
mmcheck .......... checkmm (CT)
mmt ............................ mmt(CT)
mnt ................................ mnt(C)
mnttab ...................... mnttab (F)
modf ............................ /rexp(S)
monitor .................. monitor(S)
more ............................ more(C)
mount ................. mount(ADM)
mount ........................ mount(S)
mouse .................... mouse (HW)
movedata ...... movedata (DOS)
mrand48 ................ drand48(S)
mscreen ................ mscreen (M)
msgctl ....................... msgctl (S)
msgget ...................... msgget(S)
msgop ........................ msgop(S)
multi screen .... multiscreen (M)
mv ................................... mv(C)
mvdir .................. mvdir(ADM)
nap ................................. napeS)
nbwaitsem ............. waitsem (S)
ncheck .............. ncheck(ADM)
neqn ............................ eqn (CT)
neqn .......................... neqn (CT)
netutil ................ netutil (ADM)
newform ............... new/orm (C)
newgrp .................... newgrp(C)
news ............................. news(C)
nextkey ......................... dbm(S)
nice ............................... nice (C)
nice ................................ nice (S)
nl ....................................... nl(C)
nlist ............................... nlist(S)
nm ................................. nm(CP)
nohup ........................ nohup(C)
nrand48 ................. drand48(S)
nroff .......................... nroff(CT)
null ................................. nuU (F)
od ..................................... od(C)
oldipr .............................. ipr(C)
open .............................. open(S)
opendir ................. directory (S)
opensem ................ opensem(S)
outp ......................... outp(DOS)
pack ............................. pack (C)

f
~

passwd ..................... passwd(C)
passwd ..................... passwd(F)
paste ......................... paste (CT)
pause .......................... pause(S)
pcat .............................. pack(C)
pclose ......................... popen(S)
perror ....................... perror(S)
pg ..................................... pg(C)
pipe ............................... pipe (S)
plock ........................... plock(S)
popen ......................... popen(S)
pow ................................. exp(S)
pr ...................................... pr(C)
prep ........................... prep (CT)
printf .......................... printf(S)
proctl ......................... proctl{S)
prof ............................. prof(CP)
profil ........................... profil (S)
profile ..................... profile (M)
prs ................................ prs(CP)
ps ...................................... ps(C)
pstat ............................. pstat(C)
ptrace ........................ ptrace (S)
ptx ................................ ptx(CT)
putc ............................... putc (S)
putch ..................... putch(DOS)
putchar ......................... putc(S)
putenv ....................... putenv (S)
putpwent .............. putpwent(S)
puts ................................ puts(S)
pututline ..................... getut(S)
putw .............................. putc(S)
pwadmin ....... pwadmin(ADM)
pwcheck ................ pwcheck(C)
pwd ............................... pwd(C)
qsort ............................ qsort(S)
quot .............................. quot(C)
ramdisk ............. ramdisk(HW)
rand .............................. rand(S)
random ................... random(C)
ranlib ...................... ranlib(CP)
ratfor ....................... ratfor(CP)
rcp .................................. rcp(C)
rdchk .......................... rdchk(S)
read .............................. read(S)
readdir ................. directory (S)

realloc ...................... malloc(S)
reboot ............... haltsys (ADM)
red .................................. red(C)
regcmp ................. regcmp(CP)
regcmp ....................... regex(S)
regex ........................... regex(S)
regexp ....................... regexp(S)
reject ........................ accept (C)
remote ..................... remote (C)
rename .............. rename(DOS)
restor ....................... restore (C)
restore ..................... restore (C)
rewind ......................... fseek(S)
rewinddir ............. directory (S)
rm .................................... rm(C)
rmdel ....................... rmdel (CP)
rmdir .............................. rm (C)
rmdir ......................... rmdir (C)
rmdir .................... rmdir(DOS)
rmuser .............. rmuser(ADM)
rsh ................................... rsh(C)
runbig ................ runbig(ADM)
sact .............................. sact(CP)
sbrk ............................... sbrk(S)
scanf ............................ scanf(S)
sccsdiff ................. sccsdiff(CP)
sccsfile ..................... sccsfile(F)
schedule ......... schedule (ADM)
screen ................... screen (HW)
scsi ............................. scsi (HW)
sdb ................................ sdb(CP)
sddate ....................... sddate(C)
sdenter .................... sdenter(S)
sdfree .......................... sdget(S)
sdget ............................ sdget(S)
sdgetv ........................ sdgetv(S)
sdiff ............................... sdiff(C)
sdleave ..................... sdenter(S)
sdwaitv ...................... sdgetv (S)
sed .................................. sed (C)
seekdir ................. directory (S)
segread ............. segread(DOS)
semctl ........................ semctl (S)
semget ...................... semget(S)
semop ........................ semop(S)
setbuf ......................... setbuf(S)
vii

setclock ........... setclock (ADM)
setcolor .................. setcolor (C)
setgid .......................... setuid (S)
setgrent .................. getgrent (S)
setjmp ....................... setjmp(S)
setkey ........................ setkey (C)
setmnt ................ setmnt(ADM)
setmode ............ setmode (DOS)
setpgrp .................... setpgrp (S)
setpwent ............... getpwent (S)
settime .............. settime (ADM)
setuid ......................... setuM (S)
setutent ........................ getut(S)
setvbuf ....................... setbuf(S)
sgetl .............................. sputl (S)
sh ...................................... sh(C)
shl .................................... shl(C)
shmctl ....................... shmctl (S)
shmget ...................... shmget(S)
shmop ........................ shmop(S)
shutdn ....................... shutdn (S)
shutdown ...... shutdown(ADM)
signal ......................... signal (S)
sigsem ....................... sigsem(S)
sin ................................... trig (S)
sinh ................................ sinh (S)
size .............................. size (CP)
sleep ............................ sleep (C)
sleep ............................. sleep (S)
soelim ..................... soelim(CT)
sopen .................... sopen(DOS)
sort ................................ sort(C)
spawnl ................. spawn(DOS)
spawnvp .............. spawn(DOS)
special ................. eqnchar(CT)
spell ........................... spell (CT)
spellin ....................... spell (CT)
spline ....................... spline (CP)
split ............................... split(C)
sprintf ......................... print[(S)
sputl ............................. sputl (S)
sqrt ................................. exp (S)
srand ............................ rand(S)
sscanf .......................... scanf(S)
ssignal ...................... ssignal (S)
stat .................................. stat (F)
viii

stat .................................. stateS)
stdio ............................. stdio(S)
stime ............................ stime (S)
store ............................•. dbm(S)
strcat .......................... string(S)
strcmp ........................ string(S)
strcpy ......................... string (S)
string .......................... string(S)
strings .................... strings(CP)
strip ........................... strip (CP)
strlen .................... strlen (DOS)
strlwr ................... strlwr (DOS)
strncat ........................ string(S)
strncmp ..................... string(S)
strncpy ....................... string (S)
strrev .................... strrev(DOS)
strset ..................... strset(DOS)
strtod .......................... strtod (S)
strtol ............................ strtol (S)
strupr ................... strupr(DOS)
stty ................................. stty (C)
style ........................... style (CT)
su ...................................... su(C)
sum ................................ sum(C)
swab ............................. swab(S)
swapadd ................ swapadd(S)
sxt ................................... sxt(M)
sync ....................... sync (ADM)
sync ............................... sync (S)
sysadmin ....... sysadmin (ADM)
sysadmsh ...... sysadmsh(ADM)
sys err list ................. perror(S)
sys- nerr .................... perror(S)
system ....................... system(S)
systemid ................ systemid (F)
systty ......................... systty (M)
tail .................................. tail (C)
tan .................................. trig (S)
tanh ............................... sinh(S)
tape ................................ tape (C)
tape ........................... tape (HW)
tapedump ........... tapedump(C)
tar .................................... tar(C)
tar .................................... tar(F)
tbl .................................. tbl (CT)
tdelete ...................... tsearch (S)

tee .................................... tee (C)
telinit .................. telinit (ADM)
tell ............................. tell (DOS)
telldir ................... ~irectory (S)
tempnam .............. :. tmpnam(S)
term ........................... term(CT)
term .............................. term (F)
termcap ................ termcap (M)
terminal ............ terminal (HW)
terminals ............ terminals (M)
terminfo ................ terminfo (F)
terminfo ............... terminfo (M)
terminfo ................ terminfo (S)
termio ...................... termio (M)
test .................................. test(C)
tfind ......................... tsearch (S)
tgetent .................... termcap (S)
tgetfiag ................... termcap (S)
tgetnum .................. termcap(S)
tgetstr ..................... termcap(S)
tgoto ....................... termcap(S)
tic ..................................... tic (C)
tid .................................... tid (C)
time ............................ time (CP)
time ............................... time (S)
times ............................ times (S)
tmpfile ..................... tmp/tle(S)
tmpnam .................. tmpnam(S)
toascii ........................... conv(S)
toascii .......................... ctype (S)
tolower ......................... conv (S)
tolower ........................ ctype (S)
top ................................... top(F)
top.next .......................... top (F)
touch .......................... touch (C)
toupper ........................ conv(S)
toupper ....................... ctype (S)
tput ................................ tput(C)
tputs ....................... termcap(S)
tr ........................................ tr(C)
translate ............... translate (C)
trchan ...................... trchan (M)
troff ............................ trojf(CT)
true ............................... true (C)
tsearch ..................... tsearch (S)
tset .................................. tset(C)

tsort ........................... tsort(CP)
tty ..................................... tty (C)
tty .................................... tty(M)
tty name .................. ttyname(S)
ttys .................................. ttys (F)
ttyslot ......................... ttyslot (S)
twalk ........................ tsearch(S)
types ............................ types (F)
TZ ..................................... tz(M)
tzset ............................. ctime (S)
nadmin .................... uadmin(S)
ulimit ......................... ulimit(S)
ultoa ....................... ultoa(DOS)
umask ....................... umask(C)
umask ........................ umask(S)
umount ............ umount(ADM)
umount .................... umount(S)
uname ....................... uname(C)
uname ....................... uname(S)
uncompress ........ compress(C)
unget ........................ unget(CP)
ungetc ....................... ungetc (S)
ungetch ............. ungetch (DOS)
uniq .............................. uniq(C)
units ............................. units(C)
unlink ........................ unlink(S)
unpack ......................... pack (C)
uptime ...................... uptime (C)
usemouse ............ usemouse (C)
ustat ............................. ustat(S)
utime .......................... utime (S)
utmp ............................ utmp (F)
uuchat .................... dial (ADM)
uucheck .......... uucheck (ADM)
uucico ................ uucico (ADM)
unclean ........... uuclean (ADM)
uucp ............................. uucp(C)
uuencode ............. uuencode (C)
uuinstall ........ uuinstall (ADM)
uulog ............................ uucp(C)
uuname ....................... uucp(C)
uupick .......................... uuto (C)
uusched .......... uusched(ADM)
uustat ........................ uustat(C)
uusub ......................... uusub(C)
unto .............................. uuto(C)
ix

uutry .................... uutry(ADM)
uux ................................. uux(C)
uuxqt ................... uuxqt(ADM)
val ................................. val(CP)
varargs .................... varargs(S)
vedit .................................. vi (C)
vfprintf ..................... vprintj(S)
vi ....................................... vi(C)
vidi ................................. vidi (C)
view .................................. vi(C)
vms tat ....................... vmstat(C)
vprintf ...................... vprintj(S)
vsh .................................. vsh(C)
vsprintf ..................... vprintj(S)
w ........................................ w(C)
wait ............................... wait(C)
wait ............................... waiteS)
waitsem .................. waitsem(S)
wall ........................ wall (ADM)
we .................................... wc(C)
what ............................. what(C)
who ................................ who(C)
whodo ....................... whodo(C)
write ............................ write (C)
write ............................ write (S)
wtmp ............................ utmp (F)
xargs ........................... xargs(C)
xlist ................................ xlist (S)
xref .............................. xre/(CP)
xstr .............................. xstr(CP)
yO ................................ bessel (S)
yl ................................ bessel (S)
yaee ............................ yacc (CP)
yes ................................... yes (C)
yn ................................ bessel (S)
zeat ....................... compress(C)

x

Contents
Commands (C)
intro
accept, reject
assign, deassign
at, batch
awk
backup
banner
basename
bc
bdiff
bfs
cal
calendar
capinfo

Introduces XENIX commands.
Allows/prevents print requests to a lineprinter or
class of printers.
Assigns and deassigns devices.
Executes commands at a later time.
Searches for and processes a pattern in a file.
Performs incremental file system backup.
Prints large letters.
Removes directory names from pathnames.
Invokes a calculator.
Compares files too large for difJ.
Scans big files.
Prints a calendar.
Invokes a reminder service.
Converts termcap descriptions into terminfo
descriptions.
Concatenates and displays files.
Changes working directory.
Changes group ID.
Changes the access permissions of a file or directory.
Changes owner ID.
Clears a terminal screen.
Reports hard disk block size.
Compares two files.
Selects or rejects lines common to two sorted files.

cat
cd
chgrp
chmod
chown
clear
cmchk
cmp
comm
compress,
llncompress, zcat Compress data for storage, uncompress, display a
stored file.
copy
Copies groups of files.
cp
Copies files.
Copies file archives in and out.
cpio
Executes commands at specified times.
cron
Invokes a shell command interpreter with C-like
csh
syntax.
Splits files according to context.
csplit
Spawns getty to a remote terminal.
ct
Calls another XENIX system.
Cll

date
dc
dd
devnm
df
diff
dift3
dircmp
dirname
disable
diskcp, diskcmp
dos, doscat,
doscp, dosdir,
dosformat, dosls,
dosmkdir, dosrm,
dosrmdir
dtype
du
dump
dumpdir
echo
ed
enable
env
ex
expr
factor
false

Prints and sets the date.
Invokes an arbitrary precision calculator.
Converts and copies a file.
Identifies device name.
Report number of free disk blocks.
Compares two text files.
Compares three files.
Compares directories.
Delivers directory part of pathname.
Turns off terminals and printers.
Copies or compares floppy disks.

Access DOS files.
Determines disk type.
Summarizes disk usage.
Performs incremental file system backup.
Prints the names of files on a backup archive.
Echoes arguments.
Invokes the text editor.
Turns on terminals and line printers.
Sets environment for command execution.
Invokes a text editor.
Evaluates arguments as an expression.
Factor a number.
Returns with a nonzero exit value.
Determines file type.
file
find
Finds files.
finger
Finds information about users.
Changes executable binary file headers.
fixhdr
format
Format floppy disks.
getopt
Parses command options.
grep,egrep,fgrep Searches a file for a pattern.
Checks group file.
grpcheck
Displays files in hexadecimal format.
hd
Prints the first few lines of a stream.
head
hello
Send a message to another user.
help
Asks for help with XENIX commands and SCCS error
messages.
hwconfig
Read the configuration information.
Prints user and group IDs and names.
id
Generate an IMAGEN accounting report.
imacct

ii

imprint
ipr,oldipr
iprint
join
kill
I

last
Ie
line
In
lock
logname
Ip, Ipr, cancel
Ipr
Iprint
Ipstat
Is
mail
mesg
mkdir
mknod
mnt
more
mv
newform
newgrp
news
nice
nI
nohup
od
pack, pcat,
unpack
passwd
pg
pr
ps
pstat
pwcheck
pwd
quot
random
rcp
red

Prints text files on an IMAGEN printer.
Put files into the IMAGEN printer queue.
Converts text files to DVI format.
Joins two relations.
Terminates a process.
Lists information about contents of directory.
Indicate last logins of users and teletypes.
Lists directory contents in columns.
Reads one line.
Makes a link to a file.
Locks a user's terminal.
Gets login name.
Send/cancel requests to lineprinter.
Sends files to the lineprinter queue.
Print to a printer attached to the user's terminal.
Prints lineprinter status information.
Gives information about contents of directories.
Sends, reads, or disposes of mail.
Permits or denies messages sent to a terminal.
Makes a directory.
Builds special files.
Mount a filesystem.
Views a file one screen full at a time.
Moves or renames files.
Changes the format of a text file.
Logs users into a new group.
Print news items.
Runs a command at a different priority.
Adds line numbers to a file.
Runs a command immune to hangups and quits.
Displays files in octal format.
Compresses and expands files.
Changes login password.
File perusal filter for soft-copy terminals.
Prints files on the standard output.
Reports process status.
Reports system information.
Checks password file.
Prints working directory name.
Summarizes file system ownership.
Generates a random number.
Copies files across XENIX systems.
Invokes a restricted version of ed.

iii

remote
restore, restor
rm, rmdir
rmdir
rsh
sddate
sdiff
sed
setcolor
setkey
sh
shl
sleep
sort
split
stty
su
sum
tail
tape
tapedump
tar
tee
test
tic
tid
touch
tput
tr
translate
true
tset
tty
umask
uname
uniq
units
uptime
usemouse

Executes
Invokes incremental file system restorer.
Removes files or directories.
Removes directories.
Invokes a restricted shell (command interpreter).
Prints and sets backup dates.
Compares files side-by-side.
Invokes the stream editor.
Set screen color.
Assigns the function keys.
Invokes the shell command interpreter.
Shell layer manager.
Suspends execution for an interval.
Sorts and merges files.
Splits a file into pieces.
Sets the options for a terminal.
Makes the user a super-user or another user.
Calculates checksum and counts blocks in a file.
Delivers the last part of a file.
Magnetic tape maintenance program.
Dumps magnetic tape to output file.
Archives files.
Creates a tee in a pipe.
Tests conditions.
Terminfo compiler.
Terminfo decompiler.
Updates access and modification times of a file.
Queries the terminfo database.
Translates characters.
Translates files from one format to another.
Returns with a zero exit value.
Sets terminal modes.
Gets the terminal's name.
Sets file-creation mode mask.
Prints the name of the current XENIX system.
Reports repeated lines in a file.
Converts units.
Displays information about the system activity.
Maps mouse input to keystrokes for use with nonmouse based programs.

uucp, uulog,
uuname
Copies files from XENIX to XENIX.
uuencode,uudecode
Encode/decode a binary file for transmission via mail

iv

uustat
uusub
uuto, uupick
uux
vi, view, vedit
vidi
vrnstat
vsh
w

wait
wc
what
who
whodo
write
xargs
yes

uucp status inquiry and job control.
Monitor uucp network.
Public XENIX-to-XENIX file copy.
Executes command on remote XENIX.
Invokes a screen-oriented display editor.
Sets the font and video mode for a video device.
Reports virtual memory statistics.
Menu driven visual shell.
Displays information about who is on the system and
what they are doing.
Awaits completion of background processes.
Counts lines, words and characters.
Identifies files.
Lists who is on the system.
Determines who is doing what.
Writes to another user.
Constructs and executes commands.
Prints string repeatedly.

v

INTRO (C)

INFKU (C)

Name

intro - Introduces XENIX commands.
Description

This section describes use of the individual commands available in the
XENIX Operating System. Each individual command is labeled with
either a C, a CP, or a CT for easy reference from other volumes. The
letter "C" stands for "command". The letters "P" and "T" stand
for commands that come with the optional XENIX Development System (Programming) and the XENIX Text Processing System, respectively. For example, the reference date (C) indicates a reference to a
discussion of the date command in the C section; the reference
cc (CP) indicates a reference to a discussion of the cc command in the
XENIX Development System; and the reference spell (CT) indicates a
reference to a discussion of the spell command in the XENIX Text Processing System. The Text Processing and Development Systems are
optional supplemental packages to the standard Operating System.
The "M" Miscellaneous section contains miscellaneous information
including a great deal of system maintenance information. Other
reference sections include the ' 'S' , System Services section, the
"DOS" Routines section and the "F" File Format section.
Syntax

Unless otherwise noted, commands described in this section accept
options and other arguments according to the following syntax:
name [option(s)] [cmdarg(s)]

where:
name

Is the name of an executable file.

option

- noargletter (s) or,
- argletter <>optarg

where <> is optional whitespace.
noargletter

Is a single letter representing an option without an
argument.

argletter

Is a single letter representing an option requiring an
argument.

May 16, 1988

Page 1

INTRO (C)

INTRO (C)
optarg

Is an argument (character string) satisfying preceding
argletter.

cmdarg

Is a pathname (or other command argument) not
beginning with -. - by itself indicates the standard
input.

See Also

getopt(C), getopt(S)
Diagnostics

Upon termination, each command returns 2 bytes of status, one supplied by the system and giving the cause for terminatiorr, and (in the
case of "normal" termination) one supplied by the program (see
waiteS) and exit (S». The former byte is 0 for normal termination; the
latter is customarily 0 for successful execution and nonzero to indicate
troubles such as erroneous parameters, bad or inaccessible data. It is
called variously "exit code", "exit status", or "return code", and is
described only where special conventions are involved.
Notes

Not all commands adhere to the syntax described here.

May 16, 1988

Page 2

ACCEPT (C)

ACCEPT (C)

Name
accept, reject - Allows/prevents print requests to a lineprinter or class
of printers.

Syntax
lusr/libl accept destinations
lusrllib/reject [ -r[ reason] ] destinations

Description
accept allows Ip(C) to accept requests for the named destinations. A
destination can be either a printer or a class of printers. Use Ipstat(C)
to find the status of destinations.
reject prevents Ip(C) from accepting requests for the named destinations. A destination can be either a printer or a class of printers. Use
Ipstat(C) to find the status of destinations. The following option is
useful with reject:

-r[ reason] Associates a reason with disabling (using disable (C))
the printer. The reason applies to all printers listed up to
the next -r option. If the -r option is not present or the -r
option is given without a reason, then a default reason is
used. Reason is reported by Ipstat(C). Please see
disable( C) for an example of reason syntax.

Files
/usr/spool/lp/ *

See Also
enable(C), Ip(C), Ipadmin(ADM),
Ipstat(C), disable(C).

May 16,1988

Ipinit(ADM),

Ipsched(ADM),

Page 1

ASSIGN (C)

ASSIGN (C)

Name

assign, deassign - Assigns and deassigns devices.
Syntax
assign [ -u ] [ -v ] [ -d ] [device] ...
deassign [ -u ] [ -v] [ device] ...
Description

assign attempts to assign device to the current user. The device argument must be an assignable device that is not currently assigned. An
assign command without an argument prints a list of assignable devices along with the name of the user to whom they are assigned.
deassign is used to "deassign" devices. Without any arguments,
deassign will deassign all devices assigned to the user. When arguments are given, an attempt is made to deassign each device given as
an argument.
With these commands you can exclusively use a device, such as a tape
drive or floppy drive. This keeps other users from using the device.
They have a similar effect as chown(C) and chmod(C), although they
only act on devices in /dev. Other aspects are discussed further on.
Available options include:
-d Performs the action of deassign. The -d option may be embedded

in device names to assign some devices and deassign others.
-v Gives verbose output.
-u Suppresses assignment or deassignment, but performs error check-

ing.
The assign command will not assign any assignable devices if it cannot assign all of them. deassign gives no diagnostic if the device cannot be deassigned. Devices may be automatically deassigned at

May 16,1988

Page 1

ASSIGN (C)

ASSIGN (C)

logout, but this is not guaranteed. Device names may be just the
beginning of the device required. For example,
assign fd
should be used to assign all floppy disk devices. Raw versions of device will also be assigned, e.g., the raw floppy disk devices Idev/rfd?
would be assigned in the above example.
Note that in many installations the assignable devices such as floppy
disks have general read and write access, so the assign command may
not be necessary. This is particularly true on single-user systems. Devices supposed to be assignable with this command should be owned by
the user asg. The directory Idev should be owned by bin and have
mode 755. The assign command (after checking for use by someone
else) will then make the device owned by whoever invokes the command, without changing the access permissions. This allows the system administrator to set up individual devices that are freely available, assignable (owned by asg), or nonassignable and restricted (not
owned by asg and with some restricted mode).
Note that the first time assign is invoked, it builds the assignable devices table letc/atab . This table is used in subsequent invocations to
save repeated searches of the Idev directory. If one of the devices in
Idev is changed to be assignable (i.e., owned by asg), then letc/atab
should be removed (by the super-user) so that a correct list will be
built the next time the command is invoked.
Return Values

Exit code 0 returned if successful, 1 if problems, 2 if device cannot be
assigned.

May 16,1988

Page 2

AT(C)

AT(C)

Name
at, batch - Executes commands at a later time.
Syntax
at time [date] [+ increment]
at -r job ...
at -I[job ... ]
at -q[ letter] time [date] [job ... ]
Description
at and batch read commands from the standard input to be executed at
a later time. at allows you to specify a time when the commands
should be executed, while batch executes jobs when the system load
level permits.

Standard output and standard error output are mailed to the user unless
they are redirected elsewhere. The shell environment variables,
current directory, umask, and ulimit are retained when the commands
are executed. Open file descriptors, traps, and priorities are lost.
A user is permitted to use at if his name appears in the file
lusr/lib/cron/at.allow. If that file does not exist, the file
lusr/lib/cron/at.deny is checked to determine if the user should be
denied access to at. If neither file exists, only root is allowed to submit a job. If only the at.deny file exists, global usage is permitted.
The allow/deny files consist of one user name per line.
The options are:
time The time may be specified as 1, 2, or 4 digits. One- and twodigit numbers are taken to be hours, four digits to be hours and
minutes. The time may alternately be specified as two numbers
separated by a colon, meaning hour:minute. A suffix am or pm
may be appended; otherwise a 24-hour clock time is understood.
The suffix zulu may be used to indicate GMT. The special
names noon, midnight, now, and next are also recognized.
date An optional date may be specified as either a month name followed by a day number (and possibly year number preceded by
an optional comma) or a day of the week (fully spelled or abbreviated to three characters). Two special "days", today and
tomorrow, are recognized. If no date is given, today is
assumed if the given hour is greater than the current hour and
tomorrow is assumed if it is less. If the given month is less

May 16, 1988

Page 1

A1(C)

Ai ~C)

than the current month (and no year is given), next year is
assumed.
increment
The optional increment is simply a number suffixed by one of
the following: minutes, hours, days, weeks, months, or years.
(The singular form is also accepted.) Thus, legitimate commands include:
at 0815am Jan 24
at 8:15am Jan 24
at now + 1 day
at 5 pm Friday

-r

Removes jobs previously scheduled by the. at or
batch command. Unless you are the super-user, you can only
remove your own jobs.

-I

Lists all the jobs currently scheduled for the invoking user.

-qletter
Places the specified job in a queue denoted by letter, where
letter is any letter from "a" to "z" (not uppercase). The queue
letter is appended to the job number. The following letters have
special significance:
a
at queue
b
batch queue
c
cron queue
at and batch write the job number and schedule time to standard error.
batch submits a batch job. It is almost equivalent to "at now," but
with a difference: batch goes into a different queue; at now will
respond with the error message too late.

Examples
The at and batch commands read the commands to be executed at a
later time from the standard input. sh(C) provides different ways of
specifying standard input. Within your commands, it may be useful to
redirect standard output.
The following sequence can be used at a terminal:
batch
nroffjtlename > outftle
 (press "Ctrl" and press "D")

May 16, 1988

Page 2

AT (C)

AT(C)

This sequence, which demonstrates redirecting standard error to a pipe
( I ), is useful in a shell procedure (the sequence of output redirection
specifications is significant):
batch «~I
nrofffilename 2>&1 >outfile I mail
loginid
!
To have a job reschedule itself, invoke at from within the shell procedure by including code similar to the following within the shell file:
echo "sh shellfile" I at 1900 thursday next week
The most simple use of at is to specify that a given command or regular file containing commands,file, be run on the date specified:
at date < file
Files
/usr/lib/cron

main cron directory

/usr/lib/cron/at.allow

list of allowed users

/usr/lib/cron/at.deny

list of denied users

/usr/lib/cron/queue

scheduling information

/usr/spool/cron/atjobs

spool area

See Also
cron(C), kill(C), mail(C), nice(C), ps(C), sh(C)
Diagnostics
Complains about syntax errors and times out of range.

May 16, 1988

Page 3

AWK(C)

AWK(C)

Name

awk -

Pattern scanning and processing language.

Syntax
awk [ -F re ] [parameter... ] [ 'prog' ] [ - f progfile ] [ file ... ]
Description

The -F re option defines the input field separator to be the regular
expression re.
Parameters, in the form x= ... y= ... may be passed to awk, where x and
yare awk built-in variables (see list below).
awk scans each input file for lines that match any of a set of patterns
specified in prog. The prog string must be enclosed in single quotes
(') to protect it from the shell. For each pattern in prog there may be
an associated action performed when a line of a file matches the pattern. The set of pattern-action statements may appear literally as prog
or in a file specified with the -f progfile option.

Input files are read in order; if there are no files, the standard input is
read. The file name - means the standard input. Each input line is
matched against the pattern portion of every pattern-action statement;
the associated action is performed for each matched pattern.
An input line is normally made up of fields separated by white space.
(This default can be changed by using the FS built-in variable or the
-F re option.) The fields are denoted $1, $2, ... ; $0 refers to the
entire line.
A pattern-action statement has the form:
pattern { action }
Either pattern or action may be omitted. If there is no action with a
pattern, the matching line is printed. If there is no pattern with an
action, the action is performed on every input line.
Patterns are arbitrary Boolean combinations ( !, 1 I, &&, and
parentheses) of rational expressions and regular expressions. A rela-

May 16, 1988

Page 1

AWK(C)

AWK(C)

tional expression is one of the following:
expression relop expression
expression matchop regular expression
where a relop is any of the six relational operators in C, and a matchop
is either - (contains) or ! - (does not contain). A conditional is an
arithmetic expression, a relational expression, the special expression
var in array,
or a Boolean combination of these.
The special patterns BEGIN and END may be used to capture control
before the first input line has been read and after the last input line has
been read respectively.
Regular expressions are as in egrep (see grep(C». In patterns they
must be surrounded by slashes. Isolated regular expressions in a pattern apply to the entire line. Regular expressions may also occur in
relational expressions. A pattern may consist of two patterns
separated by a comma; in this case, the action is performed for all
lines between an occurrence of the first pattern and next occurrence of
the second pattern.
A regular expression may be used to separate fields by using the -F
re option or by assigning the expression to the built-in variable FS .
The default is to ignore leading blanks and to separate fields by blanks
and/or tab characters. However, if FS is assigned a value, leading
blanks are no longer ignored.
Other built-in variables include:

ARGC
ARGV

FILENAME
FNR

FS
NF

NR
OFMT
OFS
ORS
RS

May 16,1988

command line argument count
command line argument array
name of the current input file
ordinal number of the current record in the current file
input field separator regular expression (default blank)
number of fields in the current record
ordinal number of the current record
output format for numbers (default % .6g)
output field separator (default blank)
output record separator (default new-line)
input record separator (default new-line)

Page 2

AWK(C)

AWK(C)

An action is a sequence of statements. A statement may be one of the
following:

if ( conditional ) statement [ else statement ]
while ( conditional ) statement
do statement while ( conditional )
for ( expression ; conditional ; expression ) statement
for ( var in array ) statement
delete array [subscript]
break
continue
{ [ statement ] ... }
# commonly variable = expression
expression
print [ expression-list ] [ >expression ]
printf format [ , expression-list ] [ >expression ]
next
# skip remaining patterns on this input line
exit [expr]
# skip the rest of the input; exit status is expr
return [expr]
Statements are terminated by semicolons, new lines, or right braces.
An empty expression-list stands for the whole input line. Expressions
take on string or numeric values as appropriate, and are built using the
operators +, - , *, I, %, and concatenation (indicated by a blank). The
C operators ++, - - , +=, -=, *=, 1=, and % = are also available in
expressions. Variables may be scalars, array elements (denoted x[i]),
or fields. Variables are initialized to the null string or zero. Array
subscripts may be any string, not necessarily numeric; this allows for a
form of associative memory. String constants are quoted (").
The print statement prints its arguments on the standard output, or on
a file if >expression is present, or on a pipe if I cmd is present. The
arguments are separated by the current output field separator and terminated by the output record separator. The printf statement formats
its expression list according to the format (see printj(S) in the
Programmer's Reference Manual).

awk has a variety of built-in functions:

arithmetic,

string,

input/output, and general.
The arithmetic functions are: atan2, cos, exp, int, log, rand, sin, sqrt,
and srand. int truncates its argument to an integer. rand returns a random number between 0 and 1. srand ( expr ) sets the seed value for
rand to expr or uses the time of day if expr is omitted.
The string functions are:

gsub(jor, repl, in)
behaves like sub (see below), except that it replaces
successive occurrences of the regular express (like
the ed global substitute command).

May 16,1988

Page 3

AWK(C)

AWK(C)

index(s, t)

returns the position in string s where string t first
occurs, or 0 if it does not occur at all.

length(s)

returns the length of its argument taken as a string, or
of the whole line if there is no argument.

match(s, re)

returns the position in string s where the regular
expressIon re occurs, or 0 if it does not occur at all.
RSTART is set to the starting position (which is the
same as the returned value), and RLENGTH is set to
the length of the matched string.

split(s, a,fs)

splits the string s into array elements a[l], a[2], a[n],
and returns to n. The separation is done with the regular expression fs or with the field separator FS if fs
is not given.

sprintf(jmt, expr, expr, ... )
formats the expressions according to the printf(S)
format given by fmt and returns the resulting string.
sub(jor, repl, in) substitutes the string repl in place of the first
instance of the regular expression for in string in and
returns the number of substitutions. If in is omitted,
awk substitutes in the current record ($0).
substr(s, m, n)

returns the n-character substring of s that begins at
position m.

The input/output and general functions are:
close(jilename) closes the file or pipe named filename.
cmdlgetline

pipes the output of cmd into getline; each successive
call to getline returns the next line of output from
cmd.

getline

sets $0 to the next input record from the current input
file.

getline  72
Print first two fields in opposite order:
{ print $2, $1 }
Same, with input fields separated by comma and/or blanks and tabs:
BEGIN

{ FS = ",[ \t]*[ \t]+"
{ print $2, $1 }

Add up the first column, print sum and average:
END

{ s += $1 }
{ print "sum is",

s," average is", s/NR }

Print fields in reverse order:
{ for (i

= NF;

i > 0; --i) print $i

Print all lines between start/stop pairs:
/start/, /stop/
Print all lines whose first field is different from previous one:
$1 != prev { print; prev = $1 }

May 16, 1988

Page 5

AWK(C)

AWK(C)

Simulate echo(C):
BEGIN

{

for (i = 1; i < ARGC; i++)
printf "%S", ARGV[i]
printf ''\nil
exit
}

Print file, filling in page numbers starting at 5:
/pagel

{ $2 = n++; }
{ print }

command line:

awk - f program n=5 input

See Also

grep(C), sed(C).
1ex(CP), printf(S) in the Programmer's Reference Manual.

Bugs

Input white space is not preserved on output if fields are involved.
There are no explicit conversions between numbers and strings. To
force an expression to be treated as a number add 0 to it; to force it to
be treated as a string concatenate the null string (" ") to it.

May 16,1988

Page 6

BACKUP (C)

BACKUP (C)

Name
backup - Performs incremental file system backup.

Syntax
backup [ key [ arguments] filesystem ]
Description
backup copies all files changed after a certain date in the date in the
filesystem. The key specifies the date and other options about the
backup, where a key consists of characters from the set
0123456789kfusd. The meanings of these characters are described
below:
f

Places the backup on the next argument file instead of the
default device.

u

If the backup completes successfully, writes the date of the
beginning of the backup to the file /etc/ddate. This file records
a separate date for each file system and each backup level.

0-9

This number is the "backup level". Backs up all files modified
since the last date stored in the file /etc/ddate for the same file
system at lesser levels. If no date is determined by the level, the
beginning of time is assumed; thus the option 0 causes the entire
file system to be backed up.

s

For backups to magnetic tape, the size of the tape is specified in
feet. The number of feet is taken from the next argument.
When the specified size is reached, backup will wait for reels to
be changed. The default size is 2,300 feet.

d

For backups to magnetic tape, the density of the tape, expressed
in BPI, is taken from the next argument. This is used in calculating the amount of tape used per write. The default is 1600.

k

This option is used when backing up to a block-structured device, such as a floppy disk. The size (in K-bytes) of the volume
being written is taken from the next argument. If the k argument
is specified, any s and d arguments are ignored. The default is
to use s and d.

If no arguments are given, the key is assumed to be 9u and a default

May 16, 1988

Page 1

BACKUP (C)

BACKUP (C)

file system is backed up to the default device.
The first backup should be a fullievel-O backup:
backup Ou
Next, periodic level 9 backups should be made on an exponential progression of tapes or floppies:
backup 9u
This progression is shown as follows:
12131214 ...
where backup 1 is used every other time, backup 2 every fourth,
backup 3 every eighth, etc.) When the level-9 incremental backup
becomes unmanageable because a tape is full or too many floppies are
required, a level-l backup should be made:
backup lu
After this, the exponential series should progress as if uninterrupted.
These level-9 backups are based on the level-l backup, which is based
on the level-O full backup. This progression of levels of backups can
be carried as far as desired.
The default file system and the backup device depend on the settings
of the variables DISK and TAPE, respectively, in the file
/etc/default/backup.

Files
/etc/ddate

Records backup dates of file system!level

/etc/default!backup

Default backup information

See Also
XENIX System Administrator's Guide
cpio(C), default(F), dumpdir(C), restore(C), sddate(C), backup(F)

Diagnostics
If the backup requires more than one volume (where a volume is likely

to be a floppy disk or tape), you will be asked to change volumes.
Press RETURN after changing volumes.

May 16, 1988

Page 2

BACKUP (C)

BACKUP (C)

Notes

Sizes are based on 1600 BPI for blocked tape; the raw magnetic tape
device has to be used to approach these densities. Write errors to the
backup device are usually fatal. Read errors on the file system are
ignored.
If the default archive medium specified in fete/default/backup or
fete/default/restor is block structured, (i.e. floppy disk) then the
volume size in Kbytes must be specified on the command line. Neither utility works correctly without this information. For example,
using the default device (below) with the backup command, enter the
following:
backup k 360 The default device entry for
fete/default/backup
(tape=/dev/xxx)
and
fete/default/restor
(archive=/dev/xxx) is /dev/rfd02.

It is not possible to successfully restore an entire active root file system.
Warning
When backing up to floppy disks, be sure to have enough formatted
floppies ready before starting a backup. You must also be sure to close
the floppy door when inserting floppy disks. If you fail to do so in a
multi-floppy backup, the entire backup will fail and you will have to
begin again.
You should never backup more than one filesystem to the tape devices
/dev/nrctO and /dev/nrct2. This is because, although backup can write
more than one filesystem to /dev/nrctO or /dev/nrct2, restore may not

be able to restore more than one filesystem from these devices.

May 16,1988

Page 3

BANNER (C)

BANNER (C)

Name

banner - Prints large letters.
Syntax
banner strings
Description
banner prints its arguments (each up to 10 characters long) in large

letters on the standard output. This is useful for printing names at the
front of printouts.
See Also

echo(C)

May 16, 1988

Page 1

BASENAME (C)

BASENAME (C)

Name
basename - Removes directory names from pathnames.
Syntax
basename string [ suffix ]
Description
base name deletes any prefix ending in / and the suffix (if present in
string) from string, and prints the result on the standard output. The
result is the "base" name of the file, i.e., the filename without any
preceding directory path and without an extension. It is used inside
substitution marks (,' ) in shell procedures to construct new
filenames.

The related command dirname deletes the last level from string and
prints the resulting path on the standard output.
Examples
The following command displays the filename memos on the standard
output:
basename /usr/johnh/memos.old .old
The following shell procedure, when invoked with the argument
/usr/src/cmd/cat.c, compiles the named file and moves the output to a
file named cat in the current directory:
cc $1
mv a.out 'basename $1 .c'
See Also
dimame(C), sh(C)

May 16,1988

Page 1

BC (C)

BC(C)

Name
bc - Invokes a calculator.

Syntax
bc [ -c ] [ -I ] [ file ... ]

Description
be is an interactive processor for a language that resembles C but provides unlimited precision arithmetic. It takes input from any files
given, then reads the standard input. The -I argument stands for the
name of an arbitrary precision math library. The syntax for be programs is as follows: L means the letters a-z, E means expression, S
means statement.
Comments:
Enclosed in /* and */
Names:
Simple variables: L
Array elements: L [ E ]
The words "ibase", "obase", and "scale"
Other operands:
Arbitrarily long numbers with optional sign and decimal point
(E)

sqrt (E)
length (E)
scale (E)
L(E, ... ,E)

Number of significant decimal digits
Number of digits right of decimal point

Additive operators:

+
Multiplicative operators:

*

/

% (remainder)
" (exponentiation)

May 16, 1988

Page 1

Be (C)
Unary operators:

++
(prefix and postfix; apply to names)
Relational operators:

<=

>=
!=

<
>
Assignment operators:
=

=+

=*
=/
=%
Statements:

E
{ S; ... ; S }
if(E)S
while (E) S
for ( E ; E ; E ) S
null statement
break
quit
Function definitions:
define L ( L ,... , L ) {
auto L, ... , L
S; ... S
return (E)

May 16, 1988

Page 2

BC(C)

BC(C)

Functions in -I math library:
sex)
c(x)
e(x)
lex)
a(x)
j(n,x)

Sine
Cosine
Exponential
Log
Arctangent
Bessel function

All function arguments are passed by value.
The value of a statement that is an expression is printed unless the
main operator is an assignment. Either semicolons or newlines may
separate statements. Assignment to scale influences the number of
digits to be retained on arithmetic operations in the manner of de (C).
Assignments to ibase or obase set the input and output number radix
respectively.
The same letter may be used as an array, a function, and a simple variable simultaneously. All variables are global to the program. ' , Auto' ,
variables are pushed down during function calls. When using arrays
as function arguments or defining them as automatic variables, empty
square brackets must follow the array name.
be is actually a preprocessor for de(C), which it invokes automatically, unless the -c (compile only) option is present. If the -c option is
present, the de input is sent to the standard output instead.
Example

The following defines a function to compute an approximate value of
the exponential function:
scale = 20
define e(x){
auto a, b, c, i, s
a=1
b=1
s=1
for(i=l; 1==1; i++){
a=a*x
b=b*i
c = alb
if(c == 0) retum(s)
s = s+c

May 16, 1988

Page 3

BC(C)

BC(C)

The following prints the approximate values of the exponential function of the first ten integers:
for(i=1; k=10; i++) e(i)
Files
/usr/lib/lib. bc

Mathematical library

/usr/bin/dc

Desk calculator proper

See Also
dc(C)
The XENIX User's Guide
Notes
A For statement must have all three E's.
Quit is interpreted when read, not when executed.

Trigonometric values should be given in radians.

May 16, 1988

Page 4

BDIFF (C)

BDIFF (C)

Name
bdiff - Compares files too large for diff.

Syntax
bditT file 1 file2 [ n ] [-s]

Description
hdiff compares two files, finds lines that are different, and prints them
on the standard output. It allows processing of files that are too large
for diff. bdiff splits each file into n-line segments, beginning with the
first nonmatching lines, and invokes diff upon the corresponding segments. The arguments are:

n The number of lines bdiff splits each file into for processing. The
default value is 3500. This is useful when 3500-line segments are
too large for diff.
-s Suppresses printing of bdiff diagnostics. Note that this does not
suppress printing of diagnostics from diff.
If filel (orfile2) is a dash (-), the standard input is read.
The output of bdiff is exactly that of diff. Line numbers are adjusted to
account for the segmenting of the files, and the output looks as if the
files had been processed whole.

Files
Itmp/bd? ????

See Also
diff(C)

Notes
Because of the segmenting of the files, bdiff does not necessarily find a
smallest sufficient set of file differences.
Specify the maximum number of lines if the first difference is too far
down in the file for diff and an error is received.

May 16, 1988

Page 1

BFS(C)

BFS(C)

Name
bfs - Scans big files.

Syntax
bfs [-] name

Description
hfs is like ed (C) except that it is read-only and processes much larger
files. Files can be up to 1024K bytes and 32K lines, with up to 255
characters per line. hfs is usually more efficient than ed for scanning
a file, since the file is not copied to a buffer. It is most useful for identifying sections of a large file where cspUt (C) can be used to divide it
into more manageable pieces for editing.
Normally, the size of the file being scanned is printed, as is the size of
any file written with the w command. The optional dash ( -)
suppresses printing of sizes. Input is prompted for with an asterisk (*)
when "P" and RETURN are typed. The "P" acts as a toggle, so
prompting can be turned off again by entering another "P" and a
RETURN. Note that messages are given in response to errors only if
prompting is turned on.
All address expressions described under ed are supported. In addition,
regular expressions may be surrounded with two symbols other than
the standard slash (I) and (?): A greater-than sign (» indicates downward search without wraparound, and a less-than sign «) indicates
upward search without wraparound. Note that parentheses and curly
braces are special and need to be escaped with a backslash (\). Since
hfs uses a different regular expression-matching routine from ed, the
regular expressions accepted are slightly wider in scope (see
regex (S)). Differences between ed and hfs are listed below:

+

A regular expression followed by + means one or more times.
For example, [0-9]+ is equivalent to [0-9][0-9]*.

\{m\} \{m,\} \{m,u\}
Integer values enclosed in \{ \} indicate the number of times
the preceding regular expression is to be applied. m is the
minimum number and u is a number, less than 256, which is
the maximum. If only m is present (e.g., \{m\}), it indicates
the exact number of times the regular expression is to be
applied. \{ m,\} is analogous to \{ m,infinity\}. The plus (+)
and star (*) operations are equivalent to \{ 1,\} and \{O,\}
respectively.

May 16, 1988

Page 1

BFS(C)

BFS(C)

( ••• )$n The value of the enclosed regular expression is to be

returned. The value will be stored in the (n+l)th argument
following·the subject argument. At most ten enclosed regular
expressions are allowed. regex makes its assignments unconditionally.
Parentheses are used for grouping. An operator, e.g. *, +,
\{ \}, can work on a single character or a regular expression
enclosed in parenthesis. For example, \(a*\(cb+\) *\)$0.

( .•. )

There is also a slight difference in mark names: only the letters "a"
through "z" may be used, and all 26 marks are remembered.
The e, g, v, k, p, q, W, =, ! and null commands operate as described
under ed except that e doesn't remember filenames and g and v when
given no arguments return the line after the line you were on. Commands such as ---, +++-, +++=, -12, and +4p are accepted. Note that
1,10p and 1,10 will both print the first ten lines. The f command only
prints the name of the file being scanned; there is no remembered
filename. The W command is independent of output diversion, truncation, or crunching (see the XO, xt and xc commands, below). The following additional commands are available:

xffile
Further commands are taken from the named file. When an
end-of-file is reached, an interrupt signal is received, or an error
occurs, reading resumes with the file containing the xf. Xf commands may be nested to a depth of 10.
xo [file]
Further output from the p and null commands is diverted to the
named file. If file is missing, output is diverted to the standard
output. Note that each diversion causes truncation or creation
of the file.

: label
This positions a label in a command file. The label is terminated by a newline, and blanks between the : and the start of
the label are ignored. This command may also be used to insert
comments into a command file, since labels need not be referenced.
( • , . )xb/regular expression/label
A jump (either upward or downward) is made to label if the
command succeeds. It fails under any of the following conditions:
1.

Either address is not between 1 and $.

2.

The second address is less than the first.

May 16,1988

Page 2

BFS (C)

BFS (C)

3.

The regular expression doesn't match at least one line
in the specified range, including the first and last lines.

On success, dot (.) is set to the line matched and a jump is made
to label. This command is the only one that doesn't issue an
error message on bad addresses, so it may be used to test
whether addresses are bad before other commands are executed.
Note that the command
xbr/ label
is an unconditional jump.
The xb command is allowed only if it is read from somewhere
other than a terminal. If it is read from a pipe only a downward
jump is possible.
xt number
Output from the p and null commands is truncated to a maximum of number characters. The initial number is 255.
xV[digit] [spaces] [value]

The variable name is the specified digit following the xv.
Xv5100 or xv5 100 both assign the value 100 to the variable 5.
Xv61,100p assigns the value 1,100p to the variable 6. To reference a variable, put a % in front of the variable name. For
example, using the above assignments for variables 5 and 6:
1,%5p
1,%5
%6

prints the first 100 lines.
g/%5/p
globally searches for the characters 100 and prints each line
containing a match. To escape the special meaning of %, a \
must precede it. For example,
g/". *\%[cds]/p
could be used to match and list lines containing print! characters, decimal integers, or strings.
Another feature of the xv command is that the first line of output
from a XENIX command can be stored into a variable.

May 16, 1988

Page 3

BFS(C)

BFS(C)
The only requirement is that the first character of value be a !.
For example,
xv5! cat junk
!rmjunk
!echo "%5"
xV6!expr %6 + 1
puts the current line in variable 5, prints it, and increments the
variable 6 by one. To escape the special meaning of ! as the first
character of value, precede it with a \. For example,
xv7\!date
stores the value !date into variable 7.

xbz label
xbn label
These two commands test the last saved return code from the
execution of a XENIX command (!command) or nonzero value,
respectively, and jump to the specified label. The two examples
below search for the next five lines containing the string size:
xv55

May 16, 1988

Page 4

CAL (C)

CAL (C)

Name
cal - Prints a calendar.

Syntax
cal [[ month] year]
Description
cal prints a calendar for the specified year. If a month is also specified, a calendar for that month only is printed. If no arguments are
specified, the current, previous, and following months are printed,
along with the current date and time. The year must be a number
between 1 and 9999; month must be a number between 1 and 12 or
enough characters to specify a particular month. For example, May
must be given to distinguish it from March, but S is sufficient to
specify September. If only a month string is given, only that month of
the current year is printed.

Notes
Beware that "cal 84" refers to the year 84, not 1984.
The calendar produced is that for England and her colonies. Note that
England swiiClied from the Julian to the Gregorian calendar in September of 1752, at which time eleven days were excised from the year.
To see the result of this switch, try "cal 9 1752".

May 16, 1988

Page 1

CALENDAR (C)

CALENDAR (C)

Name
calendar - Invokes a reminder service.
Syntax
calendar [ - ]
Description
qalendar consults the file calendar in the user's current directory and
mails him lines that contain today's or tomorrow's date. Most reasonable month-day dates, such as "Sep. 7," "september 7", and "9n",
are recognized, but not "7 September", "7/12" or "07/12".

On weekends "tomorrow" extends through Monday. Lines that contain the date of a Monday will be sent to the user on the previous Friday. This is not true for holidays.
When an argument is present, calendar does its job for every user who
has a file calendar in his login directory and sends the result to the
standard output. Normally this is done daily, in the early morning,
under the control of cron (C).
Files
calendar
/usr/lib/calprog

To figure out today's and tomorrow's dates

/etc/passwd
/tmp/cal*
See Also
cron(C), mail(C)
Notes
To get reminder service, a user's calendar file must have read permission for all.

May 16, 1988

Page 1

CAPINFO (C)

CAPINFO (C)

Name
capinfo, fixpad - convert termcap descriptions into terminfo descriptions.

Syntax
cap info capfile infofile
fixpad
Description
capinfo invokes an exeC) script to begin the conversion of a termcap
terminal description into the equivalent term info description. capinfo
calls fixpad to convert the padding specifcations. The conversion
needs to be completed by hand. The following should be given special attention:

- Many terminfo capabilities do not have termcap equivalents.
The XENIX extensions to termcap do not have term info
equivalents.
- The termcap capabilities cr, nl, and ht
are noted in the ex script as being problematical.

See Also
termcap(M), terminfo(M), terminfo(F), tic(C)

May 16,1988

Page 1

CAT (C)

CAT (C)

Name
cat - Concatenates and displays files.

Syntax
cat [ -u ] [ -s ] [ -v ] [ -t] [ -e ] file ...
Description
cat reads each file in sequence and writes it on the standard output. If
no input file is given, or if a single dash (-) is given, cat reads from the
standard input. The options are:

-s Suppresses warnings about nonexistent files.
-u Causes the output to be unbuffered.
-v Causes non-printing characters (with the exception of tabs, new-

lines, and form feeds) to be displayed. Control characters are
displayed as ""X" (Ctrl-X); the DEL character (octal 0177) is
printed as ""?" Non-ASCII characters (with the high bit set) are
printed as "M -x," where x is the character specified by the seven
low order bits.

-t Causes a tab to be printed as ""I." This option is ignored if the -v
option is not specified.
-e Causes a "$" character to be printed at the end of each line (prior
to the new-line). This option is ignored if the -v option is not set.

No input file may have the same name as the output file unless it is a
special file.

Examples
The following example displays file on the standard output:
cat file
The following example concatenates file1 and file2 and places the
result in file3 :
cat file1 file2 >file3
The following example concatenates file1 and appends it to file2 :

May 16, 1988

Page 1

CAT (C)

CAT (C)

cat file 1 >> file2
See Also

cp(C), pr(C)
Warning

Command lines such as:
cat file 1 file2 > file 1
will cause the original data in filel to be lost; therefore, you must be
careful when using special shell characters.

May 16, 1988

Page 2

CD (C)

CD (C)

Name
cd - Changes working directory.

Syntax
cd [ directory ]

Description
If specified, directory becomes the new working directory; otherwise

the value of the shell parameter $HOME is used. The process must
have search (execute) pennission in all directories (components)
specified in the full pathname of directory .
Because a new process is created to execute each command, cd would
be ineffective if it were written as a nonnal command; therefore, it is
recognized and executed by the shell.
If the shell is reading its commands from a tenninal, and the specified

directory does not exist (or some component cannot be searched),
spelling correction is applied to each component of directory, in a
search for the "correct" name. The shell then asks whether or not to
try and change directory to the corrected directory name; an answer of
n means "no", and anything else is taken as "yes".

Notes
Wildcard designators will work with the cd command.

See Also
pwd(C), sh(C), chdir(S)

May 16, 1988

Page 1

CHGRP (C)

CHGRP (C)

Name
chgrp - Changes group ID.

Syntax
chgrp group file ...
Description
chgrp changes the group ID of each file to group. The group may be
either a decimal group ID or a group name found in the file /etc/group.

Files
/etc/passwd
/etc/group

See Also
chown(C), chown(S), passwd(F), group(F)

Notes
Only the owner or the super-user can change the group ID of a file.

May 16, 1988

Page 1

CHMOD (C)

CHMOD (C)

Name
chmod - Changes the access permissions of a file or directory.
Syntax
chmod mode file ...
chmod [who] +-= [permission ... Jfile ...
Description
The chmod command changes the access permissions (or mode) of a
specified file or directory. It is used to control file and directory access
by users other than the owner and super-user. The mode may be an
expression composed of letters and operators (called symbolic mode),
or a number (called absolute mode).
A chmod command using symbolic mode has the form:
chmod [who J +-= [permission ... Jfilename
In place of who you can use one or any combination of the following
letters:
a

Stands for "all users". If who is not indicated on the command
line, a is the default. The definition of "all users" depends on the
user's umask. See umask(C).

g Stands for "group", all users who have the same group ID as the
owner of the file or directory.
o Stands for" others' " all users on the system.
u Stands for "user", the owner of the file or directory.

The operators are:

+ Adds permission
Removes permission

= Assigns the indicated permission and removes all other permissions (if any) for that who. If no permission is assigned, existing
permissions are removed.
Permissions can be any combination of the following letters:
x Execute (search permission for directories)

May 16, 1988

Page 1

CHMOD(C)

CHMOD (C)

r

Read

w Write

s

Sets owner or group ID on execution of the file to that of the owner
of the file. The mode "u+s" sets the user ID bit for the file. The
mode "g+s" sets the group ID bit. Other combinations have no
effect.

t

Saves text in memory upon execution. ("Sticky bit", see
chmod(S)). Only the mode "u+t" sets the sticky bit. All other
combinations have no effect. This mode can only be set by the
super-user.
Mandatory locking will occur during access

Multiple symbolic modes may be given, separated by commas, on a
single command line. See the following Examples section for sample
permission settings.
Mandatory file and record locking refers to a file's ability to have it's
reading or writing permissions locked while a program is accessing
that file. A file cannot have group execution permission and be able to
be locked on execution. In addition, it is not possible to turn on the
set-group-ID and enable a file to be locked on execution at the same
time. The following examples show illegal uses of chmod and will
generate error messages: chmod g+x,+ I filename
chmod g+s,+ 1 filename
A chmod command using absolute mode has the form:
chmod mode filename
where mode is an octal number constructed by performing logical OR
on the following:
4000

Set user ID on execution

20#0

Set group ID on execution if "#" is 7, 5, 3, or 1 and
enable mandatory locking if "#" is 6, 4, 2, or O.

1000

Sets the sticky bit (see chmod(S))

0400

Read by owner

0200

Write by owner

0100

Execute (search in directory) by owner

May 16, 1988

Page 2

CHMOD (C)

CHMOD (C)

0040

Read by group

0020

Write by group

0010

Execute (search in directory) by group

0004

Read by others

0002

Write by others

0001

Execute (search in directory) by others

0000

No permissions

Examples

Symbolic Mode

The following command gives all users execute permission for file:
chmod +xfile
The following command removes read and write permission for group
and others fromfile:
chmod go-rw file
The following command gives other users read and write permission
for file:
chmod o+rw file
The following command gives read permission to group and other:
chmod g+r,o+r file
Absolute Mode

The following command gives all users read, write and execute permission for file:
chmod 0777 file
The following command gives read and write permission to all users
for file:
chmod 0666 file

May 16,1988

Page 3

CHMOD(C)

CHMOD (C)

The following command gives read and write permission to the owner
of file only:
chmod 0600 file
The following example causes the file to be locked on access:
chmod +1 file
See Also
Is(C), chmod(S)
Notes
The user ID, group ID and sticky bit settings are only useful for binary
executable files. They have no effect on shell scripts.

May 16, 1988

Page 4

CHOWN(C)

CHOWN(C)

Name
chown - Changes owner ID.

Syntax
chown owner file ...
Description
chown changes the owner ID of the files to owner. The owner may be
either a decimal user ID or a login name found in the file /etc/passwd.

Files
/etc/passwd
/etc/group

See Also
chgrp(C), chown(S), group(F), passwd(F)

Notes
Only the owner or the super-user can change a file's owner or group

ID.

May 16, 1988

Page 1

CLEAR (C)

CLEAR (C)

Name

clear - Clears a tenninal screen.
Syntax
clear [ tenn ]
Description

The clear command clears the screen. If term is not specified, the terminal type is obtained from the TERM environment variable.
If a video tenninal does not have a clear screen capability, new lines
are output to scroll the screen clear. If the tenninal is a hardcopy, the
paper is advanced to the top of the next page.
Files

/etc/tenncap
See Also

environ(M), tenncap(M), tput(C)
Notes
If the standard output is not a tenninal, clear issues an error message.

May 16, 1988

Page 1

CMCHK(C)

CMCHK(C)

Name
cmchk - Reports hard disk block size.

Syntax
cmchk
Description
Reports the hard disk block size (BSIZE) in bytes.

May 16,1988

Page 1

CMP (C)

CMP (C)

Name
cmp - Compares two files.

Syntax
cmp [ -I ] [ -s ] file1 file2
Description
cmp compares two files and, if they are different, displays the byte and
line number of the differences. UfUe1 is -, the standard input is used.

The options are:
-I

Prints the byte number (decimal) and the differing bytes (octal)
for each difference.

-s

Returns an exit code only, 0 for identical files, 1 for different
files and 2 for an inaccessible or missing file.

This command should be used to compare binary files; use dlff(C) or
diff3 (C) to compare text files.

See Also
comm(C), diff(C), diff3(C)

Diagnostics
Exit code 0 is returned for identical files, 1 for different files, and 2 for
an inaccessible or missing argument.

May 16, 1988

Page 1

COMM(C)

COMM(C)

Name
comm - Selects or rejects lines common to two sorted files.

Syntax
comm [ - [ 123 ] ] file 1 file2

Description
comm reads filel and file2 , which should be ordered in ASCII collating sequence (see sort (C», and produces a three-column output: lines
only infilel; lines only infile2 ; and lines in both files. The filename
- means the standard input.
Flags 1, 2, or 3 suppress printing of the corresponding column. Thus
comm -12 prints only the lines common to the two files; comm -23
prints only lines in the first file but not in the second; comm -123 is a
no-op.

See Also
cmp(C), diff(C), sort(C), uniq(C)

May 16, 1988

Page 1

COMPRESS (C)

COMPRESS (C)

Name
compress - compress data for storage.
uncompress - uncompress a stored file.
zcat - display a stored file.
Syntax
compress [-dtFqc] [-b bits] file
uncompress [-fqc]file
zcatfile

Description
compress takes a file and compresses it to the smallest possible size,
creates a compressed output file, and removes the original file unless
the -c option is present. Compression is achieved by encoding common strings within the file. uneompress restores a previously
compressed file to its uncompressed state and removes the
compressed version. zeat uncompresses and displays a file on the standard output. When zeat is used to display a file, the file is
uncompressed and concatenated on the screen or standard output, and
the compressed version of the file is not removed.

If no file is specified on the command line, input is taken from the
standard input and the output is directed to the standard output. Output
defaults to a file with the same filename as the input file with the suffix ".z" or it can be directed through the standard output. The output
files have the same permissions and ownership as the corresponding
input files or the user's standard permissions if output is directed
through the standard output.
If no space is saved by compression, the output file is not written
unless the -F flag is present on the command line.

Options
The following options are available from the command line:
-d

Decompresses a compressed file.

-c

Writes output on the standard output and do not remove
original file.

-bbits

Specifies the maximum number of bits to use in encoding.

-f

Overwrites previous output file.

May 16, 1988

Page 1

COMPRESS (C)

COMPRESS (C)

-F

Writes output file even if compression saves no space.

-q

Generates no output except error messages, if any.

See Also
pack(C), pcat(C), ar(C), tar(C), cat(C)

May 16,1988

Page 2

COpy (C)

COpy (C)
Name

copy - Copies groups of files.
Syntax
copy [ option] ... source '" dest
Description
The copy command copies the contents of directories to another directory. It is possible to copy whole file systems since directories are
made when needed.
If files, directories, or special files do not exist at the destination, then
they are created with the same modes and flags as the source. In addition, the super-user may set the user and group ID. The owner and
mode are not changed if the destination file exists.

Note that there may be more than one source directory. If so, the
effect is the same as if the copy command had been issued for each
source directory with the same destination directory for each copy.
Options do not have to be given as separate arguments, and may
appear in any order, even after the other arguments. The options are:
-a

Asks the user before attempting a copy. If the response does
not begin with a "y", then a copy is not done.

-I

Uses links instead whenever they can be used. Otherwise a
copy is done. Note that links are never done for special files
or directories.

-n

Requires the destination file to be new. If not, then the copy
command does not change the destination file. The -n flag is
meaningless for directories. For special files an -0 flag is
assumed (i.e., the destination of a special file must not
exist).

-0

If set then every file copied has its owner and group set to
those of the source. If not set, then the file's owner is the
user who invoked the program.

-m

If set, then every file copied has its modification time and
access time set to that of the source. If not set, then the
modification time is set to the time of the copy.

-r

If set, then every directory is recursively examined as it is
encountered. If not set then any directories that are found
are ignored.

May 16, 1988

Page 1

COpy (C)

COpy (C)

-ad

Asks the user whether a -r flag applies when a directory is
discovered. If the answer does not begin with a "y", then
the directory is ignored.

-v

If the verbose option is set messages are printed that reveal
what the program is doing.

Arguments to copy are:
source

This may be a file, directory or special file. It must exist. If
it is not a directory, then the results of the command are the
same as for the cp command.

dest

The destination must be either a file or directory that is
different from the source.

If the source and destination are anything but directories, then copy
acts just like a cp command. If both are directories, then copy copies
each file into the destination directory according to the flags that have
been set.
Examples
This command line verbosely copies all files in the current directory
to /tmp/food:
copy -v . /tmp/food
The next command line copies all files, except for those that begin
with a period (.), and copies the immediate contents of any child
directories:
copy

*

/tmp/logic

This command is the same as the previous one, except that it recursively examines all subdirectories, and it sets group and ownership
permissions on the destination files to be the same as the source files:
copy -ro

* /tmp/logic

Notes
Special device files can be copied. When they are copied, any data
associated with the specified device is not copied.

May 16, 1988

Page 2

CP(C)

CP(C)

Name
cp - Copies files.

Syntax
cp file 1 file2
cp files directory

Description
There are two ways to use the cp command. With the first way, filel
is copied to file2. Under no circumstance canfilel andfile2 be identical. With the second way, directory is the location of a directory into
which one or more files are copied.

See Also
copy(C), cpio(C), In(C), mv(C), rm(C), chmod(S)

Notes
Special device files can be copied. If the file is a named pipe, then the
data in the pipe is copied to a regular file. Similarly, if the file is a
device, then the file is read until the end-of-file is reached, and that
data is copied to a regular file. It is illegal to copy a directory to a
file.

May 16, 1988

Page 1

CPIO (C)

CPIO (C)

Name
cpio - Copies file archives in and out.
Syntax
cpio -0 [ acBv ]
cpio -i [ Bcdmrtuvsfb ] [patterns ]
cpio -p [ adlmruv ] directory
Description
cpio -0 (copy out) reads the standard input to obtain a list of pathnames and copies those files onto the standard output together with
pathname and status infonnation.
cpio -i (copy in) extracts from the standard input (which is assumed to
be the product of a previous cpio -0) the names of files selected by
zero or more patterns given in the name-generating notation of sh (C).
In patterns, the special characters ?, *, and [ ... ] match the slash ( / )
character. The default for patterns is * (i.e., select all files).

Remember to escape special characters to prevent expansion by the
shell.
cpio -p (pass) copies out and in during a single operation. Destination
pathnames are interpreted relative to the named directory .

The meanings of the available options are:
-a

Resets access times of input files after they have been copied.

-B

Blocks input/output 5,120 bytes to the record (does not apply
to the pass option; meaningful only with data directed to or
from raw devices).

-d

Directories are created as needed.

-c

Writes header infonnation in ASCII character fonn for portability.

-r

Interactively renames files. If the user types a null line, the
file is skipped.

-t

Prints a table of contents of the input. No files are created.

May 16,1988

Page 1

CPIO (C)

CPIO (C)

-u

Copies unconditionally (normally an older file will not
replace a newer file with the same name).

-v

Verbose: causes a list of filenames to be printed. When used
with the -t option, the table of contents looks like the output
of an Is -I command (see Is (C».

-I

Whenever possible, links files rather than copying them.
U sable only with the -p option. If the link cannot be done
(e.g. the file already exists) the command will abort.

-m

Retains previous file modification time. This option is
ineffective on directories that are being copied.

-s

Swap bytes within each half word. Use only with the -i
option.

-f

Copy in all files except those in patterns. Use only with the -i
option.

-b

Reverses the order of the bytes within each word. Use only
with the -i option.

Examples

The first example below copies the contents of a directory into an
archive; the second duplicates a directory hierarchy:
Is I cpio

-0

>/devIfdO

cd olddir
find . -print I cpio -pdl newdir
Or:
find. -print I cpio -oB >/devjrfdO
See Also

ar(CP), find(C), cpio(F)
Notes

Pathnames are restricted to 128 characters. If there are too many
unique linked files, the program runs out of memory to keep track of
them and thereafter linking information is lost. Only the super-user
can copy special files.

May 16, 1988

Page 2

CRON(C)

CRON(C)

Name
cron - Executes commands at specified times.

Syntax
/etc/cron
crontab [file]
erontab -r
erontab -I
Description
cron is the clock daemon that executes commands at specified dates
and times according to the instructions in the files located in
/usr/spool/cron/crontabs. Regularly scheduled commands can be
specified according to instructions found in crontab files; users can
submit their own crontab file via the crontab command. Commands
which are to be executed only once may be submitted via the at command. Because cron never exits, it should be executed only once.
This is best done by running cron from the initialization process
through the file /etc/re.
crontab copies the specified file, or standard input if no file is specified, into a directory that holds all users' crontabs. The crontab file in
the crontabs directory is given the user's login name. The - r option
removes a user's crontab from the crontab directory. crontab - I will

list the crontab file for the invoking user.
A user is permitted to use crontab if their name appears in the file
/usr/lib/cron/cron.allow. If that file does not exist, the file
/usr/lib/cron/cron.deny is checked to determine if the user should be
denied access to crontab. If neither file exists, only root is allowed to
submit a job. Global usage is permitted by the existence of an empty
cron.deny file. cron.deny is checked only if cron.allow does not
exist. The allow/deny files consist of one user name per line.
The erontabs files consist of lines of six fields each. The fields are
separated by spaces or tabs. The first five are integer patterns that
specify the minute (0-59), hour (0-23), day of the month (1-31), month
of the year (1-12), and day of the week (0-6, with O=Sunday). Each of
these patterns may contain:
A number in the (respective) range indicated above

-

Two numbers separated by a minus (indicating an inclusive range)

May 16, 1988

Page 1

CRON(C)

CRON(C)

-

A list of numbers separated by commas (meaning all of these
numbers)

-

An asterisk (meaning all legal values)

Note that the specification of days may be made by two fields (day of
the month and day of the week). If both are specified as a list of elements, both are adhered to. For example, 0 0 1,15 * 1 would run a
command on the first and fifteenth of each month, as well as on every
Monday. To specify days by only one field, the other field should be
set to * (for example, 0 0 * * 1 would run a command only on Mondays).
The sixth field is a string that is executed by the shell at the specified
time(s). A % in this field is translated into a newline character. Only
the first line (up to a % or end-of-line) of the command field is executed by the shell. The other lines are made available to the command
as standard input.
The shell is invoked from your $HOME directory with an argO of sh.
Users who desire to have their .profile executed must explicitly do so
in the crontab file. cron supplies a default environment for every
shell, defining HOME, LOGNAME, SHELL ( =/bin/sh), and

PATH (=:/bin:/usr/bin:/usr/lbin).
cron examines the crontabs directory periodically to see if it has
changed; if it has, cron reads it. Thus it takes only a short while for
entries to become effective.
crontab exits and returns a value of 55 if it cannot allocate enough
memory. If it exits· for any other reason, it returns a value of 1.

Examples
An example crontabs file follows:

304* * *
04* * *
154* * *
30411 1
404***
1,21,41 * * * *

/etc/sa -s > /dev/null
calendar find jusr/preserve -mtime +7 -a -exec rm -f {} ;
/usr/lib/uucp/uuclean
find / -name '#*' -atime +3 -exec rm -f {} ;
(echo -n ' '; date; echo) >/dev/console

A history of all actions by cron can be recorded in /usr/lib/cron/log.
This logging occurs only if the variable CRONLOG in
/etc/default/cron is set to YES. By default this value is set to NO and
no logging occurs. If logging should be turned on, be sure to monitor
the size of /usr/lib/cron/log so that it doesn't unreasonably consume
disk space.

May 16, 1988

Page 2

CRON(C)

CRON(C)

Files

/usr/lib/cron

main cron directory

/usr/spool/cron/crontabs/* spool area
/usr/lib/cron/log

accounting information

/usr/lib/cron/cron.allow

list of allowed users

/usr/lib/cron/cron.deny

list of denied users

/usr/lib/cron/.proto

cron environment information

/usr/lib/cron/queuedefs

cron data file

/etc/default/cron

cron logging default information

See Also

at(C), sh(C)
Notes
cron reads the files in the crontabs directory only when there is a
change, but it reads the in-core version of the tables periodically.

Users should remember to redirect the standard output and standard
error of their commands, otherwise any generated output or errors will
be mailed to the user.
crontab will overwrite any previous entry with the same name.

May 16, 1988

Page 3

CSH (C)

CSH (C)

Name

csh - Invokes a shell command interpreter with C-like syntax.
Syntax
csh [ -cefinstvVxX ] [ arg ... ]
Description

csh is a command language interpreter. It begins by executing commands from the file .cshrc in the home directory of the invoker. If
this is a login shell, it also executes commands from the file .login
there. In the normal case, the shell begins reading commands from the
terminal, prompting with % . Processing of arguments and the use of
the shell to process files containing command scripts will be described
later.
The shell then repeatedly performs the following actions: a line of
command input is read and broken into words. This sequence of words
is placed on the command history list and then parsed. Finally, each
command in the current line is executed.
When a login shell terminates, it executes commands from the file
.logout in the user's home directory.

Lexical structure
The shell splits input lines into words at blanks and tabs with the following exceptions. The characters &, I, ;, <, >, (, ), form separate
words. If doubled in &&, II, «, or », these pairs form single words.
These parser metacharacters may be made part of other words, or
prevented their special meaning, by preceding them with \ A newline
preceded by a \is equivalent to a blank.
)

In addition, strings enclosed in matched pairs of quotations, . . , . . or ",
form parts of a word; metacharacters in these strings, including blanks
and tabs, do not form separate words. These quotations have semantics to be described subsequently. Within pairs of\ or " characters, a
newline preceded by a \ gives a true newline character.
When the shell's input is not a terminal, the character # introduces a
comment which continues to the end of the input line. It does not
have this special meaning when preceded by \ and placed inside the
quotation marks"', . . , and ".

May 16, 1988

Page 1

CSH(C)

CSH(C)

Commands

A simple command is a sequence of words, the first of which specifies
the command to be executed. A simple command or a sequence of
simple commands separated by I characters forms a pipeline. The output of each command in a pipeline is connected to the input of the
next. Sequences of pipelines may be separated by;, and are then executed sequentially. A sequence of pipelines may be executed without
waiting for it to terminate by following it with a &. Such a sequence
is automatically prevented from being terminated by a hangup signal;
the nohup command need not be used.
Any of the above may be placed in parentheses to form a simple command (which may be a component of a pipeline, etc.) It is also possible to separate pipelines with I I or && indicating, as in the C
language, that the second is to be executed only if the first fails or
succeeds respectively. (See Expressions.)
Substitutions

The following sections describe the various transformations the shell
performs on the input in the order in which they occur.
History Substitutions

History substitutions can be used to reintroduce sequences of words
from previous commands, possibly performing modifications on these
words. Thus, history substitutions provide a generalization of a redo
function.
History substitutions begin with the character! and may begin anywhere in the input stream if a history substitution is not already in
progress. The ! may be preceded by a \ to prevent its special meaning;
a ! is passed unchanged when it is followed by a blank, tab, newline,
=, or (. History substitutions may also occur when an input line begins
with ". This special abbreviation will be described later.
Any input line which contains history substitution is echoed on the
terminal before it is executed as it could have been entered without
history substitution.
Commands input from the terminal which consist of one or more
words are saved on the history list, the size of which is controlled by
the history variable. The previous command is always retained. Commands are numbered sequentially from 1.

May 16,1988

Page 2

CSH (C)

CSH (C)
For example, enter the command:
history

Now, consider the following output from the history command:
9
10
11
12

write michael
ex write.c
cat oldwrite.c
diff *write.c

The commands are shown with their event numbers. It is not usually
necessary to use event numbers, but the current event number can be
made part of the prompt by placing a ! in the prompt string.
With the current event 13 we can refer to previous events by event
number! 11, relatively as in !-2 (referring to the same event), by a prefix of a command word as in !d for event 12 or !w for event 9, or by a
string contained in a word in the command as in !?mic? also referring
to event 9. These forms, without further modification, simply reintroduce the words of the specified events, each separated by a single
blank. As a special case !! refers to the previous command; thus !!
alone is essentially a redo. The form !# references the current command (the one being entered). It allows a word to be selected from
further left in the line, to avoid retyping a long name, as in !#: 1.
To select words from an event, we can follow the event specification
by a : and a designator for the desired words. The words of an input
line are numbered from 0, the first (usually command) word being 0,
the second word (first argument) being 1, and so on. The basic word
designators are:

o

First (command) word

n nth argument
"

First argument, i.e. 1

$ Last argument
% Word matched by (immediately preceding) ?s? search
x-y

Range of words
-y Abbreviates 0-y

* Abbreviates"-$, or nothin~ if only 1 word in event

May 16, 1988

Page 3

CSH (C)

CSH (C)

x * Abbreviates x-$
x - Like x * but omitting word $
The : separating the event specification from the word designator can
be omitted if the argument selector begins with a ", $, *, - or %. After
the optional word designator, a sequence of modifiers can be placed,
each preceded by a :. The following modifiers are defined:
h Removes a trailing pathname component
r

Removes a trailing .xxx component

sll Ir I
Substitutes l for r
Removes all leading pathname components
& Repeats the previous substitution
g Applies the change globally, prefixing the above
p Prints the new command but does not execute it
q Quotes the substituted words, preventing substitutions
x Like q, but breaks into words at blanks, tabs, and newlines
Unless preceded by a g, the modification is applied only to the first
modifiable word. In any case it is an error for no word to be applicable.
The left sides of substitutions are not regular expressions in the sense
of the editors, but rather strings. Any character may be used as the
delimiter in place of I; a \ quotes the delimiter within the l and r
strings. The character & in the right side is replaced by the text from
the left. A \ quotes & also. A null l uses the previous string either
from a l or from a contextual scan string s in !?s ? The trailing delimiter in the substitution may be omitted if a newline follows immediately as may the trailing? in a contextual scan.
A history reference may be given without an event specification, e.g.,
!$. In this case the reference is to the previous command unless a previous history reference occurred on the same line in which case this
form repeats the previous reference. Thus !?foo?"!$ gives the first and
last arguments from the command matching ?foo?
A special abbreviation of a history reference occurs when the first
nonblank character of an input line is a ". This is equivalent to !:s",
providing a convenient shorthand for substitutions on the text of the
previous line. Thus "lb"lib fixes the spelling of lib in the previous
command. Finally, a history substitution may be surrounded with {

May 16, 1988

Page 4

CSH (C)

CSH (C)

and } if necessary to insulate it from the characters that follow. Thus,
after Is -ld -paul we might do !{l}a to do Is -ld -paula, while !la would
look for a command starting lao
Quotations With / and

/I

The quotation of strings by / and " can be used to prevent all or some
of the remaining substitutions. Strings enclosed in / are prevented any
further interpretation. Strings enclosed in " are variable and command
expansion may occur.
In both cases, the resulting text becomes (all or part of) a single word;
only in one special case (see Command Substitution below) does a "
quoted string yield parts of more than one word; / quoted strings never
do.

Alias Substitution
The shell maintains a list of aliases which can be established,
displayed and modified by the alias and unalias commands. After a
command line is scanned, it is parsed into distinct commands and the
first word of each command, left-to-right, is checked to see if it has an
alias. If it does, then the text which is the alias for that command is
reread with the history mechanism available as though that command
were the previous input line. The resulting words replace the command and argument list. If no reference is made to the history list,
then the argument list is left unchanged.
Thus if the alias for Is is Is -1 the command' 'Is /usr" would map to "Is
-1 /usr". Similarly if the alias for lookup was "grep \!" /etc/passwd"
then "lookup bill" would map to "grep bill /etc/passwd".
If an alias is found, the word transformation of the input text is performed and the aliasing process begins again on the reformed input
line. Looping is prevented if the first word of the new text is the same
as the old by flagging it to prevent further aliasing. Other loops are
detected and cause an error.
Note that the mechanism allows aliases to introduce parser metasyntax. Thus we can alias print "/pr\!* I Ipr/" to make a command that
paginates its arguments to the lineprinter.
There are four csh aliases distributed with the XENIX System V csh.
These are pushd, popd, swapd, and ftipd. These aliases maintain a
directory stack.
pushd dir
Pushes the current directory onto the top of the directory stack,
changes to the directory dir.

May 16, 1988

Page 5

CSH(C)

CSH (C)

popd
Changes to the directory at the top of the stack, then removes
(pops) the top directory from the stack, and announces the current
directory.
swapd
Swaps the top two directories on the stack. The directory on the
top becomes the second to the top, and the second to the top directory becomes the top directory.
flipd
Flips between two directories, the current directory and the top
directory on the stack. If you are currently in dirl,and dir2 is on
the top of the stack, when flipd is invoked, you change to dir2 and
dirl is replaced as the top directory on the stack. When flipd is
again invoked, you change to dirl and dir2 is again the top directory on the stack.
Variable Substitution

The shell maintains a set of variables, each of which has a list of zero
or more words as its value. Some of these variables are set by the
shell or referred to by it. For instance, the argv variable is an image of
the shell's argument list, and words of this variable's value are
referred to in special ways.
The values of variables may be displayed and changed by using the set
and unset commands. Of the variables referred to by the shell a
number are toggles; the shell does not care what their value is, only
whether they are set or not. For instance, the verbose variable is a toggle which causes command input to be echoed. The setting of this
variable results from the -v command line option.
Other operations treat variables numerically. The at-sign (@) command permits numeric calculations to be performed and the result
assigned to a variable. However, variable values are always
represented as (zero or more) strings. For the purposes of numeric
operations, the null string is considered to be zero, and the second and
subsequent words of multiword values are ignored.
After the input line is aliased and parsed, and before each command is
executed, variable substitution is performed, keyed by dollar sign ($)
characters. This expansion can be prevented by preceding the dollar
sign with a backslash (\) except within double quotation· marks (")
where it always occurs, and within single quotation marks (') where it
never occurs. Strings quoted by back quotation marks C) are interpreted later (see Command substitution below) so dollar sign substitution does not occur there until later, if at all. A dollar sign is passed
unchanged if followed by a blank, tab, or end-of-line.

May 16, 1988

Page 6

CSH(C)

CSH (C)

Input and output redirections are recognized before variable expansion, and are variable expanded separately. Otherwise, the command
name and entire argument list are expanded together. It is thus possible for the first (command) word to generate more than one word, the
first of which becomes the command name, and the rest of which
become arguments.
Unless enclosed in double quotation marks or given the :q modifier,
the results of variable substitution may eventually be command and
filename substituted. Within double quotation. marks (") a variable
whose value consists of multiple words expands to a portion of a single word, with the words of the variable's value separated by blanks.
When the :q modifier is applied to a substitution, the variable expands
to multiple words with each word separated by a blank and quoted to
prevent later command or filename substitution.
The following sequences are provided for introducing variable values
into the shell input. Except as noted, it is an error to reference a variable which is not set.
$name
${name}
Are replaced by the words of the value of variable name, each
separated by a blank. Braces insulate name from following
characters which would otherwise be part of it. Shell variables
have names consisting of up to 20 letters, digits, and underscores.
If name is not a shell variable, but is set in the environment, then that
value is returned (but : modifiers and the other forms given below are
not available in this case).

$name[selector]
${name[selector] }
May be used to select only some of the words from the value of
name. The selector is subjected to $ substitution and may consist of a single number or two numbers separated by a -. The
first word of a variables value is numbered 1. If the first number
of a range is omitted it defaults to 1. If the last member of a
range is omitted it defaults to $#name. The selector * selects all
words. It is not an error for a range to be empty if the second
argument is omitted or in range.
$#name
${#name}
Gives the number of words in the variable. This is useful for
later use in a [selector].
$0 Substitutes the name of the file from which command input is being
read. An error occurs if the name is not known.

May 16, 1988

Page 7

CSH (C)

CSH (C)

$number
$ {number}
Equivalent to $argv[number].
$* Equivalent to $argv[*].
The modifiers :h, :t, :r, :q and :x may be applied to the substitutions
above as may :gh, :gt and :gr. If braces { } appear in the command
form then the modifiers must appear within the braces. Only one :
modifier is allowed on each $ expansion.
The following substitutions may not be modified with: modifiers.
$?name
${?name}
Substitutes the string 1 if name is set, 0 if it is not.
$?O Substitutes 1 if the current input filename is known, 0 if it is not.
$$ Substitutes the (decimal) process number of the (parent) shell.
Command and Filename Substitution

Command and filename substitution are applied selectively to the
arguments of built-in commands. This means that portions of expressions which are not evaluated are not subjected to these expansions.
For commands which are not internal to the shell, the command name
is substituted separately from the argument list. This occurs very late,
after input-output redirection is performed, and in a child of the main
shell.
Command Substitution

Command substitution is indicated by a command enclosed in back
quotation marks. The output from such a command is normally broken into separate words at blanks, tabs and newlines, with null words
being discarded, this text then replacing the original string. Within
double quotation marks, only newlines force new words; blanks and
tabs are preserved.
In any case, the single final newline does not force a new word. Note
that it is possible for a command substitution to yield only part of a
word, even if the command outputs a complete line.

Filename Substitution
If a word contains any of the characters *, ?, [ or { or begins with the
character -, then that word is a candidate for filename substitution,
also known as globbing. This word is then regarded as a pattern, and
replaced with an alphabetically sorted list of filenames which match
the pattern. In a list of words specifying filename substitution it is an

May 16, 1988

Page 8

CSH (C)

CSH (C)

error for no pattern to match an existing filename, but it is not required
for each pattern to match. Only the metacharacters *, ?, and [ imply
pattern matching, the characters - and { being more akin to abbreviations.
In matching filenames, the character . at the beginning of a filename or

immediately following a /, as well as the character / must be matched
explicitly. The character * matches any string of characters, including
the null string. The character? matches any single character. The
sequence within square brackets [] matches anyone of the characters
enclosed. Within square brackets [], a pair of characters separated by
- matches any character lexically between the two.
The character - at the beginning of a filename is used to refer to home
directories. Standing alone, it expands to the invoker's home directory
as reflected in the value of the variable home. When followed by a
name consisting of letters, digits and - characters the shell searches for
a user with that name and substitutes their home directory; thus Ken
might expand to /usr/ken and Ken/chmach to /usr/ken/chmach. If the
character - is followed by a character other than a letter or / or appears
not at the beginning of a word, it is left unchanged.
The metanotation a{b,c,d}e is a shorthand for abe ace ade. Left to
right order is preserved, with results of matches being sorted
separately at a low level to preserve this order. This construct may be
nested. Thus -source/s 1/{oldls,ls }.c expands to /usr/source/s l/oldls.c
/usr/source/sl/ls.c, whether or not these files exist, assuming that the
home directory for source is /usr/source. Similarly ../{memo,*box}
might expand to ../memo ../box .. /mbox. (Note that memo was not
sorted with the results of matching *box.) As a special case {, } and
{} are passed unchanged.
Spelling Checker

Just as with the Bourne shell, when using cd(C) the shell checks spelling. For example, if you change to a different directory using cd and
misspell the directory name, the shell responds with an alternative
spelling of an existing directory. Enter "y" and press RETURN (or
just press RETURN) to change to the offered directory. If the offered
spelling is incorrect, enter "n", then retype the command line. In this
example the csh(C) response is boldfaced:
% cd /usr/spol/uucp
lusrlspool/uucp?y

ok

May 16, 1988

Page 9

CSH (C)

CSH (C)

Input/Output

The standard input and standard output of a command may be
redirected with the following syntax:
 name
>!name
>&name
>&! name
The file name is used as standard output. If the file does not
exist, then it is created; if the file exists, it is truncated, and its
previous contents are lost.
If the variable noclobber is set, then the file must not already
exist or it must be a character special file (e.g., a terminal or
/dev/null) or an error results. This helps prevent accidental destruction of files. In this case, the ! forms can be used and
suppress this check.
The forms involving & route the diagnostic output into the
specified file as well as the standard output. Name is expanded
in the same way as < input filenames are.
»name
»&name
»!name
»&! name
Uses file name as standard output like > but places output at the
end of the file. If the variable no clobber is set, then it is an error
for the file not to exist unless one of the ! forms is given. Otherwise similar to >.
If a command is run detached (followed by &) then the default standard input for the command is the empty file /dev/null. Otherwise, the
command receives the environment in which the shell was invoked as

May 16, 1988

Page 10

CSH (C)

CSH(C)

modified by the input-output parameters and the presence of the command in a pipeline. Thus, unlike some previous shells, commands run
from a file of shell commands have no access to the text of the commands by default; rather they receive the original standard input of the
shell. The« mechanism should be used to present inline data. This
permits shell command scripts to function as components of pipelines
and allows the shell to block read its input.
Diagnostic output may be directed through a pipe with the standard
output. Simply use the form I & rather than just I.

Expressions
A number of the built-in commands (to be described later) take
expressions, in which the operators are similar to those of C, with the
same precedence. These expressions appear in the @, exit, if, and
while commands. The following operators are available:

I I && I & == != <= >= < > «
+-*/%!-()
A

»

Here the precedence increases to the right, == and !=, <=, >=, <, and
>, « and », + and -, * / and % being, in groups, at the same level.
The == and != operators compare their arguments as strings, all others
operate on numbers. Strings which begin with 0 are considered octal
numbers. Null or missing arguments are considered O. The result of
all expressions are strings, which represent decimal numbers. It is
important to note that no two components of an expression can appear
in the same word; except when adjacent to components of expressions
which are syntactically significant to the parser (& I < > ( » they
should be surrounded by spaces.
Also available in expressions as primitive operands are command executions enclosed in { and } and file enquiries of the form -/ name
where / is one of:
r
w
x
e
0

z
f
d

Read access
Write access
Execute access
Existence
Ownership
Zero size
Plain file
Directory

The specified name is command and filename expanded, then tested to
see if it has the specified relationship to the real user. If the file does
not exist or is inaccessible then all enquiries return false, i.e. O. Command executions succeed, returning true, i.e. 1, if the command exits
with status 0, otherwise they fail, returning false, i.e. 0. If more
detailed status information is required then the command should be
executed outside of an expression and the variable status examined.

May 16, 1988

Page 11

CSH (C)

CSH (C)

Control Flow

The shell contains a number of commands which can be used to regulate the flow of control in command files (shell scripts) and (in limited
but useful ways) from terminal input. These commands all operate by
forcing the shell to reread or skip in its input and, due to the implementation, restrict the placement of some of the commands.
The foreach, switch, and while statements, as well as the if-then-else
form of the if statement require that the major keywords appear in a
single simple command on an input line as shown below.
If the shell's input is not seekable, the shell buffers up input whenever

a loop is being read and performs seeks in this internal buffer to
accomplish the rereading implied by the loop. (To the extent that this
allows, backward goto commands will succeed on nonseekable
inputs.)
Built-In Commands

Built-in commands are executed within the shell. If a built-in command occurs as any component of a pipeline except the last, then it is
executed in a subshell.
alias
alias name
alias name wordlist
The first form prints all aliases. The second form prints the alias
for name. The final form assigns the specified wordlist as the
alias of name; wordlist is command and filename substituted.
Name is not allowed to be alias or unalias
break
Causes execution to resume after the end of the nearest enclosing foreach or while statement. The remaining commands on
the current line are executed. Multilevel breaks are thus possible by writing them all on one line.
breaksw
Causes a break from a switch, resuming after the endsw.
case label:
A label in a switch statement as discussed below.
cd
cd name
chdir
chdir name
Changes the shell's working directory to directory name. If no
argument is given, it then changes to the home directory of the
user. If name is not found as a subdirectory of the current directory (and does not begin with /, ./, or .. j), then each component of

May 16,1988

Page 12

CSH (C)

CSH (C)

the variable cdpath is checked to see if it has a subdirectory
name. Finally, if all else fails but name is a shell variable
whose value begins with /, then this is tried to see if it is a directory.
continue
Continues execution of the nearest enclosing while or foreach.
The rest of the commands on the current line are executed.
default:
Labels the default case in a switch statement. The default
should come after all case labels.
echo wordlist
The specified words are written to the shell's standard output. A
\c causes the echo to complete without printing a newline. A \n
in wordlist causes a newline to be printed. Otherwise the words
are echoed, separated by spaces.
else
end
endif
endsw
See the description of the foreach, if, switch, and while statements below.

exec command
The specified command is executed in place of the current shell.
exit
exit(expr)
The shell exits either with the value of the status variable (first
form) or with the value of the specified expr (second form).
foreach name (wordlist)
end

The variable name is successively set to each member of
wordlist and the sequence of commands between this command
and the matching end are executed. (Bothforeach and end must
appear alone on separate lines.)
The built-in command continue may be used to continue the
loop prematurely and the built-in command break to terminate it
prematurely. When this command is read from the terminal, the
loop is read up once prompting with ? before any statements in
the loop are executed.
glob wordlist
Like echo but no \ escapes are recognized and words are delimited by null characters in the output. Useful for programs which
wish to use the shell to filename expand a list of words.

May 16, 1988

Page 13

CSH (C)

CSH(C)

goto word
The specified word is filename and command expanded to yield
a string of the form label. The shell rewinds its input as much as
possible and searches for a line of the form label: possibly preceded by blanks or tabs. Execution continues after the specified
line.
history
Displays the history event list.
if (expr) command
If the specified expression evaluates true, then the single command with arguments is executed. Variable substitution on
command happens early, at the same time it does for the rest of
the if command. Command must be a simple command, not a
pipeline, a command list, or a parenthesized command list.
Input/output redirection occurs even if expr is false, when command is not executed.
if (expr) then
else if (expr2) then
else
endif
If the specified expr is true then the commands to the first else
are executed; else if expr2 is true then the commands to the
second else are executed, etc. Any number of else-if pairs are
possible; only one endif is needed. The else part is likewise
optional. (The words else and endif must appear at the beginning of input lines; the if must appear alone on its input line or
after an else.)

logout
Terminates a login shell. The only way to log out if ignoreeof is
set.
nice
nice +number
nice command
nice +number command
The first form sets the nice for this shell to 4. By default, commands run under C-Shell have a "nice value" of O. The second
form sets the nice to the given number. The final two forms run
command at priority 4 and number respectively. The super-user
may specify negative niceness by using "nice -number .... " The
command is always executed in a subshell, and the restrictions
placed on commands in simple if statements apply.

May 16, 1988

Page 14

CSH (C)

CSH (C)

nohup
nohup command
The first form can be used in shell scripts to cause hangups to be
ignored for the remainder of the script. The second form causes
the specified command to be run with hangups ignored. Unless
the shell is running detached, nohup has no effect. All processes
detached with & are automatically nohuped. (Thus, nohup is
not really needed.)
onintr
onintr onintr label
Controls the action of the shell on interrupts. The first form
restores the default action of the shell on interrupts which is to
terminate shell scripts or to return to the terminal command
input level. The second form onintr - causes all interrupts to be
ignored. The final form causes the shell to execute a goto label
when an interrupt is received or a child process terminates
because it was interrupted.
In any case, if the shell is running detached and interrupts are
being ignored, all forms of onintr have no meaning and interrupts continue to be ignored by the shell and all invoked commands.

rehash
Causes the internal hash table of the contents of the directories
in the path variable to be recomputed. This is needed if new
commands are added to directories in the path while you are
logged in. This should only be necessary if you add commands
to one of your own directories, or if a systems programmer
changes the contents of one of the system directories.
repeat count command
The specified command which is subject to the same restrictions
as the command in the one line if statement above, is executed
count times. I/O redirection occurs exactly once, even if count
is o.

set
set name
set name=word
set name[index]=word
set name=(wordlist)
The first form of the command shows the value of all shell variabIes. Variables which have other than a single word as value
print as a parenthesized word list. The second form sets name to
the null string. The third form sets name to the single word. The
fourth form sets the indexth component of name to word; this
component must already exist. The final form sets name to the
list of words in wordlist. In all cases the value is command and
filename expanded.

May 16, 1988

Page 15

CSH (C)

CSH (C)

These arguments may be repeated to set multiple values in a
single set command. Note however, that variable expansion
happens for all arguments before any setting occurs.
setenv name value
Sets the value of the environment variable name to be value, a
single string. Useful environment variables are TERM, the type
of your terminal and SHELL, the shell you are using.
shift
shift variable
The members of argv are shifted to the left, discarding argv[lJ.
It is an error for argv not to be set or to have less than one word
as valu~. The. second form performs the same function on the
specified variable.
source name
The shell reads commands from name. Source commands may
be nested; if they are nested too deeply, the shell may run out of
file descriptors. An error in a source at any level terminates all
nested source commands. Input during source commands is
never placed on the history list.
switch (string)
case strl:
breaksw
default:
breaksw
endsw
Each case label is successively matched, against the specified
string which is first command and filename expanded. The file
metacharacters *, ?, and [... J may be used in the case labels,
which are variable expanded. If none of the labels match before
a default label is found, then the execution begins after the
default label. Each case label and the default label must appear
at the beginning of a line. The command breaksw causes execution to continue after the endsw. Otherwise control may fall
through case labels and default labels, as in C. .If no label
matches and there is no default, execution continues after the
endsw.
time
time command
With no argument, a summary of time used by this shell and its
children is printed. If arguments are given, the specified simple
command is timed and a time summary as described under the
time variable is printed. If necessary, an extra shell is created to
print the time statistic when the command completes.

May 16, 1988

Page 16

~

CSH (C)

CSH (C)

umask
umask value
The file creation mask is displayed (first form) or set to the
specified value (second form). The mask is given in octal.
Common values for the mask are 002 giving all access to the
group and read and execute access to others, or 022 giving all
access except no write access for users in the group or others.
unalias pattern
All aliases whose names match the specified pattern are discarded. Thus, all aliases are removed by unalias *. It is not an
error for nothing to be unaliased.
unhash
Use of the internal hash table to speed location of executed programs is disabled.
unset pattern
All variables whose names match the specified pattern are
removed. Thus, all variables are removed by unset *; this has
noticeably distasteful side-effects. It is not an error for nothing
to be unset.
wait
All child processes are waited for. If the shell is interactive,
then an interrupt can disrupt the wait, at which time the shell
prints names and process numbers of all children known to be
outstanding.

while (expr)
end
While the specified expression evaluates nonzero, the commands between the while and the matching end are evaluated.
Break and continue may be used to terminate or continue the
loop prematurely. (The while and end must appear alone on
their input lines.) Prompting occurs here the first time through
the loop as for the foreach statement if the input is a terminal.
@

@name=expr
@ name [index] = expr
The first form prints the values of all the shell variables. The
second form sets the specified name to the value of expr. If the
expression contains <, >, & or I then at least this part of the
expression must be placed within (). The third form assigns the
value of expr to the indexth argument of name. Both name and
its indexth component must already exist.
The operators *=, +=, etc. are available as in C. The space
separating the name from the assignment operator is optional.
Spaces are mandatory in separating components of expr which

May 16, 1988

Page 17

CSH (C)

CSH(C)
would otherwise be single words.
Special postfix ++ and -- operators increment and decrement
name respectively, i.e. @ i++.

Predefined Variables

The following variables have special meaning to the shell. Of these,
argv, child, home, path, prompt, shell and status are always set by the
shell. Except for child and status this setting occurs only at initialization; these variables will not be modified unless done explicitly by the
user.
The shell copies the environment variable PATH into the variable
path, and copies the value back into the environment whenever path is
set. Thus is is not necessary to worry about its setting other than in the
file .cshrc as inferior csh processes will import the definition of path
from the environment.
argv

Set to the arguments to the shell, it is from this variable that positional parameters are substituted, i.e.,
$1 is replaced by $argv[1], etc.

cdpath

Gives a list of alternate directories searched to find
subdirectories in cd commands.

child

The process number printed when the last command
was forked with &. This variable is unset when this
process terminates.

echo

Set when the -x command line option is given.
Causes each command and its arguments to be
echoed just before it is executed. For nonbuilt-in
commands all expansions occur before echoing.
Builtin commands are echoed before command and
filename substitution, since these substitutions are
then done selectively.

histchars

Can be assigned a two-character string. The first
character is used as a history character in place of !,
the second character is used in place of the " substitution mechanism. For example, set histchars=" ,;
will cause the history characters to be comma and
semicolon.
11

history

May 16, 1988

Can be given a numeric value to control the size of
the history list. Any command which has been
referenced in this many events will not be discarded. A history that is too large may run the shell
out of memory. The last executed command is
always saved on the history list.

Page 18

CSH (C)

CSH (C)

home

The home directory of the invoker, initialized from
the environment. The filename expansion of refers to this variable.

ignoreeof

If set, the shell ignores end-of-file from input devices that are terminals. This prevents a shell from
accidentally being terminated by pressing Ctrl-D.

mail

The files where the shell checks for mail. This is
done after each command completion which will
result in a prompt, if a specified interval has
elapsed. The shell responds with, "You have new
mail" if the file exists with an access time not
greater than its modify time.
If the first word of the value of mail is numeric, it
specifies a different mail checking interval: in
seconds, rather than the default, which is 10
minutes.
If multiple mail files are specified, then the shell
responds with "New mail in name", when there is
mail in the file name.

noclobber

As described in the section Input/Output, restrictions are placed on output redirection to insure that
files are not accidentally destroyed, and that »
redirections refer to existing files.

noglob

If set, filename expansion is inhibited. This is most
useful in shell scripts which are not dealing with
filenames, or after a list of filenames has been
obtained and further expansions are not desirable.

nonomatch

If set, it is not an error for a filename expansion to
not match any existing files; rather, the primitive
pattern is returned. It is still an error for the primitive pattern to be malformed, i.e., echo [ still gives
an error.

path

Each word of the path variable specifies a directory
in which commands are to be sought for execution.
A null word specifies the current directory. If there
is no path variable, then only full patbnames will
execute. The usual search path is /bin, jusr/bin, and
., but this may vary from system to system. For the
super-user, the default search path is jetc, /bin and
jusr/bin. A shell which is given neither the -c nor
the -t option will normally hash the contents of the
directories in the path variable after reading .cshrc ,
and each time the path variable is reset. If new
commands are added to these directories while the

May 16, 1988

Page 19

CSH (C)

CSH (C)

shell is active, it may be necessary to give the
rehash command, or the commands may not be

found.

prompt

The string which is printed before each command is
read from an interactive terminal input. If a !
appears in the string, it will be replaced by the
current event number unless a preceding \ is given.
Default is % ,or # for the super-user.

shell

The file in which the shell resides. This is used in
forking shells to interpret files which have execute
bits set, but which are not executable by the system.
(See the description of Nonbuilt-In Command Execution below.) Initialized to the (systemdependent) home of the shell.

status

The status returned by the last command. If it terminated abnormally, then 0200 is added to the
status. Built-in commands which fail return exit
status 1, all other built-in commands set status O.

time

Controls automatic timing of commands. If set,
then any command which takes more than this
many cpu seconds will cause a line giving user, sys- '
tern, real time, and a utilization percentage which is
the ratio of user plus system times to real time to be
printed when it terminates.

verbose

Set by the -v command line option, causes the
words of each command to be printed after history
substitution.

Nonbuilt-In Command Execution

When a command to be executed is found to not be a built-in command, the shell attempts to execute the command via exec (S). Each
word in the variable path names a directory from which the shell will
attempt to execute the command. If it is given neither a -c nor a -t
option, the shell will hash the names in these directories into an internal table so that it will only try an exec in a directory if there is a possibility that the command resides there. This greatly speeds command
location when a large number of directories are present in the search
path. If this mechanism has been turned off (via unhash), or if the
shell was given a -c or -t argument, and in any case for each directory
component of path which does not begin with a /, the shell concaten - (I
ates with the given command name to form a pathname of a file which \j
it then attempts to execute.

May 16, 1988

Page 20

CSH (C)

CSH (C)

Parenthesized commands are always executed in a subshell. Thus (cd
; pwd) ; pwd prints the home directory; leaving you where you were
(printing this after the home directory), while cd ; pwd leaves you in
the home directory. Parenthesized commands are most often used to
prevent cd from affecting the current shell.
If the file has execute permissions but is not an executable binary to
the. system, then it is assumed to be a file containing shell commands
and a new shell is spawned to read it.

If there is an alias for shell then the words of the alias are prepended
to the argument list to form the shell command. The first word of the
alias should be the full pathname of the shell (e.g. $shell). Note that
this is a special, late occurring, case of alias substitution, and only
allows words to be prepended to the argument list without
modification.
Argument List Processing
If argument 0 to the shell is - then this is a login shell. The flag arguments are interpreted as follows:
-c

Commands are read from the (single) following argument which
must be present. Any remaining arguments are placed in argv.

-e

The shell exits if any invoked command terminates abnormally
or yields a nonzero exit status.

-f

The shell will start faster, because it will neither search for nor
execute commands from the file .cshrc in the invoker's home
directory.

-i

The shell is interactive and prompts for its top-level input, even
if it appears to not be a terminal. Shells are interactive without
this option if their input and output are terminals.

-n

Commands are parsed, but not executed. This may aid in syntactic checking of shell scripts.

-s

Command input is taken from the standard input.

-t

A single line of input is read and executed. A \ may be used to
escape the newline at the end of this line and continue onto
another line.

-v

Causes the verbose variable to be set, with the effect that command input is echoed after history substitution.

-x

Causes the echo variable to be set, so that commands are echoed
immediately before execution.

May 16, 1988

Page 21

CSH(C)

CSH(C)

-V

Causes the verbose variable to be set even before .cshrc is executed.

-x

Causes the echo variable to be set even before .cshrc is executed.

After processing of flag arguments, if arguments remain but none of
the -c, -i, -s, or -t options were given, the first argument is taken as the
name of a file of commands to be executed. The shell opens this file,
and saves its name for possible resubstitution by $0. On a typical system, most shell scripts are written for the standard shell (see sh(C)),
the C shell will execute such a standard shell if the first character of a
script is not a # (i.e. if the script does not start with a comment).
Remaining arguments initialize the variable argv.

Signal Handling
The shell normally ignores quit signals. The interrupt and quit signals
are ignored for an invoked command if the command is followed by
&; otherwise the signals have the values which the shell inherited
from its parent. The shells handling of interrupts can be controlled by
onintr. Login shells catch the terminate signal; otherwise this signal is
passed on to children from the state in the shell's parent. In no case
are interrupts allowed when a login shell is reading the file .logout.

Files
-;'cshrc

Read at by each shell at the beginning
of execution

/etc/cshrc

Systemwide default cshrc file if none is present

-;'login

Read by login shell, after .cshrc at login

-/.logout

Read by login shell, at logout

/bin/sh

Shell for scripts not starting with a #

/tmp/sh*

Temporary file for <<

/dev/null

Source of empty file

/etc/passwd

Source of home directories for -name

Limitations
Words can be no longer than 512 characters. The number of arguments to a command which involves filename expansion is limited to
1/6 number of characters allowed in an argument list, which is 5120,
less the characters in the environment. Also, command substitutions

May 16, 1988

Page 22

CSH (C)

CSH (C)

may substitute no more characters than are allowed in an argument
list.
To detect looping, the shell restricts the number of alias substitutions
on a single line to 20.
See Also
accesseS), exec(S), fork(S), pipe(S), signal(S), umask(S), waiteS),
a.out(F), environ(M)
Credit
This utility was developed at the University of California at Berkeley
and is used with permission.
Notes
Built-in control structure commands like for each and while cannot be
used with I, & or;.
Commands within loops, prompted for by ?, are not placed in the history list.
It is not possible to use the colon (:) modifiers on the output of command substitutions.
The C-shell has many built-in commands with the same name and
functionality as Bourne shell commands. However, the syntax of
these C-shell and .Bourne shell commands often differs. One example
is the nice command, another is the echo command. Be sure to use the
correct syntax when working with these built-in C-shell commands.
When a C-shell user logs in, the system reads and executes commands
in letclcshrc before executing commands in the user's $HOMEI.cshrc.
You can, therefore, modify the C-shell environment for all users on the
system by editing letclcshrc.
During intervals of heavy system load, pressing the delete key while
at a C-shell prompt (%) may cause the shell to exit. If csh is the login
shell, the user is logged out.

csh attempts to import and export the PATH variable for use with regular shell scripts. This only works for simple cases, where the PATH
contains no command characters.
This version of csh does not support or use the process control features
of the 4th Berkeley Distribution.

May 16, 1988

Page 23

CSPLIT(C)

CSPLIT(C)

Name
csplit - Splits files according to context.
Syntax
csplit [-s] [-k] [-f prefix] file argl [... argn]
Description

csplit reads file and separates it into n+ 1 sections, defined by the
arguments argI . .. argn. By default the sections are placed in xxOO
••• xxn (n may not be greater than 99). These sections get the following pieces of file:
'
00:

From the start of file up to (but not including) the line referenced by arg1 .

01:

From the line referenced byargl up to the line referenced by
arg2.

n+ 1:

From the line referenced by argn to the end of file.

The options to csplit are:

-s

csplit normally prints the character counts for each file
created. If the -s option is present, csplit suppresses the
printing of all character counts.

-k

csplit normally removes created files if an error occurs. If
the -k option is present, csplit leaves previously created files
intact.

-f prefix If the -f option is used, the created files are named prefixOO
... prefixn. The default is xxOO . .. xxn.
The arguments (argl ... argn) to csplit can be a combination of the
following:

/rexp /

A file is to be created for the section from the current line up
to (but not including) the line containing the regular expression rexp. The current line becomes the line containing
rexp. This argument may be followed by an optional +or some number of lines (e.g., /Page/-5).

%rexp % This argument is the same as /rexp /, except that no file is
created for the section.

May 16, 1988

Page 1

CSPUT (C)

CSPLIT (C)

lnno

A file is to be created from the current line up to (but not
including) lnno. The current line becomes lnno.

{num}

Repeat argument. This argument may follow any of the
above arguments. If it follows a rexp type' argument, that
argument is applied num more times. If it follows lnno, the
file will be split every lnno lines (num times) from that
point.

Enclose all rexp type arguments that contain blanks or other characters meaningful to the shell in the appropriate quotation marks. Regular expressions may not contain embedded newlines. csplit does not
affect the original file; it is the users responsibility to remove it.
Examples
csplit -f cobol file '/procedure divisionr /parS./ /par16./
This example creates four files, cobolOO ... cobo163. After editing
the' 'split" files, they can be recombined as follows:
cat coboI0[0-3] > file
Note that this example overwrites the original file.
csplit -k file 100 {99}
This example would split the file at every 100 lines, up to 10,000 lines.
The -k option causes the created files to be retained if there are less
than 10,000 lines; however, an error message would still be printed.
csplit -kprog.c '%main(%' '/,,}/+1' {20}
Assuming that prog.c follows the normal C coding convention of ending routines with a } at the beginning of the line, this example will
create a file containing each separate C routine (up to 21) in prog.c.
See Also
ed(C), sh(C), regex(S)

May 16, 1988

Page 2

CSPLIT(C)

CSPUT(C)

Diagnostics
Self-explanatory except for:
arg - out of range
which means that the given argument did not reference a line between
the current position and the end of the file.

May 16, 1988

Page 3

CT(C)

CT(C)

Name
ct - spawn getty to a remote terminal
Syntax
ct [ -wn] [ -xn] [ -h ] [ -v ] [ -sspeed ] telno ...
Description
ct dials the telephone number of a modem that is attached to a terminal' and spawns a getty process to that terminal. Telno is a telephone
number, with equal signs for secondary dial tones and minus signs for
delays at appropriate places. (The set of legal characters for telno is 0
thru 9, -, =, *, and #. The maximum length telno is 58 characters). If
more than one telephone number is specified, ct will try each in succession until one answers; this is useful for specifying alternate dialing paths.
ct will try each ACU line listed in the file lusr/lib/uucp/Devices until
it finds an available line with appropriate attributes or runs out of
entries. If there are no free lines, ct will ask if it should wait for one,
and if so, for how many minutes it should wait before it gives up. ct
will continue to try to open the dialers at one-minute intervals until
the specified limit is exceeded. The dialogue may be overridden by
specifying the -wn option, where n is the maximum number of
minutes that ct is to wait for a line.

The -xn option is used for debugging; it produces a detailed output of
the program execution on stderr. The debugging level, n, is a single
digit; -x9 is the most useful value. If the -v option is used, ct will
send a running narrative to the standard error output stream.
Normally, ct will hang up the current line, so the line can answer the
incoming call. The -h option will prevent this action. The -h option
will also wait for the termination of the specified ct process before
returning control to the user's terminal.
The data rate may be set with the -s option, where speed is expressed
in baud. The default rate is 1200.
After the user on the destination terminal logs out, ct prompts, Reconnect? If the response does not begin with the letter y, the line will be
dropped; otherwise, getty will be started again and the login: prompt
will be printed.
To log out properly, the user must type control D.

June 29, 1988

Page 1

C'1'(C)

CT(C)

Of course, the destination terminal must be attached to a modem that
can answer the telephone .
. Files

/usr/lib/uucp/Devices
/usr/lib/uucp/LCK .. (tty-device )
/usr/adm/ctlog
See Also

cu(C), login(M), uucp(C), getty(M).
Notes
In hangup mode (-h not specified), when a suitable dialer has been
allocated, ct prompts "Proceed to hang-up?" If the response does not
begin with the letter y, the program simply exits. If you are logged in

on a computer through a local terminal and you want to connect a
remote terminal to the computer, you should use nohup with ct to
accomplish this:
nohup ct -h -sspeed phone
Mter the command is executed, a login prompt is displayed on the
remote terminal. The user can then log in and work on the computer
just as on a local terminal.

June 29, 1988

Page 2

CU(C)

CU(C)

Name
cu - call another XENIX/UNIX system
Syntax
CD [ -sspeed] [ -Iline ] [ -h] [ -t] [ -xn] [ -0 I-e I -oe] [ -n]
CD [ -s speed] [ -h ] [ -xn ] [ [ -0 I-e I-oe] -I line [ dir ]
CD [-h] [ -xn] [ -0 I-e I-oe] systemname

teIno

Description
cu calls up another UNIX system, a terminal, or possibly a non-UNIX
system. It manages an interactive conversation with possible transfers
of ASCII files.
cu accepts the following options and arguments:

-sspeed

Specifies the transmission speed (150, 300, 600, 1200,
2400, 4800, 9600, 19200, 38400); The default value is
"Any" speed which will depend on the order of the lines
in the /usr/lib/uucp/Devices file. Or a speed range may
be specified (for example, -s1200-4800).

-lline

Specifies a device name to use as the communication
line. This can be used to override the search that would
otherwise take place for the first available line having
the right speed. When the -I· option is used without the
-s option, the speed of a line is taken from the Devices
file. When the -I and -s options are both used together,
cu will search the Devices file to check if the requested
speed for the requested line is available. If so, the connection will be made at the requested speed; otherwise
an error message will be printed and the call will not be
made. The specified device is generally a directly connected asynchronous line (e.g., /dev/ttyab) in which
case a telephone number (telno) is not required. The
specified device need _not be in the Idev directory. If
the specified device is associated with an auto dialer, a
telephone number must be provided. Use of this option
with systemname rather than telno will not give the
desired result (see systemname below).

-h

Emulates local echo, supporting calls to other computer
systems which expect terminals to be set to half-duplex
mode.

-t

U sed to dial an ASCII terminal which has been set to
auto answer. Appropriate mapping of carriage-return to
carriage-retum-line-feed pairs is set.

July 5, 1988

Page 1

CU(C)

CU(C)

-xn

Causes diagnostic traces to be printed; it produces a
detailed output of the program execution on stderr. The
debugging level, n, is a single digit; -x9 is the most
useful value.

-n

For added security, will prompt the user to provide the
telephone number to be dialed rather than taking it
from the command line.

telno

When using an automatic dialer, the argument is the
telephone number with equal signs for secondary dial
tone or minus signs placed appropriately for delays of 4
seconds.

systemname

A uucp system name may be used rather than a telephone number; in this case, cu will obtain an appropriate direct line or telephone number from
/llsr/lib/llllep/Systems. Note: the systemname option
should not be used in conjunction with the -I and -s
options as cu will connect to the first available line for
the system name specified, ignoring the requested line
and speed.

dir

The keyword dir can be used with ell -lline, in order to
talk directly to a modem on that line, instead of talking
to another system via that modem; this can be useful
when debugging or checking modem operation. Note:
only users with write access to the Devices file are permitted to use ell -IUne dir.

ill addition, cu uses the following options to determine communications settings:
-0

If the remote system expects or sends 7-bit with odd parity.

-e If the remote system expects or sends 7-bit with even parity.
-oe
If the remote system expects or sends 7-bit, ignoring parity and

sends 7-bit with either parity.
By default, cu expects and sends 8-bit characters without parity. If the
login prompt received appears to contain incorrect 8-bit characters, or
a correct login is rejected, use the 7-bit options described above.
After making the connection, cu runs as two processes: the transmit
process reads data from the standard input and, except for lines beginning with -, passes it to the remote system; the receive. process accepts
data from the remote system and, except for lines beginning with -,
passes it to the standard output. Normally, an automatic DC3/DC1
protocol is used to control input from the remote so the buffer is not
overrun. Lines beginning with - have special meanings.

July 5, 1988

Page 2

CU(C)

CU(C)

The transmit process interprets the following user initiated commands:
terminate the conversation.
escape to an interactive shell on the local system.
-!cmd ...

run cmd on the local system (via sh -c).

-$cmd ...

run cmd locally and send its output to the
remote system.

-%cd

change the directory on the local system.
Note: -!cd will cause the command to be run
by a sub-shell, probably not what was
intended.

-%take from [ to ]

copy file from (on the remote system) to file
to on the local system. If to is omitted, the
from argument is used in both places.

-%put from [ to ]

copy file from (on local system) to file to on
remote system. If to is omitted, the from
argument is used in both places.
For both -%take and put commands, as each
block of the file is transferred, consecutive
single digits are printed to the terminal.

-- line

send the line - line to the remote system.

-%break

transmit a BREAK to the remote system
(which can also be specified as -%b).

-%debug

toggles the -x debugging level between 0 and
9 (which can also be specified as -%d).
prints the values of the termio structure variabIes for the user's terminal (useful for
debugging).

-I

prints the values of the termio structure variabIes for the remote communication line
(useful for debugging).

-%nostop

toggles between DC3/DCl input control protocol and no input control. This is useful in
case the remote system is one which does not
respond properly to the DC3 and DCI characters.

July 5,1988

Page 3

CU(C)

CU(C)

The receive process nonnally copies data from the remote system to
its standard output. Internally the program accomplishes this by initiating an output diversion to a file when a line from the remote begins
with Data from the remote is diverted (or appended, if » is used) to file on
the local system. The trailing -> marks the end of the diversion.
The use of -%pot requires stty(C) and cat(C) on the remote side. It
also requires that the current erase and kill characters on the remote
system be identical to these current control characters on the local
system. Backslashes are inserted at appropriate places.
The use of -%take requires the existence of echoeS) and cat (C) on the
remote system. Also, tabs mode (See stty(C)) should be set on the
remote system if tabs are to be copied without expansion to spaces.
When cu is used on system X to connect to system Y and subsequently
used on system Y to connect to system Z, commands on system Y can
be executed by using -. Executing a tilde command reminds the user
of the local system uname. For example, uname can be executed on Z,
X, and Y as follows:
uname
Z
-[X]!uname
X

-[Y]!uname
Y
In general, - causes the command to be executed on the original
machine, -- causes the command to be executed on the next machine
in the chain.
Examples
To dial a system whose telephone number is 9 201 555 1212 using
1200 baud (where It 1 t is expected after the 9):
cu -s1200 9=12015551212
If the speed is not specified, "Any" is the default value.

To login to a system connected by a direct line:
cu -1 IdevItty XX
or
cu -1 ttyXX

July 5, 1988

Page 4

CU(C)

CU(C)

To dial a system with the specific line and a specific speed:
cu -s1200 -1 ttyXX
To dial a system using a specific line associated with an auto dialer:
cu -1 ttyXX 9=12015551212
To use a system name:
cu systemname
To talk directly to an ACU:
cu -lttyXX dir
Files
/usr/lib/uucp/Systems
/usr/lib/uucp/Devices
/usr/lib/uucp/LCK .. (tty-device)
See Also
cat(C), ct(C), echo(S), stty(C), uucp(C), uname(C).
Diagnostics
Exit code is zero for normal exit, otherwise, one.
Warnings
The cu command does not do any integrity checking on data it
transfers. Data fields with special cu characters may not be transmitted properly. Depending on the interconnection hardware, it may be
necessary to use a -. to terminate the conversion even if stty 0 has
been used. Non-printing characters are not dependably transmitted
using either the -%put or -%take commands. cu between an IMBRI
and a penril modem will not return a login prompt immediately upon
connection. A carriage return will return the prompt.
Notes
There is an artificial slowing of transmission by cu during the -%put
operation so that loss of data is unlikely.

July 5, 1988

Page 5

DATE (C)

DATE (C)

Name

date - Prints and sets the date.
Syntax
date [mmddhhmm[yy] ] [+fonnat]
Description

If no argument is given, or if the argument begins with +, the current
date and time are printed. Otherwise, the current date is set. The first
mm is the month number; dd is the day number in the month; hh is the
hour number (24-hour system); the second mm is the minute number;
yy is the last 2 digits of the year number and is optional. For example:
date 10080045
sets the date to Oct 8, 12:45 AM. The current year is the default if no
year is mentioned. The system operates in GMT. date takes care of
the conversion to and from local standard and daylight time.
If the argument begins with +, the output of date is under the control
of the user. The fonnat for the output is similar to that of the first
argument to print! (S). All output fields are of fixed size (zero padded
if necessary). Each field descriptor is preceded by a percent sign (%)
and will be replaced in the output by its corresponding value. A single
percent sign is encoded by doubling the percent sign, i.e., by specifying "%%". All other characters are copied to the output without
change. The string is always tenninated with a newline character.
Field Descriptors:
n

Inserts a newline character

t

Inserts a tab character

m

Month of year - 01 to 12

d

Day of month - 01 to 31

y

Last 2 digits of year - 00 to 99

D

Date as mm/dd/yy

H

Hour - 00 to 23

M

Minute - 00 to 59

May 16, 1988

Page 1

DATE (C)

DATE (C)

S

Second - 00 to 59

T

Time as HH:MM:SS

j

Julian date - 001 to 366

w

Day of the week - Sunday = 0

a

Abbreviated weekday - Sun to Sat

h

Abbreviated month - Jan to Dec

r

Time in AM/PM notation

Example

The line
date /+DATE: %m/%d/%y%nTIME: %H:%M:%S/
generates as output:
DATE: 08/01/76
TIME: 14:45:05
Diagnostics

no permission

You aren't the super-user and you are trying to
change the date.

bad conversion

The date set is syntactically incorrect.

bad format character The field descriptor is not recognizable.

May 16, 1988

Page 2

DC(C)

DC(C)

Name

dc - Invokes an arbitrary precision calculator.
Syntax
dc [ file]
Description
de is an arbitrary precision arithmetic package. Ordinarily it operates
on decimal integers, but you may specify an input base, output base,
and a number of fractional digits to be maintained. The overall structure of de is a stacking (reverse Polish) calculator. If an argument is
given, input is taken from that file until its end, then from the standard
input. The following constructions are recognized:
number
The value of the number is pushed on the stack. A number is
an unbroken string of the digits 0-9. It may be preceded by an
underscore C) to input a negative number. Numbers may contain decimal points.

+-/*%"
The top two values on the stack are added (+), subtracted (-),
multiplied (*), divided (/), remaindered (%), or exponentiated
("). The two entries are popped off the stack; the result is
pushed on the stack in their place. Any fractional part of an
exponent is ignored.
sx

The top of the stack is popped and stored into a register named
x, where x may be any character. If the s is capitalized, x is
treated as a stack and the value is pushed on it.

Ix

The value in register x is pushed on the stack. The register x is
not altered. All registers start with zero value. If the I is capitalized' register x is treated as a stack and its top value is
popped onto the main stack.

d

The top value on the stack is duplicated.

p

The top value on the stack.is printed. The top value remains
unchanged. p interprets the top of the stack as an ASCII string,
removes it, and prints it.

f

All values on the stack are printed.

q

Exits the program. If executing a string, the recursion level is
popped by two. If q is capitalized, the top value on the stack is
popped and the string execution level is popped by that value.

May 16, 1988

Page 1

DC (C)

DC (C)

x

Treats the top element of the stack as a character string and
executes it as a string of de commands.

X

Replaces the number on the top of the stack with its scale factor.

[ ... ]

Puts the bracketed ASCII string onto the top of the stack.

x =x

The top two elements of the stack are popped and compared.
Register x is evaluated if they obey the stated relation.
v

Replaces the top element on the stack by its square root. Any
existing fractional part of the argument is taken into account,
but otherwise the scale factor is ignored.
Interprets the rest of the line as a XENIX command.

c

All values on the stack are popped.

The top value on the stack is popped and used as the number
radix for further input.
I

Pushes the input base on the top of the stack.

o

The top value on the stack is popped and used as the number
radix for further output.

o

Pushes the output base on the top of the stack.

k

The top of the stack is popped, and that value is used as a nonnegative scale factor; the appropriate number of places are
printed on output, and maintained during multiplication, division, and exponentiation. The interaction of scale factor, input
base, and output base will be reasonable if all are changed
together.

z

The stack level is pushed onto the stack.

z

Replaces the number on the top of the stack with its length.

?

A line of input is taken from the input source (usually the terminal) and executed.

,.

Used by be for array operations.

Example
This example prints the first ten values of nl :

May 16,1988

Page 2

DC (C)

DC (C)

[lal +dsa*plaIO>y]sy
Osal
lyx
See Also

bc(C)
Diagnostics
x is unimplemented

The octal number x corresponds to a character
that is not implemented as a command

stack empty

Not enough elements on the stack to do what
was asked

Out of space

The free list is exhausted (too many digits)

Out of headers

Too many numbers being kept around

Out of pushdown

Too many items on the stack

Nesting Depth

Too many levels of nested execution

Notes
bc is a preprocessor for de, providing infix notation and a C-like syntax which implements functions and reasonable control structures for
programs. For interactive use, be is preferred to de .

May 16,1988

Page 3

DD (C)

DD(C)

Name
dd - Converts and copies a file.
Syntax
dd [option=value] ...
Description
dd copies the specified input file to the specified output with possible
conversions. The standard input and output are used by default. The
input and output block size may be specified to take advantage of raw
physical I/O.

Option

Value

if=Jile

Input filename; standard input is default

of=Jile

Output filename; standard output is default

ibs=n

Input block size n bytes (default is BSIZE block size)

obs=n

Output block size (default is BSIZE block size)

bs=n

Sets both input and output block size, superseding ibs
and obs; also, if no conversion is specified, it is particularly efficient since no in-core copy needs to be
done

cbs=n

Conversion buffer size

skip=n

Skips n input records before starting copy

seek=n

Seeks n records from beginning of output file before
copying

count=n

Copies only n input records

conv=ascii

Converts EBCDIC to ASCII

conv=ebcdic

Converts ASCII to EBCDIC

conv=ibm

Slightly different map of ASCII to EBCDIC

conv=lcase

Maps alphabetics to lowercase

May 16, 1988

Page 1

DD (e)

DD (e)

Option

Value

conv=ucase

Maps alphabetics to uppercase

conv=swab

Swaps every pair of bytes

conv=sync

Pads every input record to ibs

conv=" •.. , ..."
Several comma-separated conversions
Where sizes are specified, a number of bytes is expected. A number
may end with k, b, or w to specify multiplication by 1024, 512, or 2
respectively; a pair of numbers may be separated by x to indicate a
product.
Cbs is used only if ascii or ebcdic conversion is specified. In the
former case cbs characters are placed into the conversion buffer, converted to ASCII, and trailing blanks trimmed and newline added before
sending the line to the output. In the latter case ASCII characters are
read into the conversion buffer, converted to EBCDIC, and blanks
added to make up an output record of size cbs.

After completion, dd reports the number of whole and partial input
and output blocks.
Examples
This command reads an EBCDIC tape, blocked ten 80-byte EBCDIC
card images per record, into the ASCII file outfile :
dd if=/dev/rmtO of=outfile ibs=800 cbs=80 conv=ascii,lcase
Note the use of raw magtape. dd is especially suited to I/O on raw
physical devices because it allows reading and writing in arbitrary
record sizes.
See Also
copy(e), cp(e), tar(e)
Diagnostics
~

j+p records in(out)

May 16, 1988

Numbers of full and partial records
read( written)

Page 2

(~

DD (C)

DD(C)

Notes

The ASCII/EBCDIC conversion tables are taken from the 256character standard in the CACM Nov, 1968. The ibm conversion
corresponds better to certain IBM print train conventions. There is no
universal solution.
Newlines are inserted only on conversion to ASCII; padding is done
only on conversion to EBCDIC.
When using dd with a raw device, specify the block size as a multiple
of 1K. For example, to use a 9K block size, enter:
dd if=file of=/dev/rfdO bs= 18b
You could also enter:
dd if=file of=/dev/rfdO bs=9K

May 16, 1988

Page 3

DEVNM(C)

DEVNM(C)

Name
devnm - Identifies device name.
Syntax

letc/devnm [names]
Description
Devnm identifies the special file associated with the mounted file system where the argument name resides.

This command is most commonly used by letc/rc to construct a mount
table entry for the root device.
Examples
Be sure to type full pathnames in this example:
/etc/devnm /usr
If Idev/hdl is mounted on lusr, this produces:
hd1/usr
Files
/dev/*

Device names

/etc/rc

Xenix startup commands

See Also
setmnt(ADM)

May 16,1988

Page 1

DF(C)

DF(C)

Name
df - Report number of free disk blocks.

Syntax
df [ -t ] [ -f] [ -v -i ] [file-systems]

Description

df prints out the number of free blocks and free inodes available for
on-line file systems by examining the counts kept in the super-blocks;
file-systems may be specified by device name (e.g., Idev/root). If the
file -systems argument is unspecified, the free space on all of the
mounted file systems is sent to the standard output. The list of
mounted file systems is given in letc/mnttab.
Options include:

-t

Causes total allocated block figures to be reported as well as
number of free blocks.

-f

Reports only an actual count of the blocks in the free list (free
inodes are not reported). With this option, df reports on raw
devices.

-v

Reports the percent of blocks used as well as the number of
blocks used and free.

-i

Reports the percent ·of inodes used as well as the number of
inodes used and free. Use the -i option with the -v option to
display counts of blocks and inodes free as well as the percentage of inodes and blocks used.

The -v and -i options can not be used with other df options.

Files
/dev/*
/etc/mnttab

See Also
mount(ADM), fsck(ADM), mnttab(F)

May 16,1988

Page 1

DF(C)

DF(C)

Notes

See Notes under mount(ADM).
This utility reports sizes in 512 byte blocks. On systems which use
1024 byte blocks, this means a file of 500 bytes uses 2 blocks. df will
report 2 blocks less free space, rather than 1 block, since the file uses
one system block of 1024 bytes. Refer to the machine(HW) manual
page for the block size used by your system.

May 16,1988

Page 2

DIFF (C)

DIFF (C)

Name

diff - Compares two text files.
Syntax
diff [ -efbh ] file 1 file2
Description

diff tells what lines must be changed in two files to bring them into
agreement. If file I or file2 is a dash (-), the standard input is used. If
filel or file2 is a directory, diff uses the file in that directory that has
the same name as file lfile2 or filel respectively) it is compared to.
For example:
diff Itmp dog
compares the file named dog, that is in the Itmp directory, with the file
dog in the current directory. The normal output contains lines of these
forms:

nl a nJ,n4
nl,n2 d nJ
nl,n2 c n3,n4
These lines resemble ed commands to convert filel into file2. The
numbers after the letters pertain to file2. In fact, by exchanging a for
d and reading backward, one may ascertain equally how to convert
file2 into filel. As in ed, identical pairs where nl = n2 or n3 = n4 are
abbreviated as a single number.
Following each of these lines come all the lines that are affected in the
first file flagged by <, then all the lines that are affected in the second
file flagged by >.
The -b option causes trailing blanks (spaces and tabs) to be ignored
and other strings of blanks-to compare equal.
The -e option produces a script of a, c and d commands for the editor
ed, which will recreate file2 fromfilel. The -f option produces a similar script, not useful with ed, in the opposite order. In connection with
-e, the following shell procedure helps maintain multiple versions of a
file:
(shift; cat $*; echo /1,$p/) led - $1
This works by performing a set of editing operations on an original
ancestral file. This is done by combining the sequence of ed scripts
given as all command line arguments except the first. These scripts

May 16, 1988

Page 1

DIFF (C)

DIFF (C)

are presumed to have been created with diff in the order given on the
command line. The set of editing operations is then piped as an editing script to ed where all editing operations are perfonned on the
ancestral file given as the first argument on the command line. The
final version of the file is then printed on the standard output. Only an
ancestral file ($1) and a chain of version-to-version ed scripts
($2,$3, ... ) made by diffneed be on hand.
Except in rare circumstances, diff finds the smallest sufficient set of
file differences.
The -h option does a fast, less-rigorous job. It works only when
changed stretches are short and well separated, but also works on files
of unlimited length. The -e and -f cannot be used with the -h option.

Files
/tmp/d?????
/usr/lib/diffh for -h

See Also
cmp(C), comm(C), ed(C)

Diagnostics
Exit status is 0 for no differences, 1 for some dIfferences, 2 for errors.

Notes
Editing scripts produced under the -e or -f option do not always work
correctly on lines consisting of a single period (.).

May 16, 1988

Page 2

DIFF3 (C)

DIFF3 (C)
Name

diff3 - Compares three files.
Syntax
diff3 [ -ex3 ] file 1 file2 file3
Description
diff3 compares three versions of a file, and publishes disagreeing
ranges of text flagged with these codes:

All three files differ
:;====1

FileI is different

====2

File2 is different

====3

File3 is different

The type of change suffered in converting a given range of a given file
to some other range is indicated in one of these ways:
f: nI a

Text is to be appended after line number nl in
file f, where f = 1, 2, or 3.

f: nl ,n2 c

Text is to be changed in the range line nl to
line n2. If nl = n2, the range may be abbreviated to nl.

The original contents of the range follows immediately after a c indication. When the contents of two files are identical, the contents of
the lower-numbered file is suppressed.
Under the -e option, dijJ3 publishes a script for the editor ed that will
incorporate into filel all changes between file2 and file3, i.e., the
changes that normally would be flagged ==== and =:;===3. The -x
option produces a script to incorporate changes flagged with "====".
Similarly, the -3 option produces a script to incorporate changes
flagged with "====3". The following command applies a resulting
editing script to filel :
(cat script; echo '1,$p') I ed - filel

May 16,1988

Page 1

DIFF3 (C)

DIFF3 (C)

Files
/tmp/d3*
, /usr/lib/diff3prog
See Also
diff(C)
Notes
The -e option does not work properly for lines consisting of a single
period.
The input file size limit is 64K bytes.

May 16, 1988

Page 2

DIRCMP (C)

DIRCMP (C)

Name
dircmp - Compares directories.

Syntax
dircmp [ -d ] [ -s ] [ -wn ] dirl dir2
Description
dircmp examines dir1 and dir2 and generates tabulated information

about the contents of the directories. Listings of files that are unique
to each directory are generated in addition to a list that indicates
whether the files common to both directories have the same contents.
There are three options available:
-d

Performs a full diff on each pair of like-named files if the
contents of the files are not identical.

-s

Suppresses output of identical filenames.

-w n

Changes the width of the output line to n characters. The
default width is 72.

See Also
cmp(C), diff(C).

May 16, 1988

Page 1

DIRNAME(C)

DIRNAME (C)

Name
dirname - Delivers directory part of pathname.
Syntax
dirname string
Description
dirname delivers all but the last component of the pathname in string
and prints the result on the standard output. If there is only one component in the pathname, only a "dot" is printed. It is normally used
inside substitution marks (, ,) within shell procedures.

The companion command base name deletes any prefix ending in a
slash (I) and the suffix (if present in string) from string, and prints the
result on the standard output.
Examples
The following example sets the shell variable NAME to /usr/src/cmd:
NAME=' dirname /usr/src/cmd/cat.c'

This example prints /a/h/c on the standard output:
dirname /a/b/c/d
This example prints a "dot" on the standard output:
dirname file.ext
See Also
basename(C), sh(C)

May 16,1988

Page 1

DISABLE (C)

DISABLE (C)

Name

disable - Thrns off terminals and printers.
Syntax
disable tty ...
disable [-c] [-r[reason]] printers

Description
For terminals, this program manipulates the /etc/ttys file and signals
in it to disallow logins on a particular terminal. For printers, disable
stops print requests from being sent to the named printer. The following options can be used:
-c

Cancels any requests that are currently printing.

-r[reason]

Associates a reason with disabling the printer. The reason applies to all printers listed up to the next -r option.
If the -r option is not present or the -r option is given
without a reason, then a default reason is used. Reason
is reported by Ipstat(C).

Examples
In this example, a printer named linepr is disabled because of a paper
jam:

disable -r"paper jam" linepr
Files
/dev/tty*
/etc/ttys
/usr/spool/lp/*
See Also

10gin(M), enable(C), ttys(F), getty(M), init(M), Ip(C), Ipinit(ADM),
Ipstat(C), ungetty(M)

May 16,1988

Page 1

DISKCP (C)

DISKCP (C)

Name
diskcp, diskcmp - Copies, compares floppy disks.

Syntax
diskcp [-f] [-d] [-s] [-48ds9] [ -96ds9] [ -96ds15] [ -135ds9] [ -135ds18]
diskcmp [ -d] [ -s] [ -48ds9] [ -96ds9] [-96ds15] [ -135ds9] [ -135ds18]

Description
diskcp is used to make an image (exact copy) of a source floppy disk
on a target floppy disk. On machines with one floppy drive diskcp
temporarily transfers the image to the hard disk until a blank' 'target' '
floppy is inserted into the floppy drive. On machines with two floppy
drives diskcp immediately places the image of the source floppy
directly on the target floppy.

The options are:
-f Format the target floppy disk before the image is copied (diskcp
only).
-d The computer has dual floppy drives. diskcp copies the image
directly onto the target floppy.
-s Uses sum( C) to compare the contents of the source and target

floppies; gives an error message if the two do not match.
-48ds9
This setting is for low density 48tpi floppies. It is the default setting.

-96ds9
This setting is for high density 96tpi floppies.
-96ds15
This setting is for quad density 96tpi floppies.
-135ds9
This setting is for high density 135tpi 3.5 inch floppies.
-135ds18
This setting is for quad density 135tpi 3.5 inch floppies.

May 16, 1988

Page 1

DISKCP (C)

DISKCP (C)

When using the -96ds9 and -96ds15 options of diskcp, if the first target disk is unfonnatted, the program will note it, fonnat it and make
the copy. If another copy is requested and another unfonnatted target
disk inserted, diskcp exits with a "System Error." Quit, fonnat the
floppy, and reinvoke diskcp to make another copy.
diskcmp functions similarly to diskcp. It compares the contents of one
floppy disk with the contents of a second floppy disk using the cmp
utility.

Examples
To make a copy of a floppy, place the source floppy in the drive and
type:
diskcp
When diskcp is finished copying to the hard disk, it prompts you to
insert the target floppy in the drive. If you specify the -f flag when you
invoke diskcp , the program fonnats the target floppy. When
the copy is finished, diskcp prompts if you would like to make another
copy of the same source disk. If you enter 'n', it prompts if you would
like to copy another source disk.
Specify the -d flag on the command line if you have two floppy drives:
diskcp -d
Notes
If diskcp encounters a write error while copying the source image to
the target disk, it fonnats the disk and tries to write the source image
again. This happens most often when an unfonnatted floppy is used
and the -f flag is not specified.

Files
/usr/bin/diskcp
/usr/bin/diskcmp
/tmp/disk$$
See Also
cmp(C), dd(C), sum(e)

May 16, 1988

Page 2

DOS (C)

DOS (C)

Name
dos, doscat, doscp, dosdir, dosformat, dosmkdir, dosls, dosrm,
dosrmdir - Access to and manipulation of DOS files.
Syntax
doscat [ -r I -m] file ...
doscp [ -r I-m ] file1 file2
doscp [ -r I-m ] file ... directory
dosdir directory ...
dosformat [-fqv] drive
dosls directory ...
dosmkdir directory ...
dosrm file ...
dosrmdir directory ...
Description
The dos commands provide access to the files and directories on MSDOS disks and on a DOS partition of a hard disk. Note that in order to
use these commands on a DOS partition of a hard disk, the partition
must be bootable, although not active.
The dos commands perform the following actions:
doscat

Copies one or more DOS files to the standard output. If
-r is given, the files are copied without newline conversions. If -m is given, the files are copied with newline
conversions (see "Conversions" below).

doscp

Copies files between a DOS disk and a XENIX filesystern. If filel and file2 are given, filel is copied to file2 .
If a directory is given, one or more file s are copied to
that directory. If -r is given, the files are copied
without newline conversions. If -m is given, the files
are copied with newline conversions (see "Conversions" below).

dosdir

Lists DOS files in the standard DOS style directory format.

May 16,1988

Page 1

DOS (C)

DOS (C)

dosformat

Creates a DOS 2.0 formatted diskette. The drive may
be specified in either DOS drive convention, using the
default file /etc/default/msdos, or using the XENIX special file name. dosformat cannot be used to format a
hard disk. The -f option suppresses the interactive
feature. The -q (quiet) option is used to suppress information normally displayed during dosformat . The -q
option does not suppress the interactive feature. The-v
option prompts the user for a volume label after the
diskette has been formatted. The maximum size of the
volume label is 11 characters.

dosls

Lists DOS directories and files in a XENIX style (see
Is(C».

dosrm

Removes files from a DOS disk.

dosmkdir

Creates a directory on a DOS disk.

dosrmdir

Deletes directories from a DOS disk.

The file and directory arguments for DOS files and directories have the
form:
device:name
where device is a XENIX pathname for the special device file containing the DOS disk, and name is a pathname to a file or directory on the
DOS disk. The two components are separated by a colon (:). For
example, the argument:
/devIfdO:/src/file.asm
specifies the DOS file, file.asm, in the directory, /src, on the disk in the
device file /dev/fdO. Note that slashes (and not backslashes) are used
as filename separators for DOS pathnames. Arguments without a device: are assumed to be XENIX files.
For
convenience,
the
user
configurable
default
file,
/etc/default/msdos, can define DOS drive names to be used in place of
the special device file pathnames. It may contain the following lines:
A==/devIfdO
C==/dev/hdOd
D==/dev/hdld
The drive letter "A" may be used in place of special device file pathname /dev/fdO when referencing DOS files (see "Examples" below):
The drive letter "C" or "D" refer to the DOS partition on the first or
second hard disk.

May 16,1988

Page 2

DOS (C)

DOS (C)

The commands operate on the following kinds of disks:
DOS partitions on a hard disk
5 1/4 inch DOS
3 1/2 inch DOS
8,9, 15, or 18 sectors per track
40 tracks per side
1 or 2 sides
DOS versions 1.0, 2.0 or 3.0
Conversions

In the case of doscp, certain conversions are performed when copying
a XENIX file. Filenames with a basename longer than eight characters
are truncated. Filename extensions (the part of the name following
separating period) longer than three characters are truncated. For
example, the file 123456789.12345 becomes 12345678.123. A message informs the user that the name has been changed and the altered
name is displayed. Filenames containing illegal DOS characters are
stripped when writing to the MS-DOS format. A message informs the
user that characters have been removed and displays the name as written.

All DOS text files use a carriage-retuml1inefeed combination, CR-LF,
to indicate a newline. XENIX uses a single newline LF character.
When the doscat and doscp commands transfer DOS text files to
XENIX , they automatically strip the CR. When text files are
transferred to DOS, the commands insert a CR before each LF character.
Under some circumstances the automatic newline conversions do not
occur. The -m option may be used to ensure the newline conversion.
The -r option can be used to override the automatic conversion and
force the command to perform a true byte copy regardless of file type.
Examples

doscat /dev/fdO:/docs/memo.txt
doscat /tmp/fl /tmp/f2/dev/fdO:/src/file.asm
dosdir /dev/fdO:/src
dosdir A:/src A:/dev
doscp /tmp/myfile.txt /dev/fdO:/docs/memo.txt
doscp /tmp/fl /tmp/f2 /dev/fdO:/mydir
dosformat A:
dosformat/dev/fdO
dosls /dev/fdO:/src
dosls B:

May 16, 1988

Page 3

DOS (C)

DOS (C)

dosmkdir /dev/fdO:/usr/docs
dosnn /dev/fdO:/docs/memo.txt
dosnn A:/docs/memo 1. txt
dosnndir /dev/fdO:/usr/docs
Files
/etc/default/msdos

Default infonnation

/dev/fd*

Floppy disk devices

/dev/hd*

Hard disk devices

See Also
assign(C), dtype(C)
Notes

It is not possible to refer to DOS directories with wild card
specifications. The programs mentioned above cooperate among
themselves so no two programs will access the same DOS disk. Only
one process will access a given DOS disk at any time, while other
processes wait. If a process has to wait too long, it displays the error
message, "can't seize a device," and exits with an exit code of 1.
The following hard disk devices:
/dev/hdOd
/dev/rhdOd
/dev/hdld
/dev/rhdld
are similar to /dev/hdOa in that the disk driver determines which partition is the DOS partition and uses that as hd? d. This means that
software using the DOS partition does not need to know which partition is DOS (the disk driver detennines that).
The XENIX Development System supports the creation of DOS executable files, using cc (CP). Refer to the XENIX C User's Guide and C
Library Guide for more infonnation on using XENIX to create programs suitable for DOS systems.
All of the DOS utilities leave temporary files in Itmp. These files are
automatically removed when the system is rebooted. They can also be
manually removed.

May 16, 1988

Page 4

DTYPE(C)

DTYPE(C)

Name
dtype - Determines disk type.
Syntax
dtype [-s] device ...
Description
dtype determines type of disk, prints pertinent information on the standard output unless the silent (-s) option is selected, and exits with a
corresponding code (see below). When more than one argument is
given, the exit code corresponds to the last argument.

Disk
Type
Misc.
Storage

MS-DOS

XENIX

Exit
Code
60
61
70
71
72
73
80
81
90
91
92
93
94
110
120
130

Message
(optional)
error (specified)
empty or unrecognized data
dump format, volume n
tar format[, extent e of n]
cpio format
cpio character (-c) format
DOS l.x, 8 sec/track, single sided
DOS l.x, 8 sec/track, dual sided
DOS 2.x, 8 sec/track, single sided
DOS 2.x, 8 sec/track, dual sided
DOS 2.x, 9 sec/track, single sided
DOS 2.x, 9 sec/track, dual sided
DOS 2.x, fixed disk
DOS 3.x, 9 sec/track, dual sided
XENIX 2.x filesystem [needs cleaning]
XENIX 3.x or later filesystem [needs cleaning]

Notes
word-swapped refers to byte ordering of long words in relation to the
host system.

XENIX file systems and dump and cpio binary formats may not be
recognized if created on a foreign system. This is due to such system
differences as byte and word swapping and structure alignment.
This utility only works reliably for floppy diskettes.

May 16, 1988

Page 1

DU(C)

DU(C)

Name
du - Summarizes disk usage.
Syntax

du [ -afrsu ] [names]
Description
du gives the number of blocks contained in all files and (recursively)
directories within each directory and file specified by the names argument. The block count includes the indirect blocks of the file. If
names is missing, the current directory is used.

The optional argument -s causes only the grand total (for each of the
specified names) to be given. The optional argument -a causes an
entry to be generated for each file. Absence of either causes an entry
to be generated for each directory only.
The -f option causes du to display the usage of files in the current file
system only. Directories containing mounted file systems will be
ignored. The -u option causes du to ignore files that have more than
one linle
du is normally silent about directories that cannot be read, files that
cannot be opened, etc. The -r option will cause du to generate messages in such instances.

A file with two or more links is only counted once.
Notes
If the -a option is not used, nondirectories given as arguments are not
listed.
If there are too many distinct linked files, du will count the excess
files more than once.

Files with holes in them will get an incorrect block count.
This utility reports sizes in 512 byte blocks. Systems which define a
block as 1024 characters, "round-off" the size of files containing 511
or fewer bytes to 1 block. du interprets 1 block from a 1024 byte
block system as 2 of its own 512 byte blocks. Thus a 500 byte file is
interpreted as 2 blocks rather than 1. Refer to the machine(HW)
manual page for the block size used by your system.

May 16, 1988

Page 1

DUMP (C)

DUMP (C)

Name

dump - Perfonns incremental file system backup.
Syntax

dump [ key [ arguments ] filesystem ]
Description

This command is identical to the backup utility. Refer to backup(C)
for complete infonnation.

May 16, 1988

Page 1

DUMPDIR (C)

DUMPDIR (C)

Name
dumpdir - Prints the names of files on a backup archive.
Syntax
dumpdir [ f filename ]

Description
dumpdir is used to list the names and inode numbers of all files and
directories on an archive written with the backup command. This is
most useful when attempting to determine the location of a particular
file in a set of backup archives.

The f option causes filename to be used as the name of the backup
device instead of the default. The backup device depends on the setting of the variable TAPE in the file /etc/default/dumpdir. The device specified as TAPE can be any type of backup device supported by
the system (for example, a floppy drive or cartridge tape drive).
Files
rst*

Temporary files

See Also
backup(C), restore(C), default(F)

April 1, 1987

Page 1

ECHO (C)

ECHO (C)

Name
echo - Echoes arguments.

Syntax
echo [arg] ...
Ibinl echo [ arg ] ...
Description
echo writes its arguments separated by blanks and terminated by a
newline on the standard output. echo also understands C-like escape
conventions. The following escape sequences need to be quoted so
that the shell interprets them correctly:
\b Backspace
\c Prints line without newline
\f Form feed
\n Newline
\r Carriage return
\t Tab
\v Vertical tab
\\ Backslash
\n The 8-bit character whose ASCII code is aI, 2 or 3-digit octal
number. In all cases, n must start with a zero. For example:

echo
echo
echo
echo
echo

"\07"
"\007"
"\065"
"\0065"
"\0101"

-

Echoes Ctl-G.
Also echoes Ctl-G.
Echoes the number" 5' '.
Also echoes the number" 5".
Echoes the letter "A".

echo is useful for producing diagnostics in command files and for
sending known data into a pipe.

See Also
sh(C)

Notes
The csh(C) has a built-in echo utility which has a different syntax than
this echo. Be aware that users running under csh will get the built-in
echo unless they specify Ibin/echo .

May 16, 1988

Page 1

ED (C)

ED (C)

Name
ed - Invokes the text editor.

Syntax
ed [ - ] [ -p string] [ file]

Description
ed is the standard text editor. If the file argument is given, ed simulates an e command (see below) on the named file; that is to say, the
file is read into ed's buffer so that it can be edited. ed operates on a

copy of the file it is editing; changes made to the copy have no effect
on the file until a w (write) command is given. The copy of the text
being edited resides in a temporary file called the buffer. There is
only one buffer.
The options are:
Suppresses the printing of character counts by the e, r, and w
commands, of diagnostics from e and q commands, and the !
prompt after a !shell command.

-p

Allows the user to specify a prompt string.

ed supports

formatting capability. After including a format
specification as the first line of file and invoking ed with your terminal
in stty -tabs or stty tab3 mode (see stty(C), the specified tab stops will
automatically be used when scanning file. For example, if the first line
of a file contained:
<:t5,10,15 s72:>

tab stops would be set at columns 5, 10, and 15, and a maximum line
length of 72 would be imposed. NOTE: While inputting text, tab characters are expanded to every eighth column as the default.
Commands to ed have a simple and regular structure: zero, one, or two
addresses followed by a single-character command, possibly followed
by parameters to that command. These addresses specify one or more
lines in the buffer. Every command that requires addresses has default
addresses, so that the addresses can very often be omitted.

May 16, 1988

Page 1

ED (C)

ED (C)

In general, only one command may appear on a line. Certain commands allow the input of text. This text is placed in the appropriate
place in the buffer. While ed is accepting text, it is said to be in input
mode. In this mode, no commands are recognized; all input is merely
collected. Input mode is left by entering a period (.) alone at the
beginning of a line.

ed supports a limited form of regular expression notation; regular
expressions are used in addresses to specify lines and in some commands (e.g., s) to specify portions of a line that are to be substituted.
A regular expression specifies a set of character strings. A member of
this set of strings is said to be matched by the regular expression. The
regular expressions allowed by ed are constructed as follows:
The following one-character regular expressions match a single character:
1.1

An ordinary character (not one of those discussed in 1.2 below)
is a one-character regular expression that matches itself.

1.2

A backslash (\) followed by any special character is a onecharacter regular expression that matches the special character
itself. The special characters are:
a.

_, *, [, and \ (dot, star, left square bracket, and backslash,
respectively), which are always special, except when they
appear within square brackets ([]; see 1.4 below).

b.

'" (caret), which is special at the beginning of an entire regular expression (see 3.1 and 3.2 below), or when it immediately follows the left of a pair of square brackets ([]) (see
1.4 below).

c.

$ (dollar sign), which is special at the end of an entire regular expression (see 3.2 below).

d.

1.3

The character used to bound (Le., delimit) an entire regular
expression, which is special for that regular expression (for
example, see how slash (/) is used in the g command below).

A period (.) is a one-character regular expression that matches
any character except newline.

1.4 A nonempty string of characters enclosed in square brackets ([])
is a one-character regular expression that matches anyone character in that string. If, however, the first character of the string is
a caret (A), the one-character regular expression matches any
character except newline and the remaining characters in the
string. The star (*) has this special meaning only if it occurs first
in the string. The dash (-) may be used to indicate a range of
consecutive ASCII characters; for example, [0-9] is equivalent to
[0123456789]. The dash (-) loses this special meaning if it

May 16, 1988

Page 2

ED (C)

ED (C)
occurs first (after an initial caret (,,), if any) or last in the string.
The right square bracket (]) does not tenninate such a string
when it is the first character within it (after an initial caret (,,), if
any); e.g., []a-f] matches either a right square bracket (]) or one
of the letters "a" through "f" inclusive. Dot, star, left bracket,
and the backslash lose their special meaning within such a string
of characters.

The following rules may be used to construct regular expressions from
one-character regular expressions:
2.1
A one-character regular expression followed by a star (*) is a regular expression that matches zero or more occurrences of the onecharacter regular expression. If there is any choice, the longest
leftmost string that pennits a match is chosen.
2.2
A one-character regular expression followed by \{m\}, \{m,\}, or

\{m,n\} is a regular expression that matches a range of
occurrences of the one-character regular expression. The values of
m and n must be nonnegative integers less than 255; \{m\}
matches exactly m occurrences; \{ m, \} matches at least m
occurrences; \{m,n\} matches any number of occurrences between
m and n, inclusive. Whenever a choice exists, the regular expression matches as many occurrences as possible.
2.3
The concatenation of regular expressions is a regular expression
that matches the concatenation of the strings matched by each
component of the regular expression.
2.4

A regular expression enclosed between the character sequences \(

and \) is a regular expression that matches whatever the unadorned
regular expression matches. See 2.6 below for a discussion of why
this is useful.
2.5

The expression \n matches the same string of characters as was
matched by an expression enclosed between \( and \) earlier in the
same regular expression. Here n is a digit; the subexpression
specified is that beginning with the n-th occurrence of \( counting
from the left. For example, the expression "\(.*\)\1$ matches a
line consisting of two repeated appearances of the same string.
Finally, an entire regular expression may be constrained to match
only an initial segment or final segment of a line (or both):

3.1

A caret (,,) at the beginning of an entire regular expression constrains that regular expression to match an initial segment of a
line.

May 16, 1988

Page 3

ED (C)

ED (C)

3.2 A dollar sign ($) at the end of an entire regular expression constrains that regular expression to match a final segment of a line.
The construction Aentire regular expression $ constrains the
entire regular expression to match the entire line.
The null regular expression (e.g., II) is equivalent to the last regular
expression encountered.
To understand addressing in ed , it is necessary to know that there is a
current line at all times. Generally speaking, the current line is the last
line affected by a command; the exact effect on the current line is discussed under the description of each command. Addresses are constructed as follows:
1. The character . addresses the current line.
2.

The character $ addresses the last line of the buffer.

3.

A decimal number n addresses the n-th line of the buffer.

4.

'x addresses the line marked with the mark name character x,
which must be a lowercase letter. Lines are marked with the k
command described below.

5.

A regular expression enclosed by slashes (/) addresses the first
line found by searching forward from the line following the
current line toward the end of the buffer and stopping at the first
line containing a string matching the regular expression. If
necessary, the search wraps around to the beginning of the buffer
and continues up to and including the current line, so that the
entire buffer is searched.

6.

A regular expression enclosed in question marks (?) addresses
the first line found by searching backward from the line preceding the current line toward the beginning of the buffer and stopping at the first line containing a string matching the regular
expression. If necessary, the search wraps around to the end of
the buffer and continues up to and including the current line. See
also the last paragraph before Files below.

7.

An address followed by a plus sign (+) or a minus sign (-) followed by a decimal number specifies that address plus or minus
the indicated number of lines. The plus sign may be omitted.

8.

If an address begins with + or -, the addition or subtraction is
taken with respect to the current line; e.g, -5 is understood to
mean .-5.

9.

If an address ends with + or -, then 1 is added to or subtracted
from the address, respectively. As a consequence of this rule and
of rule 8 immediately above, the address - refers to the line
preceding the current line. (To maintain compatibility with

May 16, 1988

Page 4

ED (C)

ED (C)

earlier versions of the editor, the character
in addresses is
entirely equivalent to -.) Moreover, trailing + and - characters
have a cumulative effect, so -- refers to the current line less 2.
A

For convenience, a comma (,) stands for the address pair 1,$,
while a semicolon (;) stands for the pair ., $.

10.

Commands may require zero, one, or two addresses. Commands that
require no addresses regard the presence of an address as an error.
Commands that accept one or two addresses assume default addresses
when an insufficient number of addresses is given; if more addresses
are given than such a command requires, the last address(es) are used.
Typically, addresses are separated from each other by a comma (,).
They may also be separated by a semicolon (;). In the latter case, the
current line (.) is set to the first address, and only then is the second
address calculated. This feature can be used to determine the starting
line for forward and backward searches (see rules 5 and 6 above). The
second address of any two-address sequence must correspond to a line
that follows, in the buffer, the line corresponding to the first address.
In the following list of ed commands, the default addresses are shown
in parentheses. The parentheses are not part of the address; they show
that the given addresses are the default.
It is generally illegal for more than one command to appear on a line.
However, any command (except e,j, r, or w) may be suffixed by p or
by I, in which case the current line is either printed or listed, respectively, as discussed below under the p and I commands.
( .)a


The append command reads the given text and appends it after the
addressed line; dot is left at the last inserted line, or, if there were
no inserted lines, at the addressed line. Address 0 is legal for this
command: it causes the "appended" text to be placed at the beginning of the buffer.

(.)c

The change command deletes the addressed lines, then accepts
input text that replaces these lines; dot is left at the last line input,
or, if there were none, at the first line that was not deleted.

(.,.)d
The delete command deletes the addressed lines from the buffer.
The line after the last line deleted becomes the current line; if the
lines deleted were originally at the end of the buffer, the new last
line becomes the current line.

May 16, 1988

Page 5

ED (C)

ED (C)

efile
The edit command causes the entire contents of the buffer to be
deleted, and then the named file to be read in; dot is set to the last
line of the buffer. If no filename is given, the currently remembered filename, if any, is used (see the f command). The number
of characters read is typed; file is remembered for possible use as a
default filename in subsequent e, r, and w commands. If file
begins with an exclamation (!), the rest of the line is taken to be a
shell command. The output of this command is read for the e and r
commands. For the w command, the file is used as the standard
input for the specified command. Such a shell command is not
remembered as the current filename.
Efile
The Edit command is like e, except the editor does not check to
see if any changes have been made to the buffer since the last w
command.
ffile
If file is given, the filename command changes the currently
remembered filename to file; otherwise, it prints the currently
remembered filename.
( 1 , $ )glregular-expression !command list
In the global command, the first step is to mark every line that
matches the given regular expression. Then, for every such line,
the given command list is executed with • initially set to that line.
A single command or the first of a list of commands appears on the
same line as the global command. All lines of a multiline list
except the last line must be ended with a \; a, i, and c commands
and associated input are permitted; the. terminating input mode
may be omitted if it would be the last line of the command list. An
empty command list is equivalent to the p command. The g, G, v,
and V commands are not permitted in the command list. See also
Notes and the last paragraph before Files below.

( 1 , $ )Glregular-expression I
In the interactive Global command, the first step is to mark every
line that matches the given regular expression. Then, for every
such line, that line is printed, dot (.) is changed to that line, and
anyone command (other than one of the a, c, i, g, G, v, and V
commands) may be input and is executed. After the execution of
that command, the next marked line is printed, and so on; a newline acts as a null command; an ampersand (&) causes the reexecution of the most recent command executed within the current
invocation of G. Note that the commands input as part of the execution of the G command may address and affect any lines in the
buffer. The G command can be terminated by entering an INTERRUPT.

May 16, 1988

Page 6

ED (C)

ED (C)

h

The help command gives a short error message that explains the
reason for the most recent? diagnostic.
H
The Help command causes ed to enter a mode in which error messages are printed for all subsequent ? diagnostics. It will also
explain the previous diagnostic if there was one. The H command
alternately turns this mode on and off; it is initially off.
(. )i


The insert command inserts the given text before the addressed
line; dot is left at the last inserted line, or if there were no inserted
lines, at the addressed line. This command differs from the a command only in the placement of the input text. Address 0 is not
legal for this command.
(., .+I)j
The join command joins contiguous lines by removing the
appropriate newline characters. If only one address is given, this
command does nothing.
(.)kx

The mark command marks the addressed line with name x, which
must be a lowercase letter. The address 'x then addresses this line;
dot is unchanged.
(.,. )1

The I ist command prints the addressed lines in an unambiguous
way: a few nonprinting characters (e.g., tab, backspace) are
represented by mnemonic overstrikes, all other nonprinting characters are printed in octal, and long lines are folded. An I command
may be appended to any command other than e ,I, r, or w.
( .,.)ma
The move command repositions the addressed line(s) after the line
addressed by a. Address 0 is legal for a and causes the addressed

line(s) to be moved to the beginning of the file; it is an error if
address a falls within the range of moved lines; dot is left at the
last line moved.
(., .)0
The number command prints the addressed lines, preceding each
line by its line number and a tab character; dot is left at the last
line printed. The n command may be appended to any command
other than e ,I, r, or w.

(.,.)p
The print command prints the addressed lines; dot is left at the last
line printed. The p command may be appended to any command

May 16, 1988

Page 7

ED (C)

ED (C)

other than e ,I, r, or w; for example, dp deletes the current line and
prints the new current line.
p

The editor will prompt with a * for all subsequent commands. The
P command alternately turns this mode on and off; it is initially on.
q
The quit command causes ed to exit. No automatic write of a file
is done.

Q

The editor exits without checking if changes have been made in
the buffer since the last w command.

($)r file

The read command reads in the given file after the addressed line.
If no filename is given, the currently remembered filename, if any,
is used (see e and f commands). The currently remembered
filename is not changed unless file is the very first filename mentioned since ed was invoked. Address 0 is legal for r and causes
the file to be read at the beginning of the buffer. If the read is successful, the number of characters read is typed; dot is set to the last
line read in. If file begins with !, the rest of the line is taken to be a
shell (sh(C» command whose output is to be read. Such a shell
command is not remembered as the current filename.
( . , • )slregular-expression Ireplacement I or
( • , . )slregular-expression Ireplacement Ig or
( . , • )slregular-expression Ireplacement In n=1-S12

The substitute command searches each addressed line for an
occurrence of the specified regular expression. In each line in
which a match is found, all (nonoverlapped) matched strings are
replaced by the replacement if the global replacement indicator g
appears after the command. If the global indicator does not
appear, only the first occurrence of the matched string is replaced.
It is an error for the substitution to fail on all addressed lines. Any
character other than space or newline may be used instead of I to
delimit the regular expression and the replacement; dot is left at
the last line on which a substitution occurred.
An ampersand (&) appearing in the replacement is replaced by the
string matching the regular expression on the current line. The
special meaning of the ampersand in this context may be
suppressed by preceding it with a backslash. The characters \n,
where n is a digit, are replaced by the text matched by the n-th regular subexpression of the specified regular expression enclosed
between \( and \). When nested parenthesized subexpressions are
present, n is determined by counting occurrences of \( starting

May 16, 1988

Page 8

~

.

ED (C)

ED (C)

from the left. When the character % is the only character in the
replacement, the replacement used in the most recent substitute
command is used as the replacement in the current substitute command. The % loses its special meaning when it is in a replacement string of more than one character or is preceded by a \.
A line may be split by substituting a newline character into it. The
newline in the replacement must be escaped by preceding it with a
\. Such a substitution cannot be done as part of a g or v command
list.
(.,. )ta

This command acts just like the m command, except that a copy of
the addressed lines is placed after address a (which may be 0); dot
is left at the last line of the copy.
u

The undo command nullifies the effect of the most recent command that modified anything in the buffer, namely the most recent
a, c, d, g, i, j, m, r, s, t, v, G, or V command.
( 1 ,$ )vlregular-expression Icommand list
This command is the same as the global command g except that
the command list is executed with dot initially set to every line
that does not match the regular expression.
( 1 , $ )Vlregular-expression I
This command is the same as the interactive global command G
except that the lines that are marked during the first step are those
that do not match the regular expression.

(1, $)w file
The write command writes the addressed lines into the named file.
If the file does not exist, it is created with mode 666 (readable and
write able by everyone), unless the umask setting (see sh(C)) dictates otherwise. The currently remembered filename is not
changed unless file is the very first filename mentioned since ed
was invoked. If no filename is given, the currently remembered
filename, if any, is used (s~e e and! commands); dot is unchanged.
If the command is successful, the number of characters written is
displayed. If file begins with an exclamation (!), the rest of the
line is taken to be a shell command to which the addressed lines
are supplied as the standard input. Such a shell command is not
remembered as the current filename.
($)=

The line number of the addressed line is typed; dot is unchanged
by this command.
!shell command

The remainder of the line after the ! is sent to the XENIX shell
(sh(C» to be interpreted as a command. Within the text of that

May 16, 1988

Page 9

ED (C)

ED (C)

command, the unescaped character % is replaced with the remembered filename; if a ! appears as the first character of the shell command, it is replaced with the text of the previous shell command.
Thus, !! will repeat the last shell command. If any expansion is
performed, the expanded line is echoed; dot is unchanged.
( .+1)
An address alone on a line causes the addressed line to be printed.
A RETURN alone on a line is equivalent to .+1p. This is useful for
stepping forward through the editing buffer a line at a time.

If an interrupt signal (ASCn DEL or BREAK) is sent, ed prints a question mark (?) and returns to its command level.
Some size limitations: 512 characters per line, 256 characters per global command list, 64 characters per filename, and 128K characters in
the buffet The limit on the number of lines depends on the amount of
user memory.
When reading a file, ed discards Ascn NUL characters and all characters after the last newline. Files (e.g., a.out) that contain characters
not in the Ascn set (bit 8 on), cannot be edited by ed.
If the closing delimiter of a regular expression or of a replacement
string (e.g., /) would be the last character before a newline, that delimiter may be omitted, in which case the addressed line is printed. Thus,
the following pairs of commands are equivalent:
s/sl/s2
s/sl/s2/p
g/sl
g/sl/p
?sl
?sl?
Files
/tmp/e#

Temporary; # is the process number

ed.hup

Work is saved here if the terminal is hung up

See Also
grep(C), sed(C), sh(C), stty(C), regexp(S)
Diagnostics
?
Command errors
? file An inaccessible file
Use the help and Help commands for detailed explanations.

May 16, 1988

Page 10

ED (C)

ED (C)

If changes have been made in the buffer since the last w command that
wrote the entire buffer, ed warns the user if an attempt is made to destroy ed's buffer via the e or q commands: it prints? and allows you to
continue editing. A second e or q command at this point will take
effect. The dash (-) command-line option inhibits this feature.

Notes
An exclamation (!) command cannot be subject to a g or a v command.
The ! command and the ! escape from the e, r, and w commands cannot be used if the the editor is invoked from a restricted shell (see
sh(C)).

The sequence \n in a regular expression does not match any character.
The I command mishandles DEL.
Because 0 is an illegal address for the w command, it is not possible to
create an empty file with ed.
Characters are mashed to 7 bits on input.
If the editor input is coming from a command file (Le., ed file < edcmd-file), the editor will exit at the first failure of a command in the
command file.

May 16, 1988

Page 11

ENABLE (C)

ENABLE (C)

Name
enable - Turns on terminals and line printers.

Syntax
enable tty ...
enable printers
Description
For terminals this program manipulates the /etc/ttys file and signals
init to allow logins on a particular terminal.
For line printers, enable activates the named printers and enables them
to print requests taken by Ip(C). Use Ipstat(C) to find the status of the
printers.

Examples
A simple command to enable ttyOl follows:
enable tty01

Files
/dev/tty*
/etc/ttys
/usr/spool/lp/*

See Also
disable(C), getty(M), init(M), 10gin(M), Ip(C), Ipstat(C), ttys(F),
ungetty(M)

May 16, 1988

Page 1

ENV(C)

ENV(C)

Name

env - Sets environment for command execution.
Syntax
env [-] [ name=value ] ... [command args ]
Description
env obtains the current environment, modifies it according to its arguments, then executes the command with the modified environment.
Arguments of the form name=value are merged into the inherited
environment before the command is executed. The - flag causes the
inherited environment to be ignored completely, so that the command
is executed with exactly the environment specified by the arguments.
If no command is specified, the resulting environment is printed, one

name-value pair per line.
See Also

sh(C), exec(S), profile(F), environ(M)
Notes

The 2.3 printenv command has been replaced in XENIX 3.0 and System V by the env command. The printenv shipped is a link to the
command env.

May 16, 1988

Page 1

EX(C)

EX (C)

Name

ex - Invokes a text editor.
Syntax

ex [ - ] [ -v ] [ -t tag] [ -r ] [ +lineno ] name ...
Description

ex is the root of the editors ex and vi. ex is a superset of ed, whose
most notable extension is a display editing facility. Display based
editing is the focus of vi.
If you have not used ed, or if you are a casual user, you will find that
edit is most convenient for you. It avoids some of the complexities of
ex which is used mostly by systems programmers and persons very
familiar with ed.
If you have a CRT terminal, you may wish to use a display based editor; in this case see vi(C), a command which focuses on the display
editing portion of ex.
For ed Users

If you have used ed you will find that ex has a number of new features.
Intelligent terminals and high-speed terminals are very pleasant to
use with vi. Generally, the ex editor uses far more of the capabilities
of terminals than ed does. It uses the terminal capability database
termcap (M) and the type of the terminal you are using from the variable TERM in the environment to determine how to drive your terminal efficiently. The ex editor makes use of features such as insert and
delete character and line in its visual command mode, which can be
abbreviated vi, which is the central mode of editing when using vi(C).
There is also an interline editing open command, (0) that works on all
terminals.

ex contains a number of features for easily viewing the text of a file.
The z command gives easy access to windows of text. Hitting Ctrl-D
causes the editor to scroll a half-window of text and is more useful for
quickly stepping through a file than just hitting the RETURN key. Of
course, the screen-oriented visual mode gives constant access to editing context.

May 16, 1988

Page 1

EX (C)

EX(C)

ex gives you more help when you make mistakes. The undo (u) command allows you to reverse any single change. ex gives you a lot of
feedback, normally printing changed lines, and indicates when more
than a few lines are affected by a command so it is easy to detect
when a command has affected more lines than it should have.
The editor also normally prevents the overwriting of existing files
unless you have edited them, so that you do not accidentally clobber
with a write a file other than the one you are editing. If the system (or
editor) crashes, or you accidentally hang up the phone, you can use the
recover command to retrieve your work. This will get you back to
within a few lines of where you left off.

ex has several features for editing more than one file at a time. You
can give it a list of files on the command line and use the next (n)
command to edit each in tum. You can also give the next command a
list of filenames, or a pattern used by the shell to specify a new set of
files to be edited. In general, filenames in the editor may be formed
with full shell metasyntax. The metacharacter "%" is also available
in forming filenames and is replaced by the name of the current file.
For editing large groups of related files, you can use ex's tag command
to quickly locate functions and other important points in any of the
files. This is useful when you want to find the definition of a particular function in a large program. The command ctags(CP) builds a tags
file or a group of C programs.
For moving text between files and within a file, the editor has a group
of buffers named a through z. You can place text in these named
buffers and carry it over when you edit another file.
The command & repeats the last substitute command. There is also a
confirmed substitute command. You give a range of substitutions to
be done and the editor interactively prompts you whether each substitution is desired.
You can use the substitute command in ex to systematically convert
the case of letters between uppercase and lowercase. It is possible to
ignore case in searches and substitutions. ex also allows regular
expressions that match words to be constructed. This is convenient,
for example, when searching for the word "edit" if your document
also contains the word "editor."
ex has a set of options that you can set. One option which is very useful is the auto indent option that allows the editor to automatically supply leading white space to align text. You can then press Ctrl-D to
backtab, space and tab forward to align new code easily.

Miscellaneous new useful features include an intelligent join (j) command which supplies whitespace between joined lines automatically,
the commands < and > which shift groups of lines, and the ability to

May 16, 1988

Page 2

EX(C)

EX (C)

filter portions of the buffer through commands such as sort.
Files
lusr/lib/ex3. 7 strings

Error messages

lusr/lib/ex3.7recover

Recover command

/usr/lib/ex3. 7preserve

Preserve command

/etc/termcap

Describes capabilities of terminals

$HOME/.exrc

Editor startup file

/tmp/Exnnnnn

Editor temporary

/tmp/Rxnnnnn

Named buffer temporary

/usr/preserve

Preservation directory

See Also
awk(C), ctags(CP), ed(C), grep(C), sed(C), termcap(M), vi(C)

Credit
This utility was developed at the University of California at Berkeley
and is used with permission.
Notes
The undo command causes all marks to be lost on lines changed and
then restored if the marked lines were changed.

Undo never clears the buffer modified condition.
The z command prints a number of logical rather than physical lines.
More than a screen full of output may result if long lines are present.
File input/output errors don't print a name if the command line "-"
option is used.
There is no easy way to do a single scan ignoring case.
Because of the implementation of the arguments to next, only 512
bytes of argument list are allowed there.
The format of /etc/termcap and the large number of capabilities of
terminals used by the editor cause terminal type setup to be rather
slow.
May 16,1988

Page 3

EX

(C)

EX (C)

The editor does not warn if text is placed in named buffers and not
used before exiting the editor.
Null characters are discarded in input files and cannot appear in resultant files.

May 16, 1988

Page 4

EXPR(C)

EXPR(C)

Name

expr - Evaluates arguments as an expression.
Syntax
expr arguments
Description

The arguments are taken as an expression. After evaluation, the result
is written on the standard output. Terms of the expression must be
separated by blanks. Characters special to the shell must be escaped.
Note that zero is returned to indicate a zero value, rather than the null
string. Strings containing blanks or other special characters should be
quoted. Integer-valued arguments may be preceded by a unary minus
sign. Internally, integers are treated as 32-bit, 2's complement
numbers.
The operators and keywords are listed below. Expressions should be
quoted by the shell, since many of the characters that have special
meaning in the shell also have special meaning in expr. The list is in
order of increasing precedence, with equal precedence operators
grouped within braces ( { and }).
expr I expr
Returns the first expr if it is neither null nor 0, otherwise
returns the second expr.
expr & expr
Returns the first expr if neither expr is null nor 0, otherwise
returns O.
expr { =, >, >=, <, <=, != } expr
Returns the result of an integer comparison if both arguments
are integers, otherwise returns the result of a lexical comparison.
expr { +, - } expr
Addition or subtraction of integer-valued arguments.
expr { *, I, % } expr
Multiplication, division, or remainder of the integer-valued
arguments.
expr: expr
The matching operator : compares the first argument with the
second argument which must be a regular expression; regular
expression syntax is the same as that of ed(C), except that all
patterns are "anchored" (i.e., begin with a caret C)) and

May 16, 1988

Page 1

EXPR(C)

EXPR(C)

therefore the caret is not a special character in that context.
(Note that in the shell, the caret has the same meaning as the
pipe symbol (I ).) Nonnally the matching operator returns the
number of characters matched (zero on failure). Alternatively,
the \( ... \) pattern symbols can be used to return a portion of
the first argument.
Examples
1. a=' expr $a + I"
Adds I to the shell variable a.
2. # For $a equal to either "/usr/abc/file" or just "/file"
expr $a : '.*N.*,\f
Returns the last segment of a pathname (i.e., file). Watch out
for the slash alone as an argument: expr will take it as the division operator (see Notes on the next page).
3. expr $VAR :

'.*'

Returns the number of characters in $VAR.
\

See Also
ed(C), sh(C)
Diagnostics
As a side effect of expression evaluation, expr returns the following
exit values:

o
1
2

IT the expression is neither null nor zero
IT the expression is null or zero
For invalid expressions

Other diagnostics include:

syntax error

For operator/operand errors

nonnumeric argument
IT arithmetic is attempted on such a string

May 16, 1988

Page 2

EXPR(C)

EXPR(C)

Notes

After argument processing by the shell, expr cannot tell the difference
between an operator and an operand except by the value. If $a is an
equals sign (=), the command:
expr $a = =
looks like:
expr = = =
Thus the arguments are passed to expr (and will all be taken as the =
operator). The following permits comparing equals signs:
expr X$a = X=

May 16, 1988

Page· 3

FACTOR (C)

FACTOR (C)

Name

factor - Factor a number.
Syntax
factor [ number]
Description

When factor is invoked without an argument, it waits for a number
to
46
be typed
in.
If you type in a positive number less than 2 (about
13
7 .2x 10 ) it will factor the number and print its prime factors; each
one is printed the proper number of times. Then it waits for another
number. It exits if it encounters a zero or any non-numeric character.
If factor is invoked with an argument, it factors the number as above
and then exits.
The time it takes to factor a number, n, is proportional to -{n. It usually takes longer to factor a prime or the square of a prime, than to factor other numbers.
Diagnostics
factor returns an error message if the supplied input value is greater
46
than 2 or is not an integer number.

May 16,1988

Page 1

FALSE (C)

FALSE (C)

Name
false - Returns with a nonzero exit value.
Syntax
false
Description
false does nothing except return with a nonzero exit value. true (C),
false's counterpart, does nothing except return with a zero exit value.

"False" is typically used in shell procedures such as:
until false
do
command
done
See Also
sh(C), true (C)

Diagnostics
false is any non-zero value.

May 16, 1988

Page 1

FILE (C)

FILE (C)

Name
file - Determines file type.

Syntax
file [ -m ] file ...
file [ -m ] -f namesfile

Description
file performs a series of tests on each argument in an attempt to classify it. If an argument appears to be ASCII, file examines the first 512

bytes and tries to guess its language.
If the -f option is given,file takes the list of filenames from namesfile.
If the -m option is given,file sets the access time for the examined file

to the current time. Otherwise, the access time remains unchanged.
Several object file formats are recognized. For a.out and x.out format
object files, file reports "separate" if the file was linked with cc -i,
"pure" if the file was linked with cc -n, and "not stripped" if the
file was not linked with cc -s or strip(CP) was not run.

Credit
This utility was developed at the University of California at Berkeley
and is used with permission.

Notes
It can make mistakes: in particular it often mistakes command files
for C programs.

May 16, 1988

Page 1

FIND (C)

FIND (C)

Name

find - Finds files.
Syntax
find pathname-list expression
Description

find recursively descends the directory hierarchy for each pathname in
the pathname-list (i.e., one or more pathnames) seeking files that
match a Boolean expression written in the primaries given below. In
the descriptions, the argument n is used as a decimal integer where +n
means more than n, -n means less than nand n means exactly n.
-depth

Always true; causes descent of the directory
hierarchy to be done so that all entries in a directory are acted upon before the directory itself.
This can be useful when used with cpio(C) to
transfer files located in directories without write
permission.

-name file

True if file matches the current file name. Normal
shell argument syntax may be used if escaped
(watch out for the left bracket (D, the question
mark (?) and the star (*).

-perm onum

True if the file permission flags exactly match the
octal number onum (see chmod(C». If onum is
prefixed by a minus sign, more flag bits (017777,
see stateS»~ become significant and the flags are
compared.

-type x

True if the type of the file is x, where c is b, c, d,
p, or f for block special file, character special file,
directory, first-in-first-out, or plain file respectively.

-links n

True if the file has n links.

-inurn num

True if the file's inode is num. This is useful for
locating files with matching inodes.

-user uname

True if the file belongs to the user uname. If
uname is numeric and does not appear as a login
name in the /etc/passwd file, it is taken as a user
ill.

May 16, 1988

Page 1

FIND (C)

FIND (C)

-group gname

True if the file belongs to the group gname. If
gname is numeric and does not appear in the
/etc/group file, it is taken as a group ID.

-size n

True if the file is n blocks long (512 bytes per
block).

-atime n

True if the file has been accessed in n days.

-mtime n

True if the file has been modified in n days.

-ctime n

True if the file was created in the past n days.

-exec cmd

True if the executed cmd returns a zero value as
exit status. The end of cmd must be punctuated by
an escaped semicolon. A command argument { }
is replaced by the current path name.

-ok cmd

Like -exec except that the generated command
line is printed with a question mark first, and is
executed only if the user responds by typing y.

-cpiodevice

Always true; write the current file on device in
cpio(F) format (5120-byte records).

-print

Always true; causes the current path name to be
printed.

-newer file

True if the current file has been modified more
recently than the argument file.

( expression )

True if the parenthesized expression is true
(parentheses are special to the shell and must be
escaped).

The primaries may be combined using the following operators (in
order of decreasing precedence):

negation

The negation of a primary is specified with the
exclamation (!) unary not operator.

AND

The AND operation is implied by the juxtaposition
of two primaries.

OR

The OR operation is specified with the
given between two primaries.

-0

operator

Example
The following command searches for files named chapterI in the

May 16, 1988

Page 2

FIND (C)

FIND (C)

current directory and all directories below it and sends the pathname
of any such files it finds to the standard output:
find . -name chapter 1 -print
The following removes all files named a.out or *.out that have not
been accessed for a week:
find / \( -name a.out -0 -name "*.out"\) -atime +7 -exec rm {} \;
Files
/etc/passwd
/etc/group
See Also
cpio(C)(F), sh(C), stateS), test(C)

May 16, 1988

Page 3

FINGER (C)

FINGER (C)

Name
finger - Finds information about users.
Syntax
finger [ -bfilpqsw ] [login! [login2 ... ] ]
Description
By default finger lists the login name, full name, terminal name and
write status (as a "*" before the terminal name if write permission is
denied), idle time, login time, office location, and phone number (if
they are known) for each current XENIX user. (Idle time is minutes if
it is a single integer, hours and minutes if a colon (:) is present, or
days and hours if a "d" is present.)
A longer format also exists and is used by finger whenever a list of
names is given. (Account names as well as first and last names of
users are accepted.) This is a multiline fonnat; it includes all the
information described above as well as the user's home directory and
login shell, any plan which the person has placed in the file .plan in
their home directory, and the project on which they are working from
the file .project which is also in the home directory.
finger options are:

-b

Briefer long output format of users.

-f

Suppresses the printing of the header line (short format).

-i

Quick list of users with idle times.

-I

Forces long output format.

-p

Suppresses printing of the .plan files.

-q

Quick list of users.

-s

Forces short output format.

-w

Forces narrow format list of specified users.

Files
/etc/utmp

Who file

/etc/passwd

User
names,
offices,
login directories, and shells

May 16, 1988

phones,

Page 1

FINGER (C)

FINGER (C)

$HOME/.plan

Plans

$HOME/. project

Projects

See Also

who(C)
Credit

This utility was developed at the University of California at Berkeley
and is used with pennission.
Notes

Only the first line of the .project file is printed.
Entries in the /etc/passwd file have the following fonnat:
login name:user password( coded):user ID:group ID:comments:home
directory:login shell

The comment field corresponds to configurable columns in the finger
output. For example, in the following /etc/passwd entry:
blf:Tg6bLFzOwgfbA:47:5:Brian Foster, Mission, x70, 767-1234
:/u/blf:/bin/shV
the comment field, "Brian Foster, Mission, x70, 767-1234" , contains
data for the "In Real Life" , "Office" , and "Home Phone" , columns
of the finger listings.
Idle time is computed as the elapsed time since any activity on the
given tenninal. This includes previous invocations of finger which
may have modified the tenninal's corresponding device file /dev/tty??

May 16, 1988

Page 2

FIXHDR (C)

FIXHDR (C)
Name
fixhdr - Changes executable binary file headers.
Syntax
fixhdr option files
Description

fixhdr changes the header of output files created by link editors or
assemblers. The kinds of modifications include changing the format of
the header, the fixed stack size, the standalone load address, and symbol names.

Using fixhdr allows the use of binary executable files, created under
other versions or machines, by simply changing the header information so that it is usable by the target cpu.
These are the options to fixhdr :
-xa

Change the x.out format of the header to the a.out format.

-xb

Change the x.out format of the header to the b.out format.

-x4

Change the x.out format of the header to the 4.2BSD a.out
format.

-xS [-n]

Change the x.out format of the header to 5.2 (UNIXTM
System V release 2) a.out format. The -n flag causes
leading underscores on symbol names to be passed with
no modifications.

-ax -c [11,86]
Change the a.out format of the header to the x.out format.
The -c flag specifies the target cpu. 11 specifies a PDP-II
cpu. 86 specifies one of the 8086 family of cpus (8086,
8088,80186,80286 or 80386).
-bx

Change the b.out format of the header to the x.out format.

-Sx [-n]

Change the 5.2 (UNIX System V release 2) a.out format
of the header to the x.out format. The -n flag causes leading underscores on symbol names to be passed with no
modifications.

-86x

Add the x.out header format to the 86rel object module
format. See 86rel (F).

May 16, 1988

Page 1

FIXHDR (C)

FIXHDR (C)

-F num

Add (or change) the fixed stack size specified in the x.out
format of the header. num must be a hexadecimal
number.

-A num

Add (or change) the standalone load address specified in
the x.out format of the header. num must be a hexadecimal number.

-M[smlh]

Change the model of the x.out or 86rel format. Model
refers to the compiler model specified when creating the
binary. s refers to small model, m refers to medium
model, I refers to large model, and h refers to huge model.

-v [2,3,5,7] Change the version of XENIX specified in the header.
XENIX version 2 was based on UNIX Version 7.

-s sl=s2 [-s s3=s4]
Change symbol names, where symbol name sl is changed
to s2.
-r

Ensure that the resolution table is of non-zero size.

-c cpu

Set the cpu type. cpu can be 186,286,386,8086, others.

Files

/usr/bin/fixhdr
See Also

a.out(F), 86rel(F)
Notes

Give fixhdr one option at a time. If you need to make more than one
kind of modification to a file, use fixhdr on the original file. Then use it
again on the fixhdr output, specifying the next option. Copy the original file if you need an unmodified version as fixhdr makes the
modifications directly to the file.

May 16, 1988

Page 2

FORMAT (C)

FORMAT (C)

Name
format - format floppy disks

Syntax
format [-n] [-v] [-e] [-f] [-q] [device] [-i interleave]
Description
format formats diskettes for use with XENIX. It may be used either
interactively or from the command line. The default drive is
/dev/rfdO.

Options
The following command line options are available:
-f Suppresses the interactive feature. The format program does not
wait for user-confirmation before starting to format the diskette.
Regardless of whether or not you run format interactively, track
and head information is displayed.

-e Erases the servo information on a mini-cartridge.

device
This specifies the device to be formatted. The default device is
/dev/rfdO.
-i interleave
Specifies the interleave factor.

-q Quiet option. Suppresses the track and head output information
normally displayed. Although this option does not suppress the
interactive prompt, it would typically be used with -f to produce no
output at all.

-v Specifies format verification.
-0

Specifies that the diskette is not to be verified (overrides verify
entry in /ete/default/format).

The file fete/default/format is used to specify the default device to be
formatted and whether or not each diskette is to be verified. The
entries must be in the format DEVICE=jdevjrfdnnn and
VERIFY=[yYnN], as in the following example:
DEVICE=jdev jrfd096ds 15
VERIFY=y

May 16, 1988

Page 1

FORMAT (C)

FORMAT (C)

The device must be a character (raw) device.

Usage
To runformat interactively, enter:
format
followed by any of the legal options except -f, and press RETURN.
When you runformat interactively, you see the prompt:
insert diskette in drive and press return when ready
When you press RETURN at this prompt, format begins to format the
diskette.
If you specify the -f option, you do not see this prompt. Instead, the
program begins formatting immediately upon invocation.
Unless you specify the -q option, format displays which track and
head it is currently on:
track #

head #

The number signs above are replaced by the actual track and head
information.

Files
/etc/default/format
/dev/rfd[O - n]

See Also
fd(HW)

Notes
The format utility does not format floppies for use under DOS; use the
dosformat command documented in dos(C).
XENIX requires error free floppies.

It is not advisable to format a low density. (48tpi) diskette on a high
density (96tpi) floppy drive. Diskettes written on a high density drive
should be read on high density drives. A low density diskette written
on a high density drive may not be readable on a low density drive.

May 16, 1988

Page 2

GETOPT(C)

GETOPT(C)

Name
getopt - Parses command options.

Syntax
set -- 'getopt optstring $*'
Description
getopt is used to check and break up options in command lines for
parsing by shell procedures. Optstring is a string of recognized option
letters (see getopt (S». If a letter is followed by a colon, the option is
expected to have an argument which mayor may not be separated
from it by whitespace. The special option -- is used to delimit the end
of the options. getopt will place -- in the arguments at the end of the
options, or recognize it if used explicitly. The shell arguments ($1 $2 .
. .) are reset so that each option is preceded by a dash (-) and in its own
shell argument; each option argument is also in its own shell argument.

Example
The following code fragment shows how one can process the arguments for a command that can take the options a and b, and the option
0, which requires an argument:
set - - 'getopt abo: $*'
if [ $? != 0 ]
then
echo $USAGE
exit 2
fi
for i in $*
do
case $i in
-a I -b) FLAG=$i' shift..
-0)

- -)
esac

6ARG~$2;
shift;

shift; shift;;

break; ;

done
This code will accept any of the following as equivalent:
cmd
cmd
cmd
cmd

-aoarg file file
-a -0 arg file file
-oarg -a file file
-a -oarg -- file file

May 16,1988

Page 1

GETOPT(C)

GETOPT(C)

See Also

sh(C), getopt(S)
Diagnostics
getopt prints an error message on the standard error when it
encounters an option letter not included in optstring .

Notes

The "Syntax" given for this utility assumes the user has a sh (C) shell.

May 16, 1988

Page 2

GREP(C)

GREP(C)

Name
grep, egrep, fgrep - Searches a file for a pattern.
Syntax
grep [ -bchlnsvy ] [expression] [ files]
egrep [ -bchlnv ] [expression] [files]
fgrep [ -bclnvxy ] [ strings] [files]
Description
Commands of the grep family search the input files (standard input
default) for lines matching a pattern. Nonnally, each line found is
copied to the standard output. grep patterns are limited regular
expression s in the style of ed(C); it uses a compact nondetenninistic
algorithm. egrep patterns are full regular expression s; it uses a fast
detenninistic algorithm that sometimes needs exponential space.
fgrep patterns are fixed strings; it is fast and compact. The following
options are recognized:
-v

All lines but those matching are displayed.

-x

Displays only exact matches of an entire line. (jgrep only.)

-c

Only a count of matching lines is displayed.

-I

Only the names of files with matching lines are displayed,
separated by newlines.

-h

Prevents the name of the file containing the matching line from
being appended to that line. Used when searching multiple
files.

-n

Each line is preceded by its relative line number in the file.

-b

Each line is preceded by the block number on which it was
found. This is sometimes useful in locating disk block
numbers by context.

-s

Suppresses error messages produced for nonexistent or unreadable files. ( grep only.) Note that the -s option will not
suppress error messages generated by the -f option.

-y

Thrns on matching of letters of either case in the input so that
case is insignificant. Does not work for egrep.

May 16,1988

Page 1

GREP(C)

GREP(C)

-e expression
Same as a simple expression argument, but useful when the
expression begins with a dash (-).
-ffile

The regular expression for grep or egrep, or strings list (for
fgrep) is taken from the file.
In all cases, the filename is output if there is more than one input file.
Care should be taken when using the characters $, *, [, ", I, (,), and \ in
expression, because they are also meaningful to the shell. It is safest
to enclose the entire expression argument in single quotation marks.

Fgrep searches for lines that contain one of the strings separated by
newlines.
Egrep accepts regular expressions as in ed(C), except for \( and \),
with the addition of the following:
A regular expression followed by a plus sign (+) matches one or
more occurrences of the regular expression.
A regular expression followed by a question mark (?) matches 0 or
1 occurrences of the regular expression.

Two regular expressions separated by a vertical bar (I) or by a
newline match strings that are matched by either regular expression.
A regular expression may be enclosed in parentheses () for grouping.

The order of precedence of operators is [ ], then *? +, then concatenation, then the backslash (\) and the newline.
See Also
ed(C), sed(C), sh(C)
Diagnostics
Exit status is 0 if any matches are found, 1 if none, 2 for syntax errors
or inaccessible files.
Notes
Ideally there should be only one grep, but there isn't a single algorithm that spans a wide enough range of space-time tradeoffs.

May 16, 1988

Page 2

GREP(C)

GREP(C)

Lines are limited to 256 characters; longer lines are truncated.
When using grep with the -y option, the search is not made totally
case insensitive in character ranges specified within brackets.
Multiple strings can be specified in fgrep without using a separate
strings file by using the quoting conventions of the shell to imbed
newlines in the single string argument. For example, you might enter
the following on the command line:
fgrep 'stringl
string2
string3' text. file
Similarly, multiple strings can be specified in egrep by doing:
egrep 'string 11 string21 string3' text. file
Thus egrep can do almost anything that grep andfgrep can do.

May 16, 1988

Page 3

GRPCHECK(C)

GRPCHECK(C)

Name
grpcheck - Checks group file.

Syntax
grpcheck [file]
Description
grpcheck verifies all entries in the group file. This verification
includes a check of the number of fields, group name, group ID, and
whether all login names appear in the password file. The default group
file is /etc/group.

Files
/etc/group
/etc/passwd

See Also
pwcheck(C), group(F), passwd(F)

Diagnostics
Group entries in /etc/group with no login names are flagged.

May 16, 1988

Page 1

HD (C)

HD (C)

Name
hd - Displays files in hexadecimal fonnat.

Syntax
hd [ -fonnat [ -8 offset] [ -n count] [ file] ...

Description
The hd command displays the contents of files in hexadecimal, octal,
decimal, and character fonnats. Control over the specification of
ranges of characters is also available. The default behavior is with the
following flags set: "-abx -A". This says that addresses (file offsets)
and bytes are printed in hexadecimal and that characters are also
printed. If no file argument is given, the standard input is read.
Options include:
-8

offset

Specify the beginning offset in the file where printing is
to begin. If no 'file' argument is given, or if a seek fails
because the input is a pipe, 'offset' bytes are read from
the input and discarded. Otherwise, a seek error will
tenninate processing of the current file.
The offset may be given in decimal, hexadecimal (preceded by 'Ox'), or octal (preceded by a '0'). It is optionally followed by one of the following multipliers: w, I,
b, or k; for words (2 bytes), long words (4 bytes), half
kilobytes (512 bytes), or kilobytes (1024 bytes). Note
that this is the one case where "b" does not stand for
bytes. Since specifying a hexadecimal offset in blocks
would result in an ambiguous trailing 'b', any offset and
multiplier may be separated by an asterisk (*).

-n count

Specify the number of bytes to process. The count is in
the same fonnat as offset, above.

Format Flags
Fonnat flags may specify addresses, characters, bytes, words (2 bytes)
or longs (4 bytes) to be printed in hex, decimal, or octal. Two special
fonnats may also be indicated: text or ascii. Fonnat and base
specifiers may be freely combined and repeated as desired in order to
specify different bases (hexadecimal, decimal or octal) for different
output formats (addresses, characters, etc.). All fonnat flags appearing
in a single argument are applied as appropriate to all other flags in that
argument.

May 16, 1988

Page 1

HD(C)

HD(C)

acbwlA
Output format specifiers for addresses, characters, bytes, words,
longs and ascii respectively. Only one base specifier will be used
for addresses; the address will appear on the first line of output that
begins each new offset in the input.

The character format prints printable characters unchanged, special C escapes as defined in the language, and the remaining values
in the specified base.
The ascii format prints all printable characters unchanged, and all
others as a period (.). This format appears to the right of the first of
other specified output formats. A base specifier has no meaning
with the ascii format. If no other output format (other than
addresses) is given, bx is assumed. If no base specifier is given, all
of xdo are used.

hxdo
Output base specifiers for hexadecimal, decimal and octal. If no
format specifier is given, all of acbwl are used.

t

Print a text file, each line preceded by the address in the file. Normally, lines should be terminated by a \0 character; but long lines
will be broken up. Control characters in the range OxOO to Oxlf are
printed as '''@' to '''_'. Bytes witl). the high bit set are preceded by
a tilde C) and printed as if the high bit were not set. The special
characters C, -, \) are preceded by a backslash (\) to escape their
special meaning. As special cases, two values are represented
numerically as '\177' and ''377'. This flag will override all output
format specifiers except addresses.

May 16,1988

Page 2

HEAD (C)

HEAD (C)

Name
head - Prints the first few lines of a stream.

Syntax
head [ -count] [ file ... ]
Description
This filter prints the first count lines of each of the specified files. If
no files are specified, head reads from the standard input. If no count
is specified, then 10 lines are printed.

See Also
tail(C)

Credit
This utility was developed at the University of California at Berkeley
and is used with permission.

May 16, 1988

Page 1

HELLO (C)

HELLO (C)

Name
hello - Send a message to another user.
Syntax
hello user [tty]
Description
hello sends messages from one user to another. When first called,
hello displays the following message:

Message from sender's-system! sender's-name sender's-tty
The recipient of the message should write back at this point. Communication continues until an interrupt is sent. (On most terminals,
pressing the Del key sends an interrupt.) At that point hello prints
"EaT" on the other terminal, and exits.
To write to a user who is logged in more than once, the user can
employ the tty argument to specify the appropriate terminal name.
The who(C) command can be used to determine the correct terminal
name.
Permission to write may be allowed or denied by the recipient, using
the mesg command. Writing is allowed by default. Certain commands, such as nroff and pr, prohibit messages in order to prevent
disruption of output.
If the character ! is found at the beginning of a line, hello calls the
shell to execute the rest of the line as a command.
The following protocol is suggested for using hello. When first writing to another user, the sender should wait for that user to write back
before sending a message. Each party should end each message with a
signal indicating that the other may reply: 0 for "over" is conventional. The signal 00 for "over and out" is suggested when conversation is about to be terminated.
Files
/etc/utmp
/bin/sh
See Also
mesg(C), who(C), mail(C)

May 16, 1988

Page 1

HELP (e)

HELP (e)

Name
help - Asks for help with XENIX commands and

sees error messages.

Syntax
help [command] [imessagenumber]
Description
help provides on-line explanations of most commonly-used XENIX
commands. help also displays information explaining sees error
messages. Multiple arguments can be supplied. If no arguments are
given, help will prompt for one.
The arguments may be XENIX command names or sees message
numbers. Message numbers are displayed at the end of sees error
messages. sees message numbers come in two forms: numbers and
letter-number combinations (for example, ge6 or 212).
When all else fails, try "help stuck".

Files
/usr/lib/help

May 16, 1988

Directory containing files of message text

Page 1

HWCONFIG (C)

HWCONFIG (C)

Name
hwconfig - read the configuration infonnation.

Syntax
hwconfig [-f filename] [param] [param=val] ...
Description
hweonfig returns the configuration infonnation contained in the file
/usr/adm/hwconfig or the file specified on the command line with the
-f filename option. Using combinations of the remaining options, the
user can view as much infonnation as needed from the configuration
file. shows all values of param throughout the configuration file.
param can be any valid system parameter. shows only infonnation
from the line where param equals the value val.

Examples
When you enter:

hwconfig 
The entire contents of the file lusr/adm/hwconfig is printed.

hwconfig base 
All the values of the base parameter found in /usr/adm/hwconfig are
printed.

hwconfig -f conf base=300 vec=19 
All entries in eonf that match the base and vee values given are
printed.

hwconfig name=f1oppy base 
The name and value of base in lusr/adm/hwconfig for the drivers with
the name floppy are printed for all entries.

Files
/usr/adm/hwconfig

May 16, 1988

Page 1

ID (C)

ID (C)

Name

id - Prints user and group IDs and names.
Syntax
id
Description
I d writes a message on the standard output, giving the user and group
IDs and the corresponding names of the invoking process. If the effective and real IDs do not match, both are printed.

See Also

logname(C), getuid(S)

May 16, 1988

Page 1

IMACCT(C)

IMACCT(C)

Name

imacct - Generate an IMAGEN accounting report.
Syntax
imacct acctfile
Description

imaeet reads the IMAGEN accounting file aeetfile and generates a
report on the number of pages and files printed. It tallies this information per each user on each host computer, and provides totals and percentages.

The accounting file is generated by the serial "sequence packet protocol" IMAGEN printer handler ips(ADM).
Files

/usr/adm/imagen

Default aeetfile written
by imagen.spp.

See Also

imagen(M),
ips (ADM)
Notes

No sorting option is available.
Author
IMAGEN Corporation.

May 16,1988

Page 1

IMPRINT (C)

IMPRINT (C)

Name
imprint - Prints text files on an IMAGEN printer.

Syntax
imprint [ options] [ file ... ]
Description
imprint queues the specified files for printing on an IMAGEN printer
using either pr(C) or cat (C), and passes the correct options to ipr(C).
If no files are given, the standard input is read.

The options are:
-Iflag
Pass flag to ipr.
-pflag
Pass flag to either pr or cat.
-Pprinter
Print the output on printer. The default printer is specified as
PRINTER in the file /etc/default/imagen, which is read by ipr.
-cn

Print n copies. This turns on pagecollation.
-hbanner
The string banner is passed to both pr (-h) and ipr (-f) as the
header for this job.
-In

Set the page length to n lines. This may also set the printer's interline spacing.

-n Use cat rather than pr to print the file.
-wn
Set the the line width to n characters. A line width of more than 80
characters is printed in landscape (132 column) mode.
-2 Print two logical pages per physical page (' '2-up' ').

-c

Suppress pagecollation (see -c above).

-F Suppress pagereversal (which is on by default).

May 16, 1988

Page 1

IMPRINT (C)

IMPRINT (C)

-J Suppress generation of the job header page.
-L Print in landscape mode, 132 columns wide.

-0 Print page borders.
-R Print page rules (one every two lines).
-d Prints some information for debugging purposes.
-on
The output is offset n character positions from the left margin.

-Tn
The output begins n 1/48's of an inch from the top of the each
page.

See Also
cat(C), ipr(C), pr(C)

Notes
Certain parameters can be overridden by document control language
in the file itself. Also, a -c flag after a -C flag turns pagecollation on
once more.

If the job contains errors detected by the printer, the job header page is
always generated.
The -T option is meaningful only if the IMAGEN printer language is
"daisy." This can be set by -I-Ldaisy. If the printer language is
daisy, then the -0 option uses units of 1/120 of an inch, rather a character width.
Older versions of imprint passed any unrecognized option on to either
pr or cat. This is no longer supported, and either -p or the "end of
options" delimiter -- must be used to pass an unmolested option to
either pr or cat.

Author
IMAGEN Corporation.

May 16, 1988

Page 2

IPR (C)

IPR (C)

Name

ipr, oldipr - Put files onto the IMAGEN printer queue.
Syntax
ipr [ options] [file ... ]
oldipr [ options] [file ... ]
Description
ipr causes the named files to be queued for printing on an IMAGEN
printer, using Ip(C), with the appropriate document control language
strings prepended. Some of the information in the document header
includes the number of copies, the names of the printed flies, and the
IMAGEN printer language used. If no files are named, the standard
input is read.
oldipr is identical to ipr, but implies the
old-style imPRESS files.

-0

option and is used with

The options are:
-Llanguage
Causes the specified language declaration to be included in the
document control language string for the queued files. This should
correspond to the language in which the document was prepared.
-Dstring
Causes string to be included in the document control language for
the queued files.
-Pprinter
This file is to be printed on printer. The default printer is specified
as PRINTER in the file /etc/default/imagen.
-fname
Imbed the identifier name as the value of the variable files in the
document control language. If not specified, the names of the
input files are used. This is printed on the banner page.

-m

Causes mail (C) to be sent when the job is complete.
-r The files will be unlinked after being queued for printing.
-cn

Prints n copies.

May 16, 1988

Page 1

IPR (C)

IPR (C)

-d Additional information is printed for debugging purposes.
-0

Specifies that the file being queued is an old style (prior to version
1) imPRESS-language format file.

ipr reads /etc/default/imagen to obtain various default settings. The
values obtained and the default values are:

PRINTER=imagen
The name of the IMAGEN printer. This can be overridden with the
-p option.
JAMPROOF=no
Whether or not paper-jam resistance measures should be used. If
such steps are taken, printing is usually slowed down.
The values for the default settings can be changed to reflect the local
system configuration. If /etc/ default/imagen does not exist or cannot
be read, the above default values are used.
Files
/usr/bin/lp
The XENIX printer spooling system.
See Also
imagen(M), imprint(C), ips(ADM), itroff(CT), Ip(C)
Notes
The number of copies to be printed and other parameters can be overridden by document-control information contained within the document itself.
Author
IMAGEN Corporation.

May 16, 1988

Page 2

IPRINT(C)

IPRINT(C)

Name
iprint - Converts text files to DVI fonnat.

Syntax
iprint [ options] [file ... ]
Description
iprint converts the input text files to DVI fonnat. The DVI output must
first be converted to imPRESS fonnat before it can be printed on an
IMAGEN printer. Unless the -i option is given, dviimp (CT) is used to
automatically prefonn this conversion and print the results. If no file
names are given, the standard input is read.

The options are:
-ioutput
The imPRESS is saved in file output instead of being printed.
-bbanner
The string banner is passed on to dviimp as the argument to its -b
option. The default banner is the name of the first input file.

-cn

Print n copies.

-B Print the first non-blank line on each page in a bold type face, and
ignore leading blank lines. This is for use with programs like
pr(C) which generate page headers.
-ffont
Use the following argument as the name of a font file for the text.
A variable-pitch font will generally produce ugly results.
-Ffont
Use the following argument as the name of a font file for the bold
header line. See the -B option).
-on
Print with a page offset (left margin) of n spaces.
-In

Take the page length to be n lines.
-Draster
The directory containing the raster images is raster. The default
raster image directory is specified by RASTER in the file
/etc/default/imagen, and has an assumed resolution of 240 pixels

May 16, 1988

Page 1

IPRINT(C)

IPRINT(C)

per inch.
-d Produces extensive output for debugging.

-v Produces more verbose debugging output.
iprint reads fete/default/imagen to obtain various default settings.
The values obtained and the default values are:

RASTER=/usr/lib/imagen/raster
The font rasterization files are to be found in directory 240 within
this directory (i.e. raster/240). This can be overridden by the -D
option.
TMPDIR=/tmp
Directory in which temporary files are kept.
The values of the default settings can be changed to reflect the local
system configuration. If fete/default/imagen does not exist or cannot
be read, the above default values are used.

Files
tmpdir/dvi????? ?
Temporary file used to hold the DVI output that dviimp processes.
The value of tmpdir is set by TMPDIR in fete/default/imagen.
raster /240/*
Raster images of host resident fonts. The default values for raster
is specified by RASTER in fete/default/imagen, and can be overridden by the -D option.

/usr/bin/dviimp
The DVI to imPRESS format conversion program.
See Also
dviimp(CT), imprint(C), ipr(C)

May 16, 1988

Page 2

IPRINT(C)

IPRINT(C)

Notes
The resolution of the IMAGEN printer is assumed to be 240 pixels per
inch.
"Font/version n" means this font file is not a version 0 RAS-format
file. Other diagnostics should be self-explanatory.
Author
IMAGEN Corporation.

May 16, 1988

Page 3

JOIN (C)

JOIN (C)

Name
join - Joins two relations.
Syntax
join [ options] file 1 file2
Description
join fonns, on the standard output, a join of the two relations specified
by the lines of filel and file2. If filel is a dash (-), the standard input
is used.
Filel and file2 must be sorted in increasing ASCII collating sequence
on the fields on which they are to be joined, nonnally the first in each
line.

There is one line in the output for each pair of lines in filel and file2
that have identical join fields. The output line nonnally consists of
the common field, then the rest of the line fromfilel , then the rest of
the line from file2 .
Fields are nonnally separated by blank, tab or newline. In this case,
multiple separators count as one, and leading separators are discarded.
These options are recognized:
-an

In addition to the nonnal output, produces a line for each
unpairable line in file n, where n is 1 or 2.

-e s

Replaces empty output fields by string s.

-jn m

Joins on the mth field of file n. H n is missing, uses the
mth field in each file.

-0

list

-tc

May 16, 1988

Each output line comprises the fields specified in list,
each element of which has the fonn n.m, where n is a file
number and m is a field number.
Uses character c as a separator (tab character). Every
appearance of c in a line is significant.

Page 1

JOIN (C)

JOIN (C)

See Also
awk(C), comm(C), sort(C)

Notes
With default field separation, the collating sequence is that of sort -b.
With -t, the sequence is that of a plain sort.

May 16, 1988

Page 2

KILL (C)

KILL (C)

Name

kill - Tenninates a process.
Syntax
kill [ -signo ] processid ...

Description
kill sends signal 15 (tenninate) to the specified processes. This will

nonnally kill processes that do not catch or ignore the signal. The
process number of each asynchronous process started with & is
reported by the shell (unless more than one process is started in a pipeline, in which case the number of the last process in the pipeline is
reported). Process numbers can also be found by using ps(C).
For example, if process number 0 is specified, all processes in the process group are signaled.
The killed process must belong to the current user unless he is the
super-user.
If a signal number preceded by - is given as the first argument, that
signal is sent instead of the tenninate signal (see signal(S)). In particular "kill -9 ... " is a sure kill.
See Also

ps(C), sh(C), kill(S), signal(S)

May 16, 1988

Page 1

L(C)

L(C)

Name

I - Lists infonnation about contents of directory.
Syntax
I [ -ACFRabcdfgilnopqrstu ] name ...

Description

For each directory argument, I lists the contents of the directory; for
each file argument, I repeats its name and other requested infonnation.
The output is sorted alphabetically by default. When no argument is
given, the current directory is listed. When several arguments are
given, the arguments are first sorted appropriately, but file arguments
appear before directories and their contents. Infonnation is listed in
the fonnat of the "Is -1" command, which is identical to the I command. This fonnat and all provided switches are described in Is(C)
and le(C), to which should you should refer for a complete discussion
of the capabilities of I.
Files

/etc/passwd

Contains user IDs

/etc/group

Contains group IDs

Notes

Newline and tab are considered printing characters in filenames.
The output device is assumed to be 80 columns wide.

May 16,1988

Page 1

LAST (C)

LAST (C)

Name

last - indicate last logins of users and teletypes
Syntax
last [ -n limit] [ -I tty ] [ -v ] [ name]
DESCRIPTION
Last checks the wtmp file, which records all logins and logouts for

information about a user, a serial line or any group of users and lines.
Arguments specify a user name and/or tty.
last -I

ttyOl root

would list all "root" sessions as well as all sessions on /dev/ttyOl.
last prints the sessions of the specified users and ttys, including login
name, the line used, the device name, the process ID, plus start time
and elapsed time.
last with no arguments prints a record of all log ins and logouts, in
reverse order.

The options behave as follows:
-n limit
limits the report to n lines.

-I line
specifies the tty.
-v prints header (verbose option).
Files

/etc/wtmp

login data base

See Also

finger(C), utmp(M), accton(ADM), acctcom(ADM), acct(F)

June 29, 1988

Page 1

LC(C)

LC(C)

Name
Ie - Lists directory contents in columns.

Syntax

Ie [-lACFRabcdfgilmnopqrstux ] name ...
Description
Ie lists the contents of files and directories, in columns. If name is a
directory name, Ie lists the contents of the directory; if name is a
filename, Ie repeats the filename and any other information requested.
Output is given in columns and sorted alphabetically. If no argument
is given, the current directory is listed. If several arguments are given,
they are sorted alphabetically, but file arguments appear before directories.

Files that are not the contents of a directory being interpreted are
always sorted across the page rather than down the page in columns.
A stream output format is available in which files are listed across the
page, separated by commas. The -m option enables this format.
The options are:
-1 Forces an output format with one entry per line.
-A If not the root directory, this option displays all files that begin

with"." (except"." and " .. " themselves). Otherwise, files are
displayed normally.

-C Forces columnar output, even if redirected to a file.
-F Causes directories to be marked with a trailing "/" and executable

files to be marked with a trailing "*".
-R Recursively lists subdirectories.
-a Lists all entries; "." and" .. " are not suppressed.
-b Forces printing of nongraphic characters in the \ddd notation, in

octal.
-c Sorts by time of file creation, for use with -t option.
-d If the argument is a directory, lists only its name, not its contents
(mostly used with -I to get status on directory).

May 16, 1988

Page 1

LC(C)
~f

LC(C)

Forces each argument to be interpreted as a directory and lists the
name found in each slot. This option turns off -I, -t, -s, and -r, and
turns on -a; the order is the order in which entries appear in the
directory.

-g The same as -I, except that the owner is not printed.

-i Prints inode number in first column of the report for each file
listed.
-I Lists in long format, giving mode, number of links, owner, group,
size in bytes, and time of last modification for each file. If the file
is a special file, the size field instead contains the major and minor
device numbers.
-m
Forces stream output format.
-0

Same as the -I switch, but the owner's user ID appears instead of
the owner's name. If used in conjunction with the -g switch, the
owner's group ID appears instead of the group name.

-0

The same as -I, except that the group is not printed.

-p Pad output with spaces.
-q Forces printing of nongraphic characters in filenames as the character "?".

-r Reverses the order of sort to get reverse alphabetic or oldest first as
appropriate.
-s Gives size in 512-byte blocks, including indirect blocks for each
entry.

-t Sorts by time modified (latest first) instead of by name, as is normal.

-u Uses time of last access instead of last modification for sorting (-t)
or printing (-I).

-x Forces columnar printing to be sorted across rather than down the
page.
The following are alternate invocations of the Ie command:

If Produces the same output as Ie -F.
Ir Produces the same output as Ie -R.

May 16, 1988

Page 2

LC(C)

LC(C)

Ix Produces the same output as Ie -x.
The mode printed under the -I option contains 11 characters. The first
character is:
If the entry is a plain file

d

If the entry is a directory

b

If the entry is a block-type special file

c

If the entry is a character-type special file

p If the entry is a named pipe

s

If the entry is a semaphore

m If the entry is shared data (memory)

The next 9 characters are interpreted as 3 sets of 3 bits each. The first
set refers to owner permissions; the next to permissions to others in
the same user-group; and the last to all others. Within each set, the 3
characters indicate permission respectively to read, to write, or to execute the file as a program. For a directory, "execute" permission is
interpreted to mean permission to search the directory for a specified
file. The permissions are indicated as follows:
r

If the file is readable

w If the file is writable

x If the file is executable
If the indicated permission is not granted

The group-execute permission character is given as s if the file has
set-group-ID mode; likewise the user-execute permission character is
given as s if the file has set-user-ID mode.
The last character of the mode (normally "x" or "-") is t if the 1000
bit of the mode is on. See chmod(C) for the meaning of this mode.
When the sizes of the files in a directory are listed, a total count of
blocks, including indirect blocks, is displayed.

Files
/etc/passwd

May 16, 1988

To get user IDs for "Ie

-0"

Page 3

LC(C)

LC(C)
/etc/group

To get group IDs for' 'Ie -g"

Credit

This utility was developed at the University of California at Berkeley
and is used with pennission.
Notes

Newline and tab are considered printing characters in filenames. The
output device is assumed to be 80 columns wide. Column width
choices are poor for tenninals that can tab.
This utility reports sizes in 512 byte blocks. On systems which use
1024 byte blocks, this means a file of 500 bytes uses 2 blocks. Ie -s
will report 2 blocks used, rather than 1 block, since the file uses one
system block of 1024 bytes. Refer to the machine(M) manual page
for the block size used by your system.

May 16, 1988

Page 4

LINE (C)

LINE (C)

Name
line - Reads one line.

Syntax
line
Description
line copies one line (up to a newline) from the standard input and
writes it on the standard output. It returns an exit code of 1 on endof-file and always prints at least a newline. It is often used within
shell files to read from the user's terminal.

See Also
gets(CP), sh(C)

May 16,1988

Page 1

LN(C)

LN(C)

Name
In - Makes a link to a file.
Syntax

In file 1 file2
In file 1 ... directory
Description
A link is a directory entry referring to a file; the same file (together
with its size, all its protection information, etc). may have several
links to it. There is no way to distinguish a link to a file from its original directory entry. Any changes to the file are effective independent
of the name by which the file is known.
In the first case, In creates a link to the existing file, filel. The file2
argument is a new name referring to the same file contents as filel.
In the second case, directory is the location of a directory into which
one or more links are created with corresponding file names.

You cannot link to a directory or link across file systems.
See Also
ep(C), mv(C), rm(C)

May 16, 1988

Page 1

LOCK (C)

LOCK (C)
Name

lock - Locks a user's terminal.
Syntax
lock [-v] [ -number]
Description

lock requests a password from the user, requests it again for verification, then locks the terminal until the password is reentered. If a
-number is specified in the lock command, the terminal is automatically logged out and made available to another user after that number
of minutes has passed.

This command uses the file letcldefaultllock. This file has two entries:
DEFLOGOUT = number
MAXLOGOUT = number
DEFLOGOUT specifies the default time in minutes a terminal will
remain locked before the user is logged out. This default value is
overridden if the -number option is used on the command line. If
DEFLOGOUT and -number are not specified, the MAXLOGOUT
value is used.
MAXLOGOUT is the maximum number of minutes a user is permitted to lock a terminal. If a user attempts to lock a terminal for longer
than this time, lock will issue a warning to the user that it is using the
system maximum time limit. If DEFLOGOUT and -number and
MAXLOGOUT are not specified, users are not logged out.
DEFLOGOUT and MAXLOGOUT are configured by the system
administrator to reflect the demand for terminals at the site.
The lock may be terminated by killing the lock process. Only the
superuser and the user who invoked lock may do so.
Options

-number

Sets the time limit for lock to number of minutes, instead
of the system default.

-v

Specifies verbose operation.

Files
jetcjdefault/lock

May 16, 1988

Page 1

LOCK (C)

LOCK (C)

Notes
The file letcldefaultllock is shipped with the following default values:
DEFLOGOUT = 30
MAXLOGOUT = 60

May 16, 1988

Page 2

LOGNAME(C)

LOGNAME(C)

Name

logname - Gets login name.
Syntax
logname
Description

logname returns the user's login name as found in letc!utmp. If no
login name is found, logname returns the user's user ill number.
See Also

env(C), id(C), getlogin(S), getuid(S), login(M), logname(S)

May 16, 1988

Page 1

LP(C)

LP(C)

Name

lp, lpr, cancel - Send/cancel requests to lineprinter.
Syntax

Ip [options ... ][name ... ]
or
Ipr [options ... ][name ... ]
cancel [request ID s] [printers]
Description
lp causes the named files and associated information (collectively
called a "request") to be printed by a lineprinter. lp and lpr are
equivalent commands and may be used interchangeably. If no file

names are mentioned, the standard input is assumed. The file name stands for the standard input and may be supplied on the command
line in conjunction with named files. The order in which files appear
is the same order in which they will be printed.
lp associates a unique request ID with each request and prints it on the
standard output. This request ID can be used later to cancel (see cancel) or find the status of the request (see Ipstat(C)).

The following options to lp may appear in any order and may be intermixed with file names:
-c

Makes copies of the files to be printed immediately when
lp is invoked. Normally, files will not be copied, but will
be linked whenever possible. If the -c option is not given,
then the user should be careful not to remove any of the
files before the request has been printed in its entirety; any
changes made to the named files after the request is made
but before it is printed will be reflected in the printed output.

-ddest

Chooses dest as the printer or class of printers to do the
printing. If dest is a printer, then the request will be
printed only on that specific printer. If dest is a class of
printers, then the request will be printed on the first available printer that is a member of the class. Under certain
conditions (for example, printer unavailability or file space
limitation), requests for specific destinations may not be
accepted (see accept(C) and Ipstat(C)). By default, dest is
taken from the environment variable LPDEST (if it is set).
Otherwise, a default destination (if one exists) for the computer system is used. Destination names vary between systems (see Ipstat(C)).

May 16, 1988

Page 1

LP(C)

LP(C)
-m

Sends mail (see mail (C» after the files have been printed.
By default, no mail is sent upon normal completion of the
print request.

-nnumber Prints number of copies of the output. The default is one.
-ooption

Specifies printer-dependent or class-dependent options.
Several such options may be collected by specifying the -0
keyletter more than once. For more information about
what is valid for options, see Ipadmin (ADM).

-r

Removes file after sending it.

-s

Suppresses messages from Ip(C) such as "request id is ... ".

-ttitle

Prints title on the banner page of the output.

-T

Local printing option. Sends print job to printer attached to
the terminal.

-w

Writes a message on the user's terminal after the files have
been printed. If the user is not logged in, then mail is sent
instead.

The file /etc/default/lpd contains the setting of the variable
BANNERS, whose value is the number of pages printed as a banner
identifying each printout. This is normally set to either 1 or 2.
Cancel cancels line printer requests that were made by the Ip(C) command. The command line arguments may be either request IDs (as
returned by Ip(C» or printer names (for a complete list, use Ipstat(C».
Specifying a request ID cancels the associated request even if it is
currently printing. Specifying a printer cancels the request which is
currently printing on that printer. In either case, the cancellation of a
request that is currently printing frees the printer to print its next
available request. User's identification and accounting data spool area
contains BANNERS setting.

Files
/etc/passwd
/usr/spool/lp/ *
/etc/default/lpd

See Also
enable(C),
Ipstat(C),
Ipsched(ADM)

May 16, 1988

mail(C),

accept(C),

Ipadmin(ADM),

Page 2

LP (C)

LP(C)

Notes
lp and lpr only print files that are publicly readable. The file's directory and all directories in the path must also be publicly readable. The
following are two possible workarounds:

pr filename I lp
cat filename I lp

May 16, 1988

Page 3

LPR(C)

LPR(C)

Name
lpr - Sends files to the lineprinter queue for printing.

Syntax
lpr [ option ... ] [ name ... ]

Description
lpr causes the named files to be queued for printing on a lineprinter.
If no names appear, the standard input is assumed; thus lpr may be
used as a filter.

The following options may be given (each as a separate argument and
in any order) before any filename arguments:
-c

Makes a copy of the file and prints the copy and not the original. Normally files are linked whenever possible.

-r

Removes the file after sending it.

-m

When printing is complete, reports that fact by mail (C).

-n

Prints number of copies of output.

The file ietcidefaultilpd contains the setting of the variable
BANNERS, whose value is the number of pages printed as a banner
identifying each printout. This is normally set to either 1 or 2.

Files
/etc/passwd

User's identification and accounting data

/usr/lib/lpd

Lineprinter daemon

/usr/spool/lpd/ *

Spool area

/etc/default/lpd

Contains BANNERS default setting

/etc/lpopen

On some systems - sets modes on a serial line

See Also
banner(C), Ip(C)

May 16, 1988

Page 1

LPR (C)

LPR (C)

Notes

Once a file has been queued for printing, it should not be changed or
deleted until printing is complete. If you want to alter the contents of
the file or to remove the file immediately, use the -c option to force lpr
to make its own copy of the file.

May 16, 1988

Page 2

LPRINT(C)

LPRINT(C)

Name
lprint - print to a printer attached to the user's terminal

Syntax
lprint [ - ] file
Description
Iprint(C) accepts a filename to print or - to read from the keyboard. If
the terminal has local printing abilities, it will then print the file to a
printer attached to the printer port of the terminal.

This command uses the file letc/termcap.

Options
Tells lprint to use the standard input for printing.

Files
letc/termcap
Notes
The only terminals currently supported with entries in /etc/termcap are
Tandy's DT-l00 and DT-l, and Hewlett-Packard's HP-92.
To add attached printer capability to the termcap file for a different
terminal, add entries for PN (start printing) and PS (end printing) with
the appropriate control or escape characters for your terminal.
Terminal communications parameters (such as baud rate and parity)
must be set up on the terminal by the user.

See Also
"U sing Printers" in the XENIX System Administrator's Guide.

May 16, 1988

Page 1

LPSTAT(C)

LPSTAT(C)

Name
lpstat - prints lineprinter status infonnation
Syntax
Ipstat [ options ... ]
Description
lpstat prints infonnation about the current status of the lineprinter system.

If no options are given, then lpstat prints the status of all requests
made to Ip(C) by the user. Any arguments that are not options are
assumed to be request IDs (as returned by lp). lpstat prints the status
of these requests. Options may appear in any order and may be
repeated and intennixed with other arguments. Some of the following
options may be followed by list which can be in one of two fonns: a
list of items separated from one another by a comma, or a list of items
enclosed in double quotes and separated from one another by a comma
and/or one or more spaces. For example:
-u "userl, user2, user3' ,
The omission of a list following such options causes all infonnation
relevant to the option to be printed, for example:
lpstat

-0

prints the status of all output requests.
-a[ list]

Prints acceptance status (with respect to lp) of destinations
for requests. List is a list of intennixed printer names and
class names.

-c[ list]

Prints class names and their members. List is a list of class
names.

-d

Prints the system default destination for lp.

-o[ list]

Prints the status of output requests. List is a list of intermixed printer names, class names, and request IDs.

-p[ list]

Prints the status of printers. List is a list of printer names.

-r

Prints the status of the lineprinter scheduler, lpsched.

May 16, 1988

Page 1

LPSTAT (C)

LPSTAT (C)

-s

Prints a status summary, including the status of the lineprinter scheduler, the system default destination, Prints a
status summary, including the system default destination, a
list of class names and their members, and a list of printers
and their associated devices.

-t

Prints all status information.

-o[ list]

Prints status of output requests for users. List is a list of
login names.

-v[ list]

Prints the names of printers and the pathnames of the devices associated with them. List is a list of printer names.

Files
/usr/spool/lp/*
See Also
enable(C), Ip(C)

May 16, 1988

Page 2

LS(C)

L~(C)

Name
Is - Gives infonnation about contents of directories.
Syntax
Is [-ACFRabcdfgilmnopqrstux] [names]
Description
For each directory named, Is lists the contents of that directory; for
each file named, Is repeats its name and any other infonnation
requested. By default, the _output is sorted alphabetically. When no
argument is given, the current directory is listed. When several arguments are given, the arguments are first sorted appropriately, but file
arguments are processed before directories and their contents.
There are three major listing fonnats. The default fonnat is to list one
entry per line, the -C and -x options enable multi-column fonnats, and
the -m option enables stream output fonnat in which files are listed
across the page, separated by commas. In order to detennine output
fonnat for the -C, -x, and -m options, Is uses an environment variable,
COLUMNS, to detennine the number of character positions available
on one output line. If this variable is not set, the termcap database is
used to detennine the number of columns, based on the environment
variable TERM. If this infonnation cannot be obtained, 80 columns
are assumed.
There are many options:
-A

List all entries; entries whose name begin with a period (.) are
listed. Does not list current directory (.) and directory above
( .. ).

-a

Lists all entries; entries whose name begin with a period (.) are
listed.

-R

Recursively lists subdirectories encountered.

-d

If an argument is a directory, lists only its name (not its con-

tents); often used with -I to get the status of a directory.
-C

Multi-column output with entries sorted down the columns.

-x

Multi-column output with entries sorted across rather than down
the page.

-m

Stream output fonnat.

May 16, 1988

Page 1

LS(C)

LS(C)

-I

Lists in long format, glvmg mode, number of links, owner,
group, size in bytes, and time of last modification for each file
(see below). If the file is a special file, the size field will contain
the major and minor device numbers, rather than a size.

-n

The same as -I, except that the owner's UID and group's GID
numbers are printed, rather than the associated character strings.

-0

The same as -I, except that the group is not printed.

-g

The same as -I, except that the owner is not printed.

-r

Reverses the order of sort to get reverse alphabetic or oldest
first, as appropriate.

-t

Sorts by time modified (latest first) instead of by name.

-u

Uses time of last access instead of last modification for sorting
use with the -t option.

-c

Uses time of last modification of the inode (file created, mode
changed, etc.) for sorting use with -t option.

-p

Puts a slash (/) after each filename if that file is a directory.

-F

Puts a slash (I) after each filename if that file is a directory and
puts an asterisk (*) after each filename if that file is executable.

-b

Forces printing of non-graphic characters to be in the octal \ddd
notation.

-q

Forces printing of non-graphic characters in file names as the
character (?).

-i

For each file, prints the inode number in the first column of the
report.

-s

Gives size in blocks, including indirect blocks, for each entry.

-f

Forces each argument to be interpreted as a directory and lists
the name found in each slot. This option turns off -I, -t, -s, and r, and turns on -a; the order is the order in which entries appear
in the directory.

The mode printed under the -I option consists of 11 characters. The
first character is:
If the entry is an ordinary file.
d

If the entry is a directory.

May 16, 1988

Page 2

LS(C)

LS(C)

b

If the entry is a block special file.

c

If the entry is a character special file.

P

If the entry is a named pipe.

s

If the entry is a semaphore.

m

If the entry is a shared data (memory) file.

The next 9 characters are interpreted as 3 sets of 3 bits each. The first
set refers to the owner's permissions; the next to permissions of others
in the user-group of the file; and the last to all others. Within each set,
the 3 characters indicate permission to read, to write, and to execute
the file as a program, respectively. For a directory, "execute" permission is interpreted to mean permission to search the directory for a
specified file.
The permissions are indicated as follows:
r

If the file is readable.

w

If the file is writable.

x

If the file is executable.
If the indicated permission is not granted.

The group-execute permission character is given as s if the file has
set-group-ID mode; likewise, the user-execute permission character is
given as s if the file has set-user-ID mode. The last character of the
mode (normally x or -) is t if the 1000 (octal) bit of the mode is on; see
chmod(C) for the meaning of this mode. The indications of set-ID and
1000 bit of the mode are capitalized if the corresponding execute permission is not set.
When the sizes of the files in a directory are listed, a total count of
blocks including indirect blocks is printed.

Files
/etc/passwd

Gets user IDs for Is -1 and Is

/etc/group

Gets group IDs for Is -1 and Is -g

/etc/termcap/*

Gets terminal information

-0

See Also
chmod(C), find(C), I(C), 1c(C), termcap(C)

May 16, 1988

Page 3

LS (C)

LS(C)

Notes

Newline and tab are considered printing characters in filenames.
Unprintable characters in filenames may confuse the columnar output
options.
This utility reports sizes in 512 byte blocks. Systems which define a
block as 1024 characters, "round-off' the size of files containing 511
or fewer bytes to 1 block. Is -s interprets 1 block from a 1024 byte
block system as 2 of its own 512 byte blocks. Thus a 500 byte file is
interpreted as 2 blocks rather than 1. Refer to the machine(M)
manual page for the block size used by your system.

May 16,1988

Page 4

MAIL (C)

MAIL (C)

Name
mail - Sends, reads or disposes of mail.
Syntax

mail [[-u user] [-fmailbox]] [-e] [-R] [-i] [users ... ]
mail [-s subject] [-i] [user ...J
Description
mail is a mail processing system that supports composing of messages, and sending and receiving of mail between multiple users.
When sending mail, a user is the name of a user or of an alias assigned
to a machine or to a group of users.

Options include:
-u user
Tells mail to read the system mailbox belonging to the specified
user.
-fmailbox
Tells mail to read the specified mailbox instead of the default
user's system mailbox.

-e Allows escapes from compose mode when input comes from a file.
-R Makes the mail session "read-only" by preventing alteration of
the mailbox being read. Useful when accessing system-wide mailboxes.
-i Tells mail to ignore interrupts sent from the terminal. This is useful when reading or sending mail over telephone lines where
"noise" may produce unwanted interrupts.
-s subject
Specifies subject as the text of the Subject: field for the message
being sent.

Sending mail

To send a message to one or more other people, invoke mail with
arguments which are the names of people to send to. You are then
expected to type in your message, followed by a Ctrl-D at the beginning of a line.

May 16, 1988

Page 1

MAIL (C)

MAIL (C)

Reading Mail

To read mail, invoke mail with no arguments. This will check your
mail out of the system-wide directory so that you can read and dispose
of the messages sent to you. A message header is printed out for each
message in your mailbox The current message is initially the last numbered message and can be printed using the print command (which
can be abbreviated p). You can move among the messages much as
you move between lines in ed, with the commands + and - moving
backwards and forwards, and simple numbers typing the addressed
message.
If new mail arrives during the mail session, you can read in the new
messages with the restart command.
Note that you can configure your environment so that you are notified
whenever new mail is sent to you. To do so, you would have to set the
MAIL shell variable if you are using the Bourne shell or the mail
shell variable if you are using the C-shell. For more information, see
"The Shell" chapter of the XENIX User's Guide and csh(C) in the
XENIX User's Reference.
Disposing of Mail

After examining a message, you can delete (d) the message or reply
(r) to it. Deletion causes the mail program to forget about the message. This is not irreversible, the message can be undeleted (u) by
giving its number, or the mail session can be aborted by giving the
exit (x) command. Deleted messages will, however, disappear.
Specifying Messages

Commands such as print and delete often can be given a list of message numbers as arguments to apply to a number of messages at once.
Thus "delete 1 2" deletes messages 1 and 2, while "delete 1-5"
deletes messages 1 through 5. The special name "*" addresses all
messages, and "$" addresses the last message; thus the command top
which prints the first few lines of a message could be used in "top *"
to print the first few lines of all messages.
Replying to or Originating Mail

You can use the reply command to set up a response to a message,
sending it back to the person who sent it. Then you can enter in the
text of the reply, and press Ctrl-D to send it. While you are composing
a message, mail treats lines beginning with a tilde C) as special. For
instance, typing "-m" alone on a line, places a copy of the current
message into the response, right shifting it by one tabs top. Other
escapes set up subject fields, add and delete recipients to the message,
and allow you to escape to an editor to revise the message or to a shell

May 16, 1988

Page 2

MAIL (C)

MAIL (C)

to run some commands. (These options are given in the summary
below.)
Ending a Mail Session

You can end a mail session with the quit (q) command. Messages that
have been examined go to your mbox file unless they have been
deleted, in which case they are discarded. Unexamined messages go
back to the post office. The -f option causes mail to read in the contents of your mbox (or the specified file) for processing; when you
quit, mail writes undeleted messages back to this file. The -i option
causes mail to ignore interrupts.
Using Aliases and Distribution Lists

It is also possible to create a personal distribution list. For instance,
you can send mail to "cohorts" and have it go to a group of people.
Such lists can be defined by placing a line like
alias cohorts bill bob barry bobo betty beth bobbi
in the file .mailrc in your home directory. The current list of such
aliases can be displayed by the alias (a) command in mail. Systemwide distribution lists can be created by editing /usr/lib/mail/aliases,
see aliases (M); these are kept in a slightly different syntax. In mail
you send, personal aliases will be expanded in mail sent to others so
that they will be able to reply to the recipients. System-wide aliases
are not expanded when the mail is sent, but any reply returned to the
machine will have the system-wide alias expanded.
mail has a number of options which can be set in the .mailrc file to
alter its behavior; thus "set askcc" enables the "askcc" feature.
(These options are summarized below.)
Summary

Each mail command is entered on a line by itself, and may take arguments following the command word. The command need not be
entered in its entirety; the first command which matches the typed
prefix is used. For the commands that take message lists as arguments; if no message list is given, then the next message forward that
satisfies the command's requirements is used. If there are no messages
forward of the current message, the search proceeds backwards, and if
there are no messages at all, mail types "No applicable messages"
and aborts the command.
Goes to the previous message and prints it out. If given
a numeric argument n, goes to the nth previous message and prints it.

May 16, 1988

Page 3

MAlL (C)

MAlL (C)

+

Goes to the next message and prints it out. If given a
numeric argument n, goes to the nth next message and
prints it.

RETURN

Goes to the next message and prints it out.

?

Prints a brief summary of commands.
Executes the shell command which follows.

=

Prints out the current message number.
Prints out the first message.

$

Prints out the last message.

alias

(a) With no arguments, prints out all currently-defined
aliases. With one argument, prints out that alias. With
more than one argument, adds the users named in the
second and later arguments to the alias named in the
first argument.

Alias users

Prints system-wide list of aliases for users. At least one
user must be specified.

cd

(c) Changes the user's working directory to that
specified, if given. If no directory is given, then
changes to the user's login directory.

delete

(d) Takes a list of messages as an argument and marks
them all as deleted. Deleted messages are not retained
in the system mailbox after a quit, nor are they available to any command other than the undelete command.

dp

Deletes the current message and prints the next message. If there is no next message, mail says "no more
messages.' ,

echo path

Expands shell metacharacters.

edit

(e) Takes a list of messages and points the text editor at
each one in tum. On return from the editor, the message
is read back in.

exit

(x) Effects an immediate return to the shell without
modifying the user's system mailbox, his mbox file, or
his edit file in -f.

file

(fi) Prints the name of the file mail is reading. If it is a
mailbox, the name of the owner is returned.

May 16, 1988

Page 4

MAIL (C)

MAIL (C)

forward

(f) Forwards the current message to the named users.
Current message is indented within forwarded message.

Forward

(F) Forwards the current message to the named users.
Current message is not indented within forwarded message.

headers

(h) Lists the current range of headers, which is an 18
message group. If a "+" argument is given, then the
next 18 message group is printed, and if a "-" argument is given, the previous 18 message group is
printed. Both "+" and "-" may take a number to view
a particular window. If a message-list is given, it prints
the specified headers.

hold

(ho) Takes a message list and marks each message
therein to be saved in the user's system mailbox instead
of in mbox. Use only when the switch autombox is set.
Does not override the delete command.

list

Prints list of mail commands.

Ipr

(I) Prints out each message in a message-list on the
lineprinter.

mail

(m) Takes as arguments login names and distribution
group names and sends mail to those people.

mbox

(mb) Marks messages in a message list so that they are
saved in the user mailbox after leaving mail.

move mesg-list mesg-num
Places the messages specified in mesg-list after the
message specified in mesg-num. If mesg-num is 0,
mesg-list moves to the top of the mailbox.
next

(n like + or RETURN) Goes to the next message in

sequence and prints it. With an argument list, types the
next matching message.
print

(p) Prints out each message in a message-list on the terminal display.

quit

(q) Terminates the session, retaining all undeleted,
unsaved messages in the system mailbox and removing
all other messages. Files marked with a star (*) are
saved; files marked with an "M" are saved in the user
mailbox. If new mail has arrived during the session,
the message "You have new mail" is given. If given
while editing a mailbox file with the -f flag, then the
mailbox file is rewritten. The user returns to the shell,
unless the rewrite of the mailbox file fails, in which

May 16, 1988

Page 5

MAIL (C)

MAIL (C)

case the user can escape with the exit command.
reply

(r) Takes a message list and sends mail to each message author. The default message must not be deleted.

Reply

(R) Takes a message list and sends mail to each mes-

sage author and each member of the message just like
the mail command. The default message must not be
deleted.
restart

Reads in messages that arrived during the current mail
session.

save

(s) Takes a message list and a filename and appends
each message in tum to the end of the file. The
filename, in quotation marks, followed by the line
count and character count is echoed on the user's terminal.

set

(se) With no arguments, prints all variable values. Otherwise, sets option. Arguments are of the form
"option=value" or "option".

shell

(sh) Invokes an interactive version of the shell.

size

(si) Takes a message list and prints out the size in characters of each message.

source

(so) Reads mail commands from the file given as its
only argument.

string string mesg-list
Searches for string in mesg-list. If no mesg-list is
specified, all undeleted messages are searched. Case is
ignored in search.
top

(t) Takes a message list and prints the top few lines of
each. The number of lines printed is controlled by the
variable toplines and defaults to six.

undelete

(u) Takes a message list and marks each one as not
being deleted.

unset

(uns) Takes a list of option names and discards their
remembered values; the inverse of set.

visual

(v) Takes a message list and invokes vi on each mes-

sage.
whois

May 16, 1988

Looks up a list of target mail recipients and prints the
real names or descriptions of each recipient. If the first
character of the first argument is alphabetic, the

Page 6

MAIL (C)

MAIL (C)
arguments are looked up without change. Otherwise,
the arguments are assumed to be a message list, in the
format specified in the Mail User's Guide. For each
message in the list, the "From" person is extracted
from the header and added to the list of users to be
searched.
If a target mail recipient contains a machine and user
name, nothing is printed. If it is a private alias,
"private alias" is printed. If it is a global alias, the

name or description of the recipient is printed (contents
of the $n field in the alias file). If all of the above fail,
the user is looked up in /etc/passwd; if the user is a
local user, "local user" is printed. Finally, if none of
the above tests and searches succeed, "unknown" is
printed.
write filename
(w) Saves the body of the message in the named file.

Here is a summary of the compose escapes, which are used when composing messages to perform special functions. Compose escapes are
only recognized at the beginning of lines.
--string

Inserts the string of text in the message prefaced by a
single tilde C). If you have changed the escape character, then you should double that character instead.
Prints out help for compose escapes.
Same as Ctrl-D on a new line.
Executes the indicated shell command, then returns to
the message.

-Icmd

Pipes the message through the command as a filter. If
the command gives no output or terminates abnormally,
retains the original text of the message.

- mail-command
Executes a mail command, then returns to compose
mode.
-: mail-command
Executes a mail command, then returns to compose
mode.

-alias

Prints list of private aliases

-alias aliasname
Prints names included in private aliasname.

May 16,1988

Page 7

MAIL (C)

MAIL (C)

-Alias

Performs aliasing by first examining private aliases and
then system-wide aliases using all three global alias
files (aliases.hash, faliases, and maliases). Only the
final result is printed (non-local mail recipients will
have the complete delivery path printed). The user list
is taken from header fields.

-Alias users

Performs aliasing by first examining private aliases and
then system-wide aliases using all three global alias
files (aliases.hash, faliases, and maliases). Only the
final result is printed (non-local mail recipients will
have the complete delivery path printed). At least one
user must be specified.

-b name...

Adds the given names to the list of blind carbon copy
recipients.

-c name ...

Adds the given names to the list of carbon copy recipients.

-cc name ...

Same as -c above.

-d

Reads the file dead. letter from your home directory into
the message.

-e

Invokes the text editor on the message collected so far.
After the editing session is finished, you may continue
appending text to the message.

-h

Edits the message header fields by typing each one in
tum and allowing the user to append text to the end or
modify the field with the current terminal erase and kill
characters.

-m mesg-list

Reads the named messages into the message buffer,
shifted right one tab. If no messages are specified,
reads the current message.

-M mesg-list Reads the named messages into the message buffer,
with no indentation. If no messages are specified, reads
the current message.
Prints out the messages collected so far, prefaced by the
message header fields.
Prints the real names or descriptions (in parentheses)
after each recipient in a header field.
Aborts the message being sent, copying the message to
dead. letter in your home directory if save is set.

May 16, 1988

Page 8

MAIL (C)

-r filename

MAIL (C)

Reads the named file into the message buffer.

-Return name

Adds the given names to the Return-receipt-to field.

-s string

Causes the named string to become the current subject
field.

-t name ...

Adds the given names to the direct recipient list.

-v

Invokes a visual editor (defined by the VISUAL option)
on the message buffer. After you quit the editor, you
may resume appending text to the end of your message.

-w filename

Writes the body of the message to the named file.

Options are controlled with the set and unset commands. An option
may be either a switch, in which case it is either on or off, or a string,
in which case the actual value is of interest. The switch options
include the following:
askcc

Causes you to be prompted for additional carbon
copy recipients at the end of each message.
Responding with a newline indicates your satisfaction with the current list.

asksubject

Causes mail to prompt you for the subject of each
message you send. If you respond with simply a
newline, no subject field is sent.

autombox

Causes all examined messages to be saved in the
user mailbox unless deleted or saved.

autoprint

Causes the delete command to behave like dp thus, after deleting a message, the next one will be
entered automatically.

chron

Causes messages to be displayed in chronological
order.

dot

Permits use of dot (.) as the end of file character
when composing messages.

execmail

Causes the underbar prompt to return before mail is
finished being sent. This frees the user to continue
while mail performs mailing functions in background.

ignore

Causes interrupt signals from your terminal to be
ignored and echoed as at-signs (@).

May 16, 1988

Page 9

MAIL (C)

MAIL (C)

mchron

Causes messages to be listed in numerical order
(most recently received first), but displayed in chronological order.

metoo

Usually, when a group is expanded that contains the
sender, the sender is removed from the expansion.
Setting this option causes the sender to be included
in the group.

nosave

Prevents aborted messages from being appended to
the file dead. letter in your home directory on
receipt of two interrupts (or a -q).

quiet

Suppresses the printing of the version header when
first invoked.

verify

Causes each target mail recipient to be verified in
the manner described in the whois command. This
option permits errors made while composing messages to be corrected or ignored.

The following options have string values:
EDITOR

Pathname of the text editor to use in the edit command and -e escape. If not defined, then a default
editor (/bin/ed) is used.

SHELL

Pathname of the shell to use in the ! command and
the -, escape. A default shell (I binish) is used if this
option is not defined.

VISUAL

Pathname of the text editor (/binlvi) to use in the
visual command and -v escape.

escape

If defined, the first character of this option gives the
character to use in the place of the tilde C) to
denote escapes.

page=n

Specifies the number of lines (n) to be printed in a
"page" of text when displaying messages.

record

If defined, gives the pathname of the file used to
record all outgoing mail. If not defined, then outgoing mail is not saved.

toplines

If defined, gives the number of lines of a message to
be printed out with the top command; normally, the
first six lines are printed.

May 16, 1988

Page 10

MAIL (C)

MAlL (C)

Files
/usr/spool/mail/*

System mailboxes

/usr/name/dead.letter

File where undeliverable mail is deposited

/usr/name/mbox

Your old mail

/usr/name/.mailrc

File giving initial mail commands

/usr/lib/mail/aliases

System-wide aliases

/usr/lib/mail/aliases.hash

System-wide alias database

/usr/lib/mail/faliases

Forwarding
machine

/usr/lib/mail/maliases

Machine aliases

/usr/lib/mail/mailhelp.cmd

Help file

/usr/lib/mail/mailhelp.esc

Help file

/usr/lib/mail/mailhelp.set

Help file

/usr/lib/mail/mailrc

System initialization file (defaults)

/usr/bin/mail

The mail command

aliases

for

the

local

See Also
aliases(M), aliashash(ADM), netutil(ADM) Chapter 3, "Mail", in the
XENIX User's Guide.
Credit
This utility was developed at the University of California at Berkeley
and is used with permission.

May 16, 1988

Page 11

MESG(C)

MESG (C)

Name

mesg - Pennits or denies messages sent to a tenninal.
Syntax
mesg [n] [y]
Description
mesg with argument n forbids messages via write(C) by revoking
nonuser write pennission on the user's tenninal. mesg with argument
y reinstates pennission. All by itself, mesg reports the current state

without changing it.
Files

/dev/tty*
See Also

write(C)
Diagnostics

Exit status is 0 if messages are receivable, 1 if not, 2 on error.

May 16, 1988

Page 1

MKDIR (C)

MKDIR (C)

Name
mkdir - Makes a directory.
Syntax
mkdir dirname ...
Description
mkdir creates directories. The standard entries "dot" (.), for the
directory itself, and "dot dot" (.. ), for its parent, are made automatically.
mkdir requires write permission in the parent directory. The permissions assigned to the new directory are modified by the current file
creation mask set by umask (C).

See Also
rmdir(C), umask(C)
Diagnostics
mkdir returns exit code 0 if all directories were successfully made;
otherwise, it prints a diagnostic and returns nonzero.

May 16, 1988

Page 1

MKNOD (C)

MKNOD (C)

Name
mknod - Builds special files.

Syntax
letc/mknod name [ c ] [ b ] major minor
letc/mknod name p
letc/mknod name s
letc/mknod name m
Description
mknod makes a directory entry and corresponding inode for a special
file. The first argument is the name of the entry. In the first case, the
second argument is b if the special file is block-type (disks, tape) or c
if it is character-type (other devices). The last two arguments are
numbers specifying the major device type and the minor device (e.g.,
unit, drive, or line number), which may be either decimal or octal.

The assignment of major device numbers is specific to each system.
Major device numbers can be found in the system source file c.c.
mknod can also be used to create named pipes with the p option;
semaphores with the s option; and shared data (memory) with the m
option.

Only the super-user can use the first form of the syntax.

System Compatibility
The s and m options can only be used to create XENIX version 3.0
semaphores and shared data, not XENIX System V semaphores and
shared data.

See Also
mknod(S)

May 16, 1988

Page 1

MNT(C)

MNT(C)

Name
mnt - mount a filesystem

Syntax
/etc/mnt [ -urat ] [ directory
/etc/umnt directory
Description
mnt allows users other than the super-user to access the functionality
of the mount(ADM) command to mount selected filesystems. The
super-user can define how and when a filesystem mount is permitted
via special entries in the letcldefaultlfilesys file.

The filesystem requirements are the same as defined for mount(ADM).
umnt removes the removable filesystem previously mounted at the
mount point directory .
mnt is invoked from letclrc with the -r and possibly the -a flag to
mount filesystems when the system comes up multi-user. The -a flag
is used when the system has autobooted. Neither of these flags should
be specified during normal use.

The -t flag displays the contents of /etc/default/filesys.
The -u flag forces mnt to behave like umnt.

Options
The following options can be defined in the letcldefaultlfilesys entry
for a filesystem:
bdev=/dev /device

Name of block device associated with the
fi1esystem.

cdev=/dev/device

Name of character (raw) device associated
with the filesystem.

mountdir=/directory

The directory the file system is to be mounted
on.

desc=name

A string describing the fi1esystem.

May 16, 1988

Page 1

MNT(C)

passwd=string

MNT(C)

An optional password prompted for at mount
request time. Cannot be a simple string; must
be in the format of /etc/passwd. (See Notes.)

fsck=yes, no, dirty, prompt
If yes/no, tells explicitly whether or not to run
fsek. If dirty, fsek is run only if the filesystem
requires cleaning. If prompt, the user is
prompted for a choice. If no entry is given,
the default value is dirty.
fsckflags=jlags

Any flags to be passed to fsek.

rcfsck=yes, no, dirty, prompt
Similar to fsck entry, but only applies when
the -r flag is passed. MOOO
maxcleans=n

The number of times to repeat cleaning of a
dirty filesystem before giving up. If
undefined, default is 4.

mount=yes, no, prompt
If yes or no, users are allowed or disallowed
to mount the filesystem, respectively. . If
prompt, the user is queried to mount the
filesystem.
rcmount=yes, no, prompt
If yes, the file system is mounted by letclre
when the system comes up multiuser. If no,
the file system is never mounted by letclre.

With prompt, a query is displayed at boot
time to mount the filesystem.
mountflags=jlags

Any flags to be passed to mount.

prep=yes, no, prompt

Indicates whether any prepcmd entry should
always be executed, never executed, or executed as specified by user.

prepcmd=eommand

An arbitrary shell command to be invoked
immediately following password check and
prior to runningfsek.

init=yes, no, prompt

Indicates whether an initcmd entry should
always be executed, never be executed, or
executed as specified by user.

initcmd=eommand

An optional, arbitrary shell command to be
invoked immediately following a successful
mount.

May 16, 1988

Page 2

MNT(C)

MNT(C)

Any entries containing spaces, tabs, or newlines must be contained in
double quotes (").
The only mandatory entries in /etc!default/filesys are bdev and
mountdir. The prepcmd and initcmd options can be used to execute
another command before or after mounting the filesystem. For example, initcmd could be defined to send mail to root whenever a given
file system is mounted.
When invoked without arguments, mnt attempts to mount all filesysterns that have the entries mount=yes or mount=prompt.
Examples
The following is a sample /etc! default/filesys file:
bdev=/dev/root cdev=/dev/rroot mountdir=/ \
desc="The Root Filesystem" rcmount=no mount=no
bdev=/dev/u
fsckftags=-y

cdev=/dev/m mountdir=/u rcmount=yes
desc="The User Filesystem"

\

bdev=/dev/x cdev=/dev/rx mountdir=/u rcmount=no \
mount=yes fsckftags=-y desc="The Extra Filesystem"
Of the examples above, only /x is mountable by the user.

Files
/etc/default/filesys

Filesystem data

See Also
mount(ADM), default(M)
Diagnostics
mnt will fail if the filesystem to be mounted is currently mounted
under another name.

Busy filesystems cannot be dismounted with umnt. A filesystem is
busy if it contains an open file or if a user's present working directory
resides within the filesystem.
Notes
Some degree of validation is done on the filesystem, however it is generally unwise to mount corrupt filesystems

May 16,1988

Page 3

MNT(C)

MNT(C)

In order to create a password for a filesystem, you must create a
dummy account in letclpasswd and define a password for it. You can
then edit the letclpasswd file and transfer the encrypted password into
the password entry for the filesystem in letcldefaultlfilesys.

May 16, 1988

Page 4

MORE (C)

MORE (C)

Name
more - Views a file one screen full at a time.

Syntax
more [ -cdflrsuw ] [ -n ] [ +linenumber ] [ +/pattem ] [name ... ]
Description
This filter allows examination of a continuous text one screen full at a
time. It normally pauses after each full screen, displaying:
--More-at the bottom of the screen. If the user then presses a carriage return,
one more line is displayed. If the user presses the SPACE bar, another
full screen is displayed. Other possibilities are described below.
The command line options are:
-n An integer which is the size (in lines) of the window which more
will use instead of the default.

-c more draws each page by beginning at the top of the screen and
erasing each line just before it draws on it. This avoids scrolling
the screen, making it easier to read while more is writing. This
option is ignored if the terminal does not have the ability to clear
to the end of a line.
-d more prompts with the message "Hit space to continue, Rubout to

abort" at the end of each full screen. This is useful if more is being
used as a filter in some setting, such as a class, where many users
may be inexperienced.
-f This option causes more to count logical, rather than screen lines.

That is, long lines are not folded. This option is recommended if
nroff output is being piped through ul, since the latter may generate
escape sequences. These escape sequences contain characters that
would ordinarily occupy screen positions, but do not print when
they are sent to the terminal as part of an escape sequence. Thus
more may think that lines are longer than they actually are and fold
lines erroneously.

-I Does not treat Ctrl-L (form feed) specially. If this option is not
given, more pauses after any line that contains a Ctrl-L, as if the
end of a full screen has been reached. Also, if a file begins with a
form feed, the screen is cleared before the file is printed.

May 16, 1988

Page 1

MORE (C)

MORE (C)

-s Squeezes multiple blank lines from the output, producing only one
blank line. Especially helpful when viewing nroff output, this
option maximizes the useful infonnation present on the screen.
-u Nonnally, more handles underlining, such as that produced by nroff

in a manner appropriate to the particular terminal: if the terminal
can perform underlining or has a stand-out mode, more outputs
appropriate escape sequences to enable underlining or stand-out
mode for underlined infonnation in the· source file. The -u option
suppresses this processing.
-r Nonnally, more ignores control characters that it does not interpret
in some way. The -r option causes these to be displayed as "C

where "C" stands for any such character.
-w Nonnally, more exits when it comes to the end of its input. With w however, more prompts and waits for any key to be struck before
exiting.
+linenumber
Starts up at linen umber.
+/pattern
Starts up two lines before the line containing the regular expression pattern.
more looks in the file /etc/termcap to determine terminal characteristics, and to determine the default window size. On a terminal capable
of displaying 24 lines, the default window size is 22 lines.
more looks in the environment variable MORE to preset any flags
desired. For example, if you prefer to view files using the -c mode of
operation, the shell command "MORE=-c" in the .profile file causes
all invocations of more to use this mode.

If more is reading from a file, rather than a pipe, a percentage is
displayed along with the "--More--" prompt. This gives the fraction
of the file (in characters, not lines) that has been read so far.
Other sequences which may be entered when more pauses, and their
effects, are as follows (i is an optional integer argument, defaulting to
1):

i
Displays i more lines, (or another full screen if no argument is
given).
Ctrl-D

Displays 11 more lines (a "scroll"). If i is given, then the scroll
size is set to i .

May 16, 1988

Page 2

MORE (C)

MORE (C)

d Same as Ctrl-D.
i z Same as entering a space except that i, if present, becomes the

new window size.
i s Skips i lines and displays a full screen of lines.

if Skips i full screens and displays a full screen of lines.
qorQ
Exits from more.
Displays the current line number.
v Starts up the screen editor vi at the current line. Note that vi may
not be available with your system.
h or?
Help command; Gives a description of all the more commands.
i /expr

Searches for the i th occurrence of the regular expression expr. If
there are less than i occurrences of expr, and the input is a file
(rather than a pipe), then the position in the file remains
unchanged. Otherwise, a full screen is displayed, starting two
lines before the place where the expression was found. The user's
erase and kill characters may be used to edit the regular expression. Erasing back past the first column cancels the search command.
in Searches for the i th occurrence of the last regular expression
entered.
(Single quotation mark) Goes to the point from which the last
search started. If no search has been performed in the current file,
this command goes back to the beginning of the file.
!command
Invokes a shell with command. The characters % and ! in "command" are replaced with the current filename and the previous
shell command respectively. If there is no current filename, % is
not expanded. The sequences "\%" and "\!" are replaced by
"%" and "!" respectively.
i :n

Skips to the i th next file given in the command line (skips to last
file if i doesn't make sense).

May 16,1988

Page 3

MORE (C)

MORE (C)
i :p

Skips to the i th previous file given in the command line. If this
command is given in the middle of printing out a file,more goes
back to the beginning of the file. If i doesn't make sense, more
skips back to the first file. If more is not reading from a file, the
bell rings and nothing else happens.
:f Displays the current filename and line number.
:q or:Q
Exits from more (same as q or Q).
Repeats the previous command.
The commands take effect immediately. It is not necessary to enter a
carriage return. Up to the time when the command character itself is
given, the user may enter the line kill character to cancel the numerical argument being formed. In addition, the user may enter the erase
character to redisplay the "--More--(xx%)" message.
The terminal is set to no echo mode by this program so that the output
can be continuous. What you enter will not show on your terminal,
except for the slash (/) and exclamation (!) commands.
If the standard output is not a teletype, more acts just like cat, except
that a header is printed before each file (if there is more than one).

A sample usage of more in previewing nroff output would be
nroff -ms +2 doc.n I more -s

Files
/etc/termcap

Terminal data base

/usr/lib/more.help

Help file

See Also
csh(CP), sh(C), environ(M)
Credit
This utility was developed at the University of California at Berkeley
and is used with permission.

May 16, 1988

Page 4

MORE (C)

MORE (C)

Notes

The vi and help options may not be available.
Before displaying a file, more attempts to detect whether it is a nonprintable binary file such as a directory or executable binary image. If
more concludes that a file is unprintable, it refuses to print it. However, more cannot detect all possible kinds of non-printable files.

May 16, 1988

Page 5

MV(C)

MV(C)

Name

mv - Moves or renames files and directories.
Syntax

mv [ -f] file1 file2
mv [ -f] file ... directory
Description
mv moves (changes the name of) filel to file2 .
If file2 already exists, it is removed before filel is moved. If file2 has
a mode which forbids writing, mv prints the mode (see chmod(S» and
reads the standard input to obtain a line. If the line begins with y, the
move takes place; if not, mv exits.

In the second form, one or more files are moved to the directory with
their original filenames.
No questions are asked when the -f option is given.
mv refuses to move a file onto itself.
mv can only rename directories, not physically move them.
mvdir(ADM) should be used to move directories within a filesystem.

See Also

cp(C),chmod(S),copy(C)
Notes
If filel and file2 lie on different file systems, mv must copy the file

and delete the original. In this case the owner name becomes that of
the copying process and any linking relationship with other files is
lost.

May 16, 1988

Page 1

NEWFORM(C)

NEWFORM (C)

Name
newform - Changes the format of a text file.
Syntax
newform [-s] [-itabspec] [-otabspec] [-bn] [-en] [-pn] [-an] [-f]
[-cchar] [-In] [file ... ]
Description
newform reads lines from the named files, or the standard input if no
input file is named, and reproduces the lines on the standard output.
Lines are reformatted in accordance with command line options in
effect.

Except for -s, command line options may appear in any order, may be
repeated, and may be intermingled with files. Command line options
are processed in the order typed. This means that option sequences
like "-e15 -160" will yield results different from "-160 -e15".
Options are applied to all files on the command line.
-itabspec

Input tab specification: expands tabs to spaces, according
to the tab specifications given. Tabspec recognizes all tab
specification forms described below. In addition, tabspec
may be --, in which newform assumes that the tab
specification is to be found in the first line read from the
standard input. If no tabspec is given, tabspec defaults to
-8. A tabspec of -0 expects no tabs; if any are found, they
are treated as -1.

-otabspec

Output tab specification: replaces spaces by tabs, according to the tab specifications given. The tab specifications
are the same as for -itabspec. If no tabspec is given,
tabspec defaults to -8. A tabspec of -0 means that no
spaces will be converted to tabs on output.

-In

Sets the effective line length to n characters. If n is not
typed, -I defaults to 72. The default line length without
the -I option is 80 characters. Note that tabs and backspaces are considered to be one character (use -i to
expand tabs to spaces).

-bn

Truncates n characters from the beginning of the line
when the line length is greater than the effective line
length (see -In). The default is to truncate the number of
characters necessary to obtain the effective line length.
The default value is used when -b with no n is used. This
option can be used to delete the sequence numbers from a
COBOL program as follows:

May 16, 1988

Page 1

NEWFORM(C)

NEWFORM(C)

newform -11 -b7 file-name
The option -11 must be used to set the effective line length
shorter than any existing line in the file so that the -b
option is activated.
-en

Truncates n characters from the end of the line.

-ck

Changes the prefix/append character to k. Default character for k is a space (see options -p and -c).

-pn

Prefixes n characters (see -ck) to the beginning of a line
when the line length is less than the effective line length.
The default is to prefix the number of characters necessary to obtain the effective line length.

-an

Appends n characters to the end of a line. The default is
to append the number of characters necessary to get the
effective line length.

-f

Writes the tab specification format line on the standard
output before any other lines are output. The tab
specification format line which is printed will correspond
to the format specified in the last -0 option. If no -0
option is specified, the line which is printed will contain
the default specification of -8.

-s

Shears off leading characters on each line up to the first
tab and places up to 8 of the sheared characters at the end
of the line. If more than 8 characters (not counting the
first tab) are sheared, the eighth character is replaced by a
* and any characters to the right of it are discarded. The
first tab is always discarded.
An error message and program exit will occur if this
option is used on a file without a tab on each line. The
characters sheared off are saved internally until all other
options specified are applied to that line. The characters
are then added at the end of the processed line.

Tabs
Four types of tab specification are accepted for tabspec: ' 'canned, ' ,
repetitive, arbitrary, and file. The lowest column number is 1. For
tabs, column 1 always refers to the leftmost column on a terminal,
even one whose column markers begin at 0, e.g. the DASI 300, DASI
300S, and DASI 450.
The "canned" tabs are given as -code where code (and its meaning) is
from the following list:

May 16, 1988

Page 2

NEWFORM(C)

NEWFORM(C)

-a

1,10,16,36,72
Assembler, IBM S/370, first format

-a2

1,10,16,40,72
Assembler, IBM S/370, second format

-c

1,8,12,16,20,55
COBOL, normal format

-c2

1,6,10,14,49
COBOL 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:
<:t-c2 m6 s66 d:>

-c3

1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
COBOL compact format (columns 1-6 omitted), with
more tabs than COBOL -c2. This is the recommended
format for COBOL. The appropriate format specification
is:
<:t-c3 m6 s66 d:>

-f

1,7,11,15,19,23
FORTRAN

-p

1,5,9,13,17,21,25,29,33,37,41,45,53,57,61
PL/I

-s

1,10,55
SNOBOL

-u

1,12,20,44
UNIVAC 1100 Assembler

In addition to these "canned" formats, three other types exist:

-n

A repetitive specification requests tabs at columns 1+n,
1+2*n, etc. Note that such a setting leaves a left margin of
n columns on TermiNet terminals only. Of particular
importance is the value -8: this represents the XENIX systern' 'standard' , tab setting, and is the most likely tab setting to found at a terminal. It is required for use with
nrojf(CT) -h option for high-speed output. Another special case is the value -0, implying no tabs at all.

nl ,n2 ,...

The arbitrary format permits the user to type any chosen
set of number, 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

May 16, 1988

Page 3

Nl!.-'WFORM (C)

NEWFORM(C)

1,10,20,30 and 1,10,+10,+10 are considered identical.
- -file

If the name of a file is given, newform reads the first line
of the file, searching for a fonnat specification. If it finds
one there, it sets the tab stops according to it, otherwise it
sets them as -8. This type of specification may be used to
make sure that a tabbed file is printed with correct tab settings.
Any of the following may be used also; if a given flag occurs more
than once, the last value given takes effect:
-Ttype
newform usually needs to know the type of tenninal in
order to set tabs and always needs to know the type to set
margins. type is a name listed in term(CT). If no -T flag
is supplied, newform searches for the $TERM value in
the environment (see environ (M). If no type can be
found, newform tries a sequence that will work for many
tenninals.
+mn

The margin argument may be used for some tenninals. It
causes all tabs to be moved over n columns by making
column n+ 1 the left margin. If +m is given without a
value of n, the value assumed is 10. For a TenniNet, the
first value in the tab list should be 1, or the margin will
move even further to the right. The nonnal (leftmost)
margin on most tenninals is obtained by +mO. The margin for most tenninals is reset only when the +m flag is
given explicitly.

Example
In the following example, newform converts a file named text with
leading digits, one or more tabs, and text on each line to a file beginning with the text and the leading digits placed at the end of each line
in column 73 (-s option). All tabs after the first one are expanded to
spaces (-i option). To feach the line length of 72 characters (-I option),
spaces are appended to each line up to column 72 (-a option) or lines
are truncated at column 72 (-e option). To refonnat the sample file
text in this manner, enter:
newfonn -s -i -1 -a -e text

Exit Codes

°-

nonnal execution
1 - for any error

May 16, 1988

Page 4

NEWFORM(C)

NEWFORM(C)

See Also
csplit(C)

Diagnostics
All diagnostics are fatal.
usage: ...
not -s format
can't open file
internal line too long

newform was called with a bad option.
There was no tab on one line.
Self-explanatory .
A line exceeds 512 characters after being
expanded in the internal work buffer.
A tab specification is incorrectly fonnattabspec in error
ted, or specified tab stops are not ascending.
tabspec indirection illegal A tabspec read from a file (or standard
input) may not contain a tabspec referencing another file (or standard input).

Notes
newform nonnally only keeps track of physical characters; however,
for the -i and -0 options, newform will keep track of backspaces in
order to line up tabs in the appropriate logical columns.
newform will not prompt the user if a tabspec is to be read from the
standard input (by use of -i,-- or -0--).
If the -f option is used, and the last -0 option specified was "-0--" ,
and was preceded by either "-0--" or a "-i --" , the tab speci fication
fonnat line will be incorrect.

May 16, 1988

PageS

NEWGRP(C)

NEWGRP(C)

Name
newgrp - Logs user into a new group.

Syntax
newgrp [ group]
Description
newgrp changes the group identification of its caller. The same person remains logged in, and the current directory is unchanged, but calculations of access permissions to files are performed with respect to
the new group ID.
newgrp without an argument changes the group identification to the
group in the password file. This changes the caller's group identification back to the original group. When most users log in, they are
members of the group named group.

If a group has a password, any user can become a member of that
group by entering the password when prompted by newgrp. If a group
does not have a password, a user can become a member of it only if
the user is listed in /etc/group as a member of the group.

Files
/etc/group
/etc/passwd

See Also
10gin(11),group(F)

Notes
There is no convenient way to enter a password into /etc/group.
The newgrp command executes, but does not fork, a new shell. If your
login shell is a C shell and you invoke newgrp , you will have to press
CTRL-D when you wish to log out. Typing the csh (C) logout command will result in an error message. Note also that the newgrp command causes the csh history list to start again at 1.

11ay 16, 1988

Page 1

NEWS (C)

NEWS (C)

Name
news - Print news items.
Syntax
news [ -a ] [ -n ] [ -s ] [ items]
Description
news is used to keep the user informed of current events. By convention, these events are described by files in the directory lusr/news.
When invoked without arguments, news prints the contents of all
current files in lusr/news, most recent first, with each preceded by an
appropriate header. news stores the "currency" time as the modification date of a file named .news time in the user's home directory (the
identity of this directory is determined by the environment variable
$HOME); only files more recent than this currency time are considered "current."
The -a option causes news to print all items, regardless of currency.
In this case, the stored time is not changed.
The -n option causes news to report the names of the current items
without printing their contents, and without changing the stored time.
The -s option causes news to report how many current items exist,
without printing their names or contents, and without changing the
stored time.
All other arguments are assumed to be specific news items that are to
be printed.

If the INTERRUPT key is struck during the printing of a news item,
printing stops and the next item is started. Another INTERRUPT
within one second of the first causes the program to terminate.
Files
/usr/news/*
$HOME/.news_time

May 16, 1988

Page 1

NEWS (C)

NEWS (C)

See Also
profile(M), environ(M).

May 16,1988

Page 2

NICE (C)

NICE (C)

Name
nice - Runs a command at a different priority.
Syntax
nice [ -increment] command [ arguments]
Description
nice executes command with a lower CPU scheduling priority. Priorities range from 0 to 39, where 0 is the highest priority and 39 is the
lowest. By default, commands have a "nice value" of 20. If an -increment argument is given where increment is in the range 1-19, increment is added to the default priority of 20 to produce a numerically
higher priority, meaning a lower scheduling priority. If no increment
is given, an increment of 10 to produce a priority of 30 is assumed.

The super-user may run commands with priority higher than normal
by using a double negative increment. For example, an argument of -10 would decrement the default to produce a nice value of 10, which
is a higher scheduling priority than the default of 20.
See Also
nohup(C), csh(C), nice(S)
Diagnostics
nice returns the exit status of the subject command.

Notes
An increment larger than 19 is equivalent to 19.
Note also that this description of nice applies only to programs run
under the Bourne Shell. The C-Shell has its own nice command,
which is documented in csh(C).

May 16, 1988

Page 1

NL(C)

NL (C)

Name
nl - Adds line numbers to a file.
Syntax

nl [-htype] [-btype] [-ftype] [-vstart#] [-iincr] [-p] [-Inurn] [-ssep]
[-wwidth] [-nformat] file
Description
nl reads lines from the named file, or the standard input if no file is
named, and reproduces the lines on the standard output. Lines are
numbered on the left in accordance with the command options in
effect.
nl views the text it reads in terms of logical pages. Line numbering is
reset at the start of each logical page. A logical page consists of a
header, a body, and a footer section. Empty sections are valid. Different line numbering options are independently available for header,
body, and footer (e.g. no numbering of header and footer lines while
numbering blank lines only in the body).

The start of logical page sections is signaled by input lines containing
nothing but the following character(s):
Page Section

Line Contents

Header

\:\:\:

Body

\:\:

Footer

\:

Unless signaled otherwise, nl assumes the text being read is in a single logical page body.
Command options may appear in any order and may be intermingled
with an optional filename. Only one file may be named. The options
are:
-btype

May 16, 1988

Specifies which logical page body lines are to be numbered. Recognized types and their meaning are: a,
number all lines; t, number lines with printable text only;
n, no line numbering; pstring, number only lines that contain the regular expression specified in string. Default
type for logical page body is t (text lines numbered).

Page 1

NL(C)

NL(C)

-htype

Same as -btype except for header. Default type for logical page header is n (no lines numbered).

-ftype

Same as -btype except for footer. Default for logical page
footer is n (no lines numbered).

-p

Does not restart numbering at logical page delimiters.

-vstart#

Start# is the initial value used to number logical page
lines. Default is 1.

-iincr

Incr is the increment value used to number logical page
lines. Default is 1.

-ssep

Sep is the character(s) used in separating the line number
and the corresponding text line. Default sep is a tab.

-wwidth

Width is the number of characters to be used for the line
number. Default width is 6.

-nformat

Format is the line numbering format. Recognized values
are: In, left justified, leading zeroes suppressed; rn, right
justified, leading zeroes suppressed; rz, right justified,
leading zeroes kept. Default format is rn (right justified).

-Inum

N um is the number of blank lines to be considered as one.

For example, -12 results in only the second adjacent blank
being numbered (if the appropriate -ha, -ba, and/or -fa
option is set). Default is 1.
See Also

pr(C)

May 16, 1988

Page 2

NOHUP(C)

NOHUP(C)

Name
nohup - Runs a command immune to hangups and quits.

Syntax
nohup command [ arguments]
Description
nohup executes command with hangups and quits ignored. If output is
not redirected by the user, it will be sent to nohup.out. If nohup.out
does not have write permission in the current directory, output is
redirected to $HOME/nohup.out.

See Also
nice(C), signal(S)

May 16, 1988

Page 1

OD(C)

OD(C)

Name
od - Displays files in octal format.
Syntax
od [-bcdox] [file] [ [ + ]offset[ . ][ b ] ]
Description
od displays file in one or more formats as selected by the first argument. If the fIrst argument is missing, -0 is default. The meanings of
the format options are:

-b

Interprets bytes in octal.

-c

Interprets bytes in ASCII. Certain nongraphic characters
appear as C escapes: null=\O, backspace=\b, form feed=\f,
newline=\n, retum=\r, tab=\t; others appear as 3-digit octal
numbers.

-d

Interprets words in decimal.

-0

Interprets words in octal.

-x

Interprets words in hex.

The file argument specifies which file is to be displayed. If no file
argument is specified, the standard input is used.
The offset argument specifies the offset in the file where displaying is
to start. This argument is normally interpreted as octal bytes. If. is
appended, the offset is interpreted in decimal. If b is appended, the
offset is interpreted in blocks. If the file argument is omitted, the
offset argument must be preceded by +.
The display continues until end-of-file.
See Also
hd(C), adb(CP)

May 16, 1988

Page 1

PACK (C)

PACK (C)

Name

pack, pcat, unpack - Compresses and expands files.
Syntax
pack [ - ] name ...
pcat name ...
unpack name ...
Description
pack attempts to store the specified files in a compressed form. Wherever possible, each input file name is replaced by a packed file
name.z with the same access modes, access and modified dates, and
the owner of name. If pack is successful, name will be removed.
Packed files can be restored to their original form using unpack or
pcat.
pack uses Huffman (minimum redundancy) codes on a byte-by-byte
basis. If the - argument is used, an internal flag is set that causes pack
to display information about the file compression. Additional
occurrences of - in place of name will cause the internal flag to be set
and reset.
The amount of compression obtained depends on the size of the input
file and the character frequency distribution. Because a decoding tree
forms the first part of each .z file, it is usually not worthwhile to pack
files smaller than three blocks, unless the character frequency distribution is very scattered, which may occur with printer plots or pictures.
Typically, text files are reduced to 60-75% of their original size. Load
modules, which use a larger character set and have a more uniform
distribution of characters, show little compression, the packed versions being about 90% of the original size.
pack returns a value that is the number of files that it failed to
compress.
No packing will occur if:
The file appears to be already packed
The filename has more than 12 characters

May 16, 1988

Page 1

PACK (C)

PACK (C)

The file has links
-

The file is a directory

-

The file cannot be opened
No disk storage blocks will be saved by packing

-

A file called name.z already exists

-

The .z file cannot be created

-

An I/O error occurred during processing

The last segment of the filename must contain no more than 12 characters to allow space for the appended .z extension. Directories cannot be compressed.
Pcat does for packed files what cat(C) does for ordinary files. The
specified files are unpacked and written to the standard output. Thus
to view a packed file named name.z use:

pcat name.z
or just:
pcat name
To make an unpacked copy, say nnn, of a packed file named name.z
without destroying name .z, enter the command:
pcat name >nnn
Pcat returns the number of files it was unable to unpack. Failure may
occur if:

-

The filename (exclusive of the .z) has more than 12 characters
The file cannot be opened

-

The file does not appear to be the output of pack

unpack expands files created by pack. For each file name specified in
the command, a search is made for a file called name.z (or just name,
if name ends in .z). If thi~ file appears to be a packed file, it is
replaced by its expanded version. The new file has the .z suffix
stripped from its name, and has the same access modes, access and
modification dates, and owner as those of the packed file.

May 16, 1988

Page 2

PACK (C)

PACK (C)

unpack returns a value that is the number of files it was unable to
unpack. Failure may occur for the same reasons that it may in pcat , as
well as in a file where the "unpacked" name already exists, or if the
unpacked file cannot be created.

May 16, 1988

Page 3

PASSWD (C)

PASSWD (C)

Name
passwd - Changes login password.
Syntax
passwd name
Description
This command changes (or installs) a password associated with the
login name.
The program prompts for the old password (if any) and then for the
new one (twice). The user must supply these. Passwords can be of
any reasonable length, but only the first eight characters of the password are significant. The minimum number of characters allowed in a
new password is determined by the PASSLENGTH variable. Although
the minimum can be 3, a minimum of 5 characters is strongly recommended since passwords shorter than this are much easier to guess or
discover by trial and error.
Only the owner of the name or the super-user may change a password;
the owner must prove he knows the old password. Only the super-user
can create a null password.
The password file is not changed if the new password is the same as
the old password, or if the password has not "aged" sufficiently. See
passwd(F).
The minimum length of a legal password, and the minimum and maximum number of weeks used in password aging are specified in
/etc/default/passwd by the variables PASSLENGTH, MINWEEKS and
MAXWEEKS. If not explicitly set, the default values for these variables are:
PASSLENGTH=5
MINWEEKS=2
MAXWEEKS=4
MINWEEKS and MAXWEEKS values must be in the range 0 to 63. If
PASSLENGTH is not in the range 3 to 8, it is set to 5.

Notes
When a user changes his or her password, that user's group becomes
the group assigned to /etc/passwd. This can be verified by entering the
following command after successfully using passwd:

I /etc/passwd

May 16, 1988

Page 1

PASSWD(C)

PASSWD(C)

Files
/etc/default/passwd
/etc/passwd

See Also
default(F), login(M), passwd(F), pwadmin(ADM)

May 16, 1988

Page 2

PG(C)

PG(C)

Name
pg - File perusal filter for soft-copy terminals.
Syntax
pg [- number] [-p string] [-cefns] [+ linenumber] [+/ pattern /]
[files ... ]
Description
The pg command is a filter which allows the examination of files one
screenful at a time on a soft-copy terminal. (The dash (-) command
line option and/or NULL arguments indicate that pg should read from
the standard input.) Each screenful is followed by a prompt. If you
press the RETURN key, another page is displayed; other possibilities
are listed below. This command is different from previous paginators
because it allows you to back up and review something that has
already passed.
To determine terminal attributes, pg scans the termcap (M) data base
for the terminal type specified by the environment variable TERM. If
TERM is not defined, the terminal type dumb is assumed.
The command line options are:
-number

Specifies the size (in lines) of the window that pg is to
use instead of the default. (On a terminal containing 24
lines, the default window size is 23.)

-p string

Causes pg to use string as the prompt. If the prompt
string contains a "%d", the first occurrence of "%d"
in the prompt will be replaced by the current page
number when the prompt is issued. The default prompt
string is a colon (:).

-c

Homes the cursor and clears the screen before displaying each page. This option is ignored if clear _screen
is not defined for this terminal type in the termcap (M)
data base.

-e

Causes pg not to pause at the end of each file.

-f

Inhibits pg from splitting lines. In the absence of the -f
option, pg splits lines longer than the screen width, but
some sequences of characters in the displayed text (for
example, escape sequences for underlining) give
undesirable results.

May 16, 1988

Page 1

PG(C)

PG(C)

-0

Nonnally, commands must be tenninated by pressing
the RETURN key (ASCII newline character). This
option causes an automatic end of command as soon as
a command letter is entered.

-s

Causes pg to display all messages and prompts in standout mode (usually inverse video).

+linenumber Starts up at linen umber .
+/pattern/

Starts up at the first line containing the regular expression pattern.

The responses that may be entered when pg pauses can be divided into
three categories: those that cause further perusal, those that search,
and those that modify the perusal environment.
Commands which cause further perusal nonnally take a preceding
address (an optionally signed number indicating the point from which
further text should be displayed). pg interprets this address in either
pages or lines depending on the command. A signed address specifies
a point relative to the current page or line, and an unsigned address
specifies an address relative to the beginning of the file. Each command has a default address if no address is provided.
The perusal commands and their defaults are as follows:
(+ 1)RETURNkey
Causes one page to be displayed. The address is specified in
pages.

(+1) I
With a signed address, causes pg to simulate scrolling the screen,
forward or backward, the number of lines specified. With an
unsigned address this command displays a full screen of text
beginning at the specified line.
(+ 1) d or Ctrl-D
Simulates scrolling half a screen forward or backward.

The following perusal commands take no address:
. or Ctrl-L
Causes the current page of text to be redisplayed.

$ Displays the last window full in the file. Use with caution when
the input is a pipe.
The following commands are available for searching for text patterns
in the text. The regular expressions described in ed(C) are available.
They must always be tenninated by a newline character, even if the -n
option is specified.

May 16,1988

Page 2

PG(C)

PG(C)

ilpatternl
Search forward for the i th (default i = 1) occurrence of pattern.
Searching begins immediately after the current page and continues
to the end of the current file, without wrap-around.
r'pattern"
i?pattern?
Search backwards for the i th (default i = 1) occurrence of pattern.
Searching begins immediately before the current page and continues to the beginning of the current file, without wrap-around. The
caret C) notation is useful for terminals which will not properly
handle the question mark (?).

After searching, pg displays the line found at the top of the screen.
You can modify this by appending m or b to the search command to
leave the line found in the middle or at the bottom of the window from
now on. Use the suffix t to restore the original situation.
The following commands modify the environment of perusal:

in

Begins perusing the ith next file in the command line. The
default value of i is 1.

ip

Begins perusing the ith previous file in the command line.
The default value of i is 1.

iw

Displays another window of text. If i is present, set the window size to i.

sfilename
Saves the input in the named file. Only the current file being
perused is saved. The white space between the s and filename
is optional. This command must always be terminated by a
newline character, even if the -n option is specified.
h

Help displays abbreviated summary of available commands.

q orQ Quitpg.

!command
command is passed to the shell, whose name is taken from the
SHELL environment variable. If this is not available, the
default shell is used. This command must always be terminated by a newline character, even if the -n option is
specified.

At any time when output is being sent to the terminal, the user can
press the quit key (normally Ctrl-\) or the INTERRUPT (BREAK) key.
This causes pg to stop sending output, and display the prompt. The
user may then enter one of the above commands in the normal manner.
Unfortunately, some output is lost when this is done, because any
characters waiting in the terminal's output queue are flushed when the

May 16, 1988

Page 3

PG(C)

PG(C)

quit signal occurs.
If the standard output is not a terminal, then pg acts just like cat(C),
except that a header is printed before each file (if there is more than
one).
Example
To use pg to read system news, enter:
news I pg -p "(Page %d):"
Files
/etc/termcap

Terminal information data base

/tmp/pg*

Temporary file when input is from a pipe

See Also
ed(C), grep(C), termcap(M)
Notes
If terminal tabs are not set every eight positions, undesirable results

may occur.
When using pg as a filter with another command that changes the terminal I/O options terminal settings may not be restored correctly.
While waiting for terminal input, pg responds to "BREAK, DEL," and
the caret C) by terminating execution. Between prompts, however,
these signals interrupt pg's current task and place you in prompt
mode. Use these signals with caution when input is being read from a
pipe, since an interrupt is likely to terminate the other commands in
the pipeline.

May 16, 1988

Page 4

PG(C)

PG(C)

The z and f commands used with more are available, and the tenninal
slash (I), caret C), or question mark (?) may be omitted from the
searching commands.

May 16, 1988

PageS

PR(C)

PR(C)

Name
pr - Prints files on the standard output.
Syntax
pr [ options] [ files]
Description
pr prints the named files on the standard output. If file is -, 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~ date and
time, and the name of the file.
By default, columns are of equal width, separated by at least one
space; lines which do not fit are truncated. If the -s option is used,
lines are not truncated and columns are separated by the separation
character.
If the standard output is associated with a terminal, error messages are
withheld until pr has completed printing.

Options may appear singly or combined in any order. Their meanings
are:
+k

Begins printing with page k (default is I).

-k

Produces k-column output (default is I). The options -e and -i
are assumed for multicolumn output.

-a

Prints multicolumn output across the page.

-m

Merges and prints all files simultaneously, one per column
(overrides the -k, and -a options).

-d

Double-spaces the output.

-eck Expands input tabs to character positions k+l, 2*k+l, 3*k+l,
etc. If k is 0 or is omitted, default tab settings at every 8th position are assumed. Tab characters in the input are expanded into
the appropriate number of spaces. If c (any nondigit character)
is given, it is treated as the input tab character (default for c is
the tab character).
-ick

In output, replaces whitespace wherever possible by inserting
tabs to character positions k+ 1, 2*k+ 1, 3*k+ 1, etc. If k is 0 or

is omitted, default tab settings at every 8th position are
assumed. If c (any nondigit character) is given, it is treated as
the output tab character (default for c is the tab character).

May 16, 1988

Page 1

PR (C)

PR (C)

-nck Provides k-digit line numbering (default for k is 5). The number
occupies the first k+ 1 character positions of each column of normal output or each line of -m output. If c (any nondigit character) is given, it is appended to the line number to separate it
from whatever follows (default for c is a tab).
-wk

Sets the width of a line to k character positions (default is 72 for
equal-width multicolumn output, no limit otherwise).

-ok

Offsets each line by k character positions (default is 0). The
number of character positions per line is the sum of the width
and offset.

-lk

Sets the length of a page to k lines (default is 66).

-b

Uses the next argument as the header to be printed instead of
the filename.

-p

Pauses before beginning each page if the output is directed to a
terminal (pr will ring the bell at the terminal and wait for a carriage return).

-f

Uses form feed character for new pages (default is to use a
sequence of linefeeds). Pauses before beginning the first page if
the standard output is associated with a terminal.

-r

Prints no diagnostic reports on failure to open files.

-t

Prints neither the 5-line identifying header nor the 5-line trailer
normally supplied for each page. Quits printing after the last
line of each file without spacing to the end of the page.

-sc

Separates columns by the single character c instead of by the
appropriate number of spaces (default for c is a tab).

Examples
The following prints filel and file2 as a double-spaced, three-column
listing headed by "file list' , :
pr -3dh "file list" filel file2

May 16, 1988

Page 2

PR(C)

PR (C)

The following writes filel on file2, expanding tabs to columns 10, 19,
28,37, ... :
pr -e9 -t file2
See Also
cat(C)

May 16, 1988

Page 3

PS(C)

PS(C)

Name

ps - Reports process status.
Syntax
ps [ options ]
Description
ps prints certain infonnation about active processes. Without options,
infonnation is printed about processes associated with the current terminal. Otherwise, the infonnation that is displayed is controlled by
the following options:
-e

Prints infonnation about all processes.

-d

Prints infonnation about all processes, except process
group leaders.

-a

Prints infonnation about all processes, except process
group leaders and processes not associated with a terminal.

-f

Generates afull listing. (Normally, a short listing containing only process ill, tenninal (' 'tty' ') identifier,
cumulative execution time, and the command name is
printed.) See below for meaning of columns in a full
listing.

-I

Generates a long listing. See below.

-c corefile

Uses the file corefile in place of /dev/mem.

-s swapdev

Uses the file swapdev in place of /dev/swap. This is
useful when examining a corefile.

-n namelist

The argument is taken as the name of an alternate
namelist (/xenix is the default).

-t tlist

Restricts listing to data about the processes associated
with the terminals given in tlist, where tlist can be in
one of two fonns: a list of tenninal identifiers
separated from one another by a comma, or a list of terminal identifiers enclosed in double quotes and
separated from one another by a comma and/or one or
more spaces.

May 16, 1988

Page 1

PS(C)

PS(C)

-p pUst

Restricts listing to data about processes whose process
ID numbers are given in pUst, where plist is in the same
format as tlist .

-u ulist

Restricts listing to data about processes whose user ID
numbers or login names are given in ulist, where ulist
is in the same format as tlist. In the listing, the numerical user ID is printed unless the -f option is used, in
which case the login name is printed.

-g glist

Restricts listing to data about processes whose process
groups are given in glist, where glist is a list of process
group leaders and is in the same format as tlist.

The column headings and the meaning of the columns in a ps listing
are given below; the letters f and I indicate the option (full or long)
that causes the corresponding heading to appear; all means that the
heading always appears. Note that these two options only determine
what information is provided for a process; they do not determine
which processes will be listed.
F

(1)

S

(1)

DID

(f,l)

PID

(all)

PPID
C
STIME
PRI

(f,l)
(f,l)
(f)
(1)

May 16, 1988

A status word consisting of flags associated with
the process. Each flag is associated with a bit in
the status word. These flags are added to form a
single octal number. Process flag bits and their
meanings are:
01
in core;
02
system process;
04
locked in core (e.g., for physical I/O);
10
being swapped;
20
being traced by another process.
The state of the process:
\
0
non-existent;
S
sleeping;
W
waiting;
R
running;
I
intermediate;
Z
terminated;
T
stopped;
B
waiting.

The user ID number of the process owner; the
login name is printed under the -f option. Login
names are truncated after 7 characters.
The process ID of the process; it is possible to kill
a process if you know this datum.
The process ID of the parent process.
Processor utilization for scheduling.
Starting time of the process.
The priority of the process; higher numbers mean
lower priority.

Page 2

PS(C)

PS(C)

ADDR

(1)
(1)

SZ

(1)

NI

WCHAN(l)
TTY

TIME

CMD

(all)
(all)
(all)

Nice value; used in priority computation.
The memory address of the process, if resident;
otherwise, the disk address.
The size in blocks of the core image of the process, but not including the size of text shared with
other processes. Since this size includes the
current size of the stack, it will vary as the stack
size varies.
The event for which the process is waiting or
sleeping; if blank, the process is running.
The controlling terminal for the process.
The cumulative execution time for the process.
The command name; the full command name and
its arguments are printed under the -f option.

A process that has exited and has a parent, but has not yet been waited
for by the parent, is marked .

Under the -f option, 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 -f option, is printed in square brackets.
Files

/xenix

system name list

/dev /mem

memory

/dev

searched to find swap device and terminal ("tty") names.

See Also

kill(C), nice (C)
Notes

Things can change while ps is running; the picture it gives is only a
close approximation to reality.
Some data printed for defunct processes are irrelevant.

May 16, 1988

Page 3

PSTAT(C)

PSTAT(C)

Name

pstat - Reports system infonnation.
Syntax
pstat [ -aixpf] [ -u ubase ] [ -c corefile ]
[ -n name list ] [ file]
Description
pstat interprets the contents of certain system tables. pstat searches
for these tables in Idev/mem and Idev/kmem. With the file given, the
tables are sought in the specified file rather than Idev/mem. Similarly,
the -c option allows one to specify a corefile rather than Idev/kmem
for the search. The required namelist is taken from Ixenix. Options
are:
-a

Under -p, describe all process slots rather than just active
ones.

-i

Print the inode table with these headings:
LaC
The core location of this table entry.
FLAGS Miscellaneous state variables encoded thus:
L Locked
U Update time filesystem (F) must be corrected
A Access time must be corrected
M File system is mounted here
W Wanted by another process (L flag is on)
T Contains a text file
C Changed time must be corrected
CNT
Number of open file table entries for this inode.
DEV
Major and minor device number of file system in
which this inode resides.
INa
I-number within the device.
MODE Mode bits, see chmod(S).
NLK
Number of links to this inode.
UID
User ID of owner.
SIZ/DEV
Number of bytes in an ordinary file, or major and
minor device of special file.

-x

Prints the text table with these headings (286 only):
LaC
The core location of this table entry.
FLAGS Miscellaneous state variables encoded thus:
T ptrace (S) in effect
W Text not yet written on swap device
L Loading in progress

May 16, 1988

Page 1

PSTAT(C)

PSTAT(C)

K Locked
w Wanted (L flag is on)
DADDR Disk address in swap, measured in multiples of
BSIZE bytes.
CADDR Core address, measured in units of memory
management resolution.
SIZE
Size of text segment, measured in units of memory
management resolution.
IPTR
Core location of corresponding inode.
CNT
Number of processes using this text segment.
CCNT Number of processes in core using this text segment.
-p

Prints process table for active processes with these headings:
LOC
The core location of this table entry.
S
Run state encoded thus:
o No process
1 Waiting for some event
3 Runnable
4 Being created
5 Being terminated
6 Stopped under trace
F
Miscellaneous state variables, ORed together:
01 Loaded
02 The scheduler process
04 Locked
010
Swapped out
020
Traced
040
Used in tracing
0100
Locked in by lock (S).
PRI
Scheduling priority, see nice (S).
SIGNAL Signals received (signals 1-16 coded in bits 0-15).
UID
Real user ID.
TIM
Time resident in seconds; times over 127 coded as
127.
CPU
Weighted integral of CPU time, for scheduler.
NI
Nice level, see nice (S).
PGRP Process number of root of process group (the
opener of the controlling terminal).
PID
The process ID number.
PPID
The process ID of parent process.
ADDR If in core, the physical address of the "u-area" of
the process measured in units of memory management resolution. If swapped out, the position in
the swap area is measured in multiples of BSIZE
bytes.

May 16, 1988

Page 2

PSTAT(C)

PSTAT(C)

WCHAN
Wait channel number of a waiting process.
LINK
Link pointer in list of runnable processes.
TEXTP If text is pure, pointer to location of text table
entry (286 only).
INODP Pointer to location of shared inode (386 only).
CLKT Countdown for alarm(S) measured in seconds.

-u ubase
Print information about a user process. Ubase is the hexadecimal location of the process in main memory. The address
may be obtained by using the long listing ( -I option) of the
ps(C) command.
-c corefile
Use the file corefile in place of Idev/kmem.
-n namelist
Use the file name list as an alternate namelist in place of

Ixenix.
-f

Print the open file table with these headings:
LOC
The core location of this table entry.
FLO
Miscellaneous state variables:
R Open for reading
W Open for writing
P Pipe
CNT
Number of processes that know this open file.
INa
The location of the inode table entry for this file.
OFFS
The file offset, see Iseek(S).

Files
/xenix

Namelist

/dev/mem Default source of tables
See Also

ps(C), stat(S), filesystem(F)

May 16, 1988

Page 3

PWCHECK(C)

PWCHECK(C)

Name

pwcheck - Checks password file.
Syntax
pwcheck [file]
Description
pwcheck scans the password file and checks for any inconsistencies.
The checks include validation of the number of fields, login name,
user ID, group ID, and whether the login directory and optional program name exist. The default password file is /etc/passwd.

Files

/etc/passwd
See Also

grpcheck(C), group(F), passwd(F)

May 16, 1988

Page 1

PWD (C)

PWD (C)

Name

pwd - Prints working directory name.
Syntax
pwd
Description
pwd prints the pathname of the working (current) directory.

See Also
cd(C)
Diagnostics

"Cannot open .. " and "Read error in .. " indicate possible file system
trouble. In such cases, see the XENIX System Administrator's Guide
for information on fixing the file system.

May 16, 1988

Page 1

QUOT(C)

QUOT(C)

Name
quot - Summarizes file system ownership.

Syntax
quot [ option] ... [filesystem]
Description
quot prints the number of blocks in the named filesystem currently
owned by each user. If no filesystem is named, the file systems given
in /etc/mnttab are examined.

The following options are available:
-n Processes standard input. This option makes it possible to produce
a list of all files and their owners with the following command:
ncheck filesystem I sort +On I quot -n filesystem
-c Prints three columns giving file size in blocks, number of files of
that size, and cumulative total of blocks in that size or smaller file.
Data for files of size greater than 499 blocks are included in the
figures for files of exactly size 499.
-f Prints a count of the number of files as well as space owned by

each user.

Files
/etc/passwd

Gets user names

/etc/mnttab

Contains list of mounted file systems

See Also
cmchk(C), du(C), Is(C), machine(M)

May 16, 1988

Page 1

QUOT(C)

QUOT(C)

Notes

Holes in files are counted as if they actually occupied space.
Blocks are reported in 512 byte blocks. On filesystems that use 1024
byte blocks, a file of 26 bytes is reported as using 2 blocks, since it
uses one 1024 byte block, or two 512 byte blocks. See machine(M) or
use cmchk(C) to determine the filesystem block size.
See also Notes under mount(ADM).

May 16, 1988

Page 2

RANDOM (C)

RANDOM (C)

Name
random - Generates a random number.

Syntax
random [-s] [ scale]
Description
random generates a random number on the standard output. and
returns the number as its exit value. By default, this number is either
o or 1 (i.e., scale is 1 by default). If scale is given a value between 1
and 255, then the range of the random value is from 0 to scale. If scale
is greater than 255, an error message is printed.
When the -s , "silent" option is given, the random number is returned
as an exit value but is not printed on the standard output. If an error
occurs, random returns an exit value of zero.

See Also
rand(S)

Notes
This command does not perform any floating point computations.
random uses the time of day as a seed.

May 16,1988

Page 1

Rep (C)

Rep (C)

Name

rep - Copies files across XENIX systems.
Syntax
rcp [ options] [srcmachine:]srcfile [destmachine:]destfile
Description

rcp copies files between systems in a Micnet network. The command
copies the srcmachine:srcfile to destmachine:destfile, where
srcmachine: and destmachine: are optional names of systems in the
network, and srcfile and destfile are pathnames of files. If a machine
name is not given, the name of the current system is assumed. If - is
given in place of srcfile, rcp uses the standard input as the source.
Directories named on the destination machine must have write permission, and directories and files named on a remote source machine
must have read permission.

The available options are:
-m

Mails and reports completion of the command, whether there is an
error or not.
-u [machine:]user

Any mail goes to the named user on machine. The default
machine is the machine on which the rcp command is completed
or on which an error was detected. If an alias for user exists in the
system alias files on that machine, the mail will be redirected to
the appropriate mailbox(es). Since system alias files are usually
identical throughout the network, any specified machine will most
likely be overridden by the aliasing mechanism. To prevent aliasing, user must be escaped with at least two \ characters (at least
four if given as a shell command).

May 16, 1988

Page 1

RCP (C)

RCP(C)

rep is useful for transferring small numbers of files across the network.
The network consists of daemons that periodically awaken and send
files from one system to another. The network must be installed using
netutil (ADM) before rep can be used.

Also, to enable transfer of files from a remote system, either:
This line should be in /etcldejauit/mienet on the systems in the network:
rcp=/usr/bin/rcp
Or, these lines should be in that file:
executeall
execpath=P ATH= path
where path must contain /usr/bin.

Example
rcp -m machine 1:/etc/mnttab /tmp/vtape

See Also
mail(C), micnet(F), netutil(ADM), remote(C)

Diagnostics
If an error occurs, mail is sent to the user.

Notes
Full pathnames must be specified for remote files.
rep handles binary data files transparently, no extra options or protocols are needed to handle them. Wildcards are not expanded on the
remote machine.

May 16,1988

Page 2

RED (C)

RED (C)

Name
red - Invokes a restricted version of ed(C).

Syntax
red [file]
Description
red is a restricted version of ed(C). It will only allow editing of files
in the current directory. It prohibits executing sh(C) commands via
the ! command. red displays an error message on any attempt to
bypass these restrictions.

In general, red does not allow commands like

!date
or
!sh
Furthermore, red will not allow pathnames in its command line. For
example, the command:
red /etc/passwd
when the current directory is not fetc causes an error.

See Also
ed(C), rsh(C)

May 16, 1988

Page 1

REMOTE (C)

REMOTE (C)

Name
remote - Executes commands on a remote XENIX system.
Syntax
remote [ - ] [ -f file] [ -m ] [ -u user] machine
command [ arguments ]
Description
remote is a limited networking facility that permits execution of
XENIX commands across serial lines. Commands on any connected
system may be executed from the host system using remote. A command line consisting of command and any blank-separated arguments
is executed on the remote machine. A machine's name is located in
the file /etc/systemid. Note that wild cards are not expanded on the
remote machine, so they should not be specified in arguments. The
optional -m switch causes mail to be sent to the user telling whether
the command is successful.

The available options follow:
A dash signifies that standard input is used as the standard
input for command on the remote machine. Standard
input comes from the local host and not from the remote
machine.
-ffile

Use the specified file as the standard input for command
on the remote machine. The file exists on the local host
and not on the remote machine.

-m

Mails the user to report completion of the command. By
default, mail reports only errors.

-u user

Any mail goes to the named user on machine. The default
machine is the machine on which an error was detected,
or on which the remote command was completed. The
mail will be redirected to the appropriate mailbox(es), if
an alias for user exists in the system alias files on that
machine . Since system alias files are usually identical
throughout the network, any specified machine will most
likely be overridden by the aliasing mechanism. To
prevent aliasing, user must be escaped with at least two \
characters (at least four if given as a shell command).

May 16, 1988

Page 1

REMOTE (C)

REMOTE (C)

Before remote can be successfully used, a network of systems must
first be set up and the proper daemons initialized using netutil (ADM).
Also, entries for the command to be executed using remote must be
added to the letcldefaultlmicnet files on each remote machine.
Example

The following command executes an Is command on the directory
Itmp of the machine machine] :
remote machine 1 Is /tmp
See Also

rcp(C), mail(C), netutil(ADM), micnet(F)
Notes

The mail command uses the equivalent of remote to send mail
between machines.

May 16, 1988

Page 2

RESTORE (C)

RESTORE (C)

Name
restore, restor - Invokes incremental file system restorer.
Syntax
restore key [ arguments]
restor key [ arguments ]
Description
restore is used to read archive media backed up with the backup(C)
command.

The key specifies what is to be done. Key is one of the characters cC,
rR, tT, or xX optionally combined with k and/or for F. restor is an
alternate spelling for the same command.
c,C
Verify (check) a dump tape. Used after a dump is made to make
sure the tape has no I/O errors or bad checksums. C is the same as
c except that it provides a higher level of checking.
Uses the first argument as the name of the archive (backup device
/dev/*) instead of the default.

f

F F is the number of the first file on the tape to read. All files up to
that point are skipped.
k Follow this option with the size of the backup volume. This allows

for reading multivolume dumps from media such as floppies.
r,R
The archive is read and loaded into the file system specified in
argument. This should not be done lightly (see below). If the key
is R, restore asks which archive of a multivolume set to start on.
This allows restore to be interrupted and then restarted (an fsck
must be done before the restart).

t

Prints the date the archive was written and the date the file system
was backed up.

T Prints a full listing of a dump tape. Similar to t.

x Each file on the archive named by an argument is extracted. The
filename has all "mount" prefixes removed; for example, if lusr is
a mounted file system, lusr/bin/Jpr is named Ibin/Jpr on the
archive.
The extracted file is placed in a file with a numeric name supplied

May 16, 1988

Page 1

RESTORE (C)

RESTORE (C)

by restore (actually the inode number). In order to keep the
amount of archive read to a minimum, the following procedure is
recommended:
1. Mount volume 1 of the set of backup archives.
2. Type the restore command with the appropriate key and arguments.
3. restore will check dumpdir, then announce whether or not it
found the files, give the numeric name that it will assign to the
file, and in the case of a tape, rewind to the start of the archive.

4. It then asks you to "mount the desired tape volume". Type the
number of the volume you choose. On a multivolume backup,
the recommended procedure is to mount the last through the
first volumes, in that order. restore checks to see if any of the
requested files are on the mounted archive (or a later archive,
thus the reverse order). If the requested files are not there,
restore doesn't read through the tape. If you are working with a
single-volume backup or if the number of files being restored is
large, respond to the query with 1 and restore will read the
archives in sequential order.
X Same as x except that files are replaced in original location. When
you use this option, omit the initial slash (I) in the filename on the
restore command line.
The r option should only be used to restore a complete backup archive
onto a clear file system, or to restore an incremental backup archive
onto a file system so created. It should not be used to restore a backup
archive onto the root file system. Thus:

/etc/mkfs Idev /hd 1 10000
restore r Idev/hdl
is a typical sequence to restore a complete backup. Another restore
can be done to get an incremental backup in on top of this.
A backup followed by a mkfs and a restore is used to change the size
of a file system.

May 16, 1988

Page 2

RESTORE (C)

RESTORE (C)

Files

rst*

Temporary files

/etc/default/restor

Name of default archive device

The default archive unit varies with installation.
Notes

It is not possible to successfully restore an entire active root file system.
Note also that restore may be unable to restore more than one filesystern from the tape devices IdevlnrctO and Idevlnrct2.
Diagnostics

There are various diagnostics involved with reading the archive and
writing the disk. There are also diagnostics if the i-list or the free list
of the file system is not large enough to hold the dump.
If the dump extends over more than one disk or tape, restor may ask
you to change disks or tapes. Reply with a newline when the next unit
has been mounted.

See Also

backup(C), dumpdir(C), fsck(ADM), mkfs(ADM), sddate(C)

May 16, 1988

Page 3

RM(C)

RM(C)

Name
nn, nndir - Removes files or directories.

Syntax
rm [ -fri ] file ...
rmdir dir ...

Description
rm removes the entries for one or more files from a directory. If an
entry was the last link to the file, the file is destroyed. Removal of a
file requires write pennission in its directory, but neither read nor
write pennission on the file itself.
If a file has no write pennission and the standard input is a tenninal,
its penn iss ions are printed and a line is read from the standard input.
If that line begins with y, the file is deleted, otherwise the file
remains. No questions are asked when the -f option is given or if the
standard input is not a tenninal.
If a designated file is a directory, an error comment is printed unless
the optional argument -r has been used. In that case, rm recursively

deletes the entire contents of the specified directory, and the directory
itself.
If the -i (interactive) option is in effect, rm asks whether to delete
each file, and if the -r option is in effect, whether to examine each
directory.

The special option "--" can be used to delimit options. For example,
a file named" -f" could not be removed by rm because the hyphen is
interpreted as an option; the command rm -f would do nothing, since
no file is specified. Using rm -- -fremoves the file successfully.
rmdir removes empty directories.

See Also
nndir(C)

Diagnostics
Generally self-explanatory. It is forbidden to remove the file .• to
avoid the consequences of inadvertently doing something like:

May 16, 1988

Page 1

RM(C)

RM(C)

nn -r.*

It is also forbidden to remove the root directory of a given file system.
No more than 17 levels of subdirectories can be removed using the -r
option.

(

May 16, 1988

Page 2

RMDIR (C)

RMDIR (C)

Name

nndir - Removes directories.
Syntax
rmdir dir ...
Description

rmdir removes the entries for one or more subdirectories from a directory. A directory must be empty before it can be removed. rmdir
enforces a standard and safe procedure for removing a directory; the
contents of the directory must be removed before the directory itself
can be deleted with rmdir . Note that the "nn -r dir" command is a
more dangerous alternative to rmdir.
See Also

nn(C)
Notes

rmdir will refuse to remove the root directory of a mounted file system.

May 16, 1988

Page 1

RSH (C)

RSH (C)

Name
rsh - Invokes a restricted shell (command interpreter).

Syntax
rsh [flags] [name [ arg1 ... ] ]
Description
rsh is a restricted version of the standard command interpreter sh(C).
It is used to set up login names and execution environments whose
capabilities are more controlled than those of the standard shell. The
actions of rsh are identical to those of sh, except that changing directory with cd, setting the value of $PATH, using command names containing slashes, and redirecting output using> and » are all disallowed.

When invoked with the name -rsh, rsh reads the user's .profile (from
$HOMEi.profile). It acts as the standard sh while doing this, except
that an interrupt causes an immediate exit, instead of causing a return
to command level. The restrictions above are enforced after .profile
is interpreted.
When a command to be executed is found to be a shell procedure, rsh
invokes sh to execute it. Thus, it is possible to provide to the end user
shell procedures that have access to the full power of the standard
shell, while restricting him to a limited menu of commands; this
scheme assumes that the end user does not have write and execute permissions in the same directory.
The net effect of these rules is that the writer of the .profile has complete control over user actions, by performing guaranteed setup
actions, then leaving the user in an appropriate directory (probably not
the login directory).
rsh is actually just a link to sh and any flags arguments are the same
as for sh(C).

The system administrator often sets up a directory of commands that
can be safely invoked by rsh.

See Also
sh(C), profile(M)

May 16, 1988

Page 1

SDDATE(C)

SDDATE (C)

Name

sddate - Prints and sets backup dates.
Syntax
sddate [ name lev date ]
Description

If no argument is given, the contents of the backup date file letc/ddate
are printed. The backup date file is maintained by backup(C) and
contains the date of the most recent backup for each backup level for
each filesystem.

If arguments are given, an entry is replaced or made in letc/ddate.
name is the last component of the device pathname, lev is the backup
level number (from 0 to 9), and date is a time in the form taken by
date (C):
mmddhhmm[yy]
Where the first mm is a two-digit month in the range 01-12, dd is a
two-digit day of the month, hh is a two-digit military hour from 00-23,
and the final mm is a two-digit minute from 00-59. An optional twodigit year, yy, is presumed to be an offset from the year 1900, i.e.,
19yy.
Some sites may wish to back up file systems by copying them verbatim to backup media. sddate could be used to make a "level 0" entry
in letc/ddate, which would then allow incremental backups.
For example:
sddate rhdO 5 10081520
makes an /etc/ddate entry showing a level 5 backup of /dev/rhdO on
October 8, at 3:20 PM.
Files

letc/ddate

May 16, 1988

Page 1

SDDATE(C)

SDDATE(C)

See Also

backup(C), dump(C), date(C)
Diagnostics

bad conversion

May 16, 1988

If the date set is syntactically incorrect.

Page 2

SDIFF (C)

SDIFF (C)

Name

sdiff - Compares files side-by-side.
Syntax
sdiff [ options ... ] file 1 file2
Description
sdiff uses the output of dlff(C) 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
< in the gutter if the line only exists in filel , a > in the gutter if the
line only exists infile2 , and a I for lines that are different.

For example:
y

x

a

a

b
c
d

<
<
>

d
c

The following options exist

-w n

Uses the next argument, n, as the width of the output
line. The default line length is 130 characters.

-I

Only prints the left side of any lines that are identical.

-s

Does not print identical lines.

-0

output

Uses the next argument, output, as the name of a third
file that is created as a user-controlled merging of filel
and file2. Identical lines of filel and file2 are copied to
output. Sets of differences, as produced by dijf(C) , are
printed; where a set of differences share a common
gutter character. After printing each set of differences,
sdijf prompts the user with a % and waits for one of the
following user-typed commands:
Appends the left column to the output file

May 16, 1988

r

Appends the right column to the output file

s

Turns on silent mode; does not print identical lines

Page 1

SDIFF(C)

SDIFF (C)
v Turns off silent mode
e I
Calls the editor with the left column

e r
Calls the editor with the right column
e b
Calls the editor with the concatenation of
left and right
e

Calls the editor with a zero length file

q Exits from the program
On exit from the editor, the resulting file is concatenated
on the end of the output file.
See Also
diff(C), ed(C)

May 16, 1988

Page 2

SED (C)

SED (C)

Name

sed - Invokes the stream editor.
Syntax
sed [ -n ] [ -e script] [ -f sfile ] [ files]
Description

sed copies the named files (standard input default) to the standard output, edited according to a script of commands. The -f option causes
the script to be taken from file sfile; these options accumulate. If
there is just one -e option and no -f options, the flag -e may be omitted. The -n option suppresses the default output. A script consists of
editing commands, one per line, of the following form:

[ address [ , address ] ] function [ arguments ]
In normal operation, sed cyclically copies a line of input into a pattern
space (unless there is something left after a D command), applies in
sequence all commands whose addresses select that pattern space,
and at the end of the script copies the pattern space to the standard
output (except under -n) and deletes the pattern space.
A semicolon (;) can be used as a command delimiter.
Some of the commands use a hold space to save all or part of the pattern space for subsequent retrieval.
An address is either a decimal number that counts input lines cumulatively across files, a $ that addresses the last line of input, or a context
address, i.e., a/regular expression/ in the style of ed(C) modified as
follows:
In a context address, the construction \?reguZar expression?, where
? is any character, is identical to /regular expression /. Note that
in the context address \xabc\xdefx, the second x stands for itself,
so that the regular expression is abcxdef.
The escape sequence \n matches a newline embedded in the pattern space.
A period. matches any character except the terminal newline of
the pattern space.
A command line with no addresses selects every pattern space.

May 16, 1988

Page 1

SED (C)

SED (C)

A command line with one address selects each pattern space that
matches the address.
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.
Editing commands can be applied only to nonselected pattern spaces
by use of the negation function! (below).
In the following list of functions, the maximum number of permissible
addresses for each function is indicated in parentheses.
The text argument consists of one or more lines, all but the last of
which end with backslashes to hide the newlines. Backslashes in text
are treated like backslashes in the replacement string of an s command, and may be used to protect initial blanks and tabs against the
stripping that is done on every script line. The rfile or wfile argument
must terminate the command line and must be preceded by exactly
one blank. Each wfile is created before processing begins. There can
be at most 10 distinct wfile arguments.
(1) a\

text

Appends text, placing it on the output before reading the
next input line.

(2) b label Branches to the: command bearing the label. If label is
empty, branches to the end of the script.
(2) c\

text

Changes text by deleting the pattern space and then
appending text. With 0 or 1 address or at the end of a 2address range, places text on the output and starts the next
cycle.

(2) d

Deletes the pattern space and starts the next cycle.

(2) D

Deletes the initial segment of the pattern space through
the first newline and starts the next cycle.

(2) g

Replaces the contents of the pattern space with the contents of the hold space.

(2) G

Appends the contents of the hold space to the pattern
space.

(2) h

Replaces the contents of the hold space with the contents
of the pattern space.

May 16, 1988

Page 2

SED (C)

SED (C)

(2)H

Appends the contents of the pattern space to the hold
space.

(1) i\
text

Insert. Places text on the standard output.

(2)1

Lists the pattern space on the standard output with nonprinting characters spelled in two-digit ASCII and long
lines folded.

(2)n

Copies the pattern space to the standard output. Replaces
the pattern space with the next line of input.

(2)N

Appends the next line of input to the pattern space with an
embedded newline. (The current line number changes.)

(2)p

Prints (copies) the pattern space on the standard output.

(2)P

Prints (copies) the initial segment of the pattern space
through the first newline to the standard output.

(l)q

Quits sed by branching to the end of the script. No new
cycle is started.

(2) r rfile

Reads the contents of rfile and places them on the output
before reading the next input line.

(2)s/regular expression/replacementlJlags
Substitutes the replacement string for instances of the
regular expression in the pattern space. Any character
may be used instead of /. For a more detailed description,
see ed(C). Flags is zero or more of:

n n=1-512. Substitute for just the nth occurrence of the
regular expression.
g Globally substitutes for all nonoverlapping instances
of the regular expression rather than just the first one.
p Prints the pattern space if a replacement was made.

w wfile
Writes the pattern space to wfile if a replacement was
made.
(2) t label

Branches to the colon (:) command bearing label if any
substitutions have been made since the most recent reading of an input line or execution of a t command. If label
is empty, t branches to the end of the script.

May 16,1988

Page 3

SED (C)

SED (C)

(2) w wfile Writes the pattern space to wfile.
(2) x

Exchanges the contents of the pattern and hold spaces.

(2) y/stringl /string2/
Replaces all occurrences of characters in stringl with the
corresponding characters in string2. The lengths of
stringl and string2 must be equal.
(2)! function

Applies the function (or group, if function is {) only to
lines not selected by the addressees).

(0): label

This command does nothing; it bears a label for b and t
commands to branch to.

(1) =

Places the current line number on the standard output as a
line.

(2) {

Executes the following commands through a matching }
only when the pattern space is selected.

(0)

An empty command is ignored.

See Also
awk(C), ed(C), grep(C)

Notes
This command is explained in detail in XENlX Text Processing Guide.

May 16,1988

Page 4

SETCOLOR(C)

SETCOLOR (C)

Name
setcolor, setcolour - Set screen color.

Syntax
setcolor -[nbrgopc] argument [argument]
Description
setcolor allows the user to set the screen color on a color screen. Both
foreground and background colors can be set independently in a range
of 16 colors. setcolor can also set the reverse video and graphics
character colors. setcolor with no arguments produces a usage message that displays all available colors, then resets the screen to its previous state.
For example, the following strings are possible colors.
blue
It_blue
cyan
It_cyan

magenta
It_magenta
white
hi_white

brown
yellow
green
It_green

black
gray
red
It_red

The following flags are available. In the arguments below, "color" is
taken from the above list.
-n Set the screen to "normal" white characters on black background.
color [color]
Set the foreground to the first color. Sets background to second
color if a second color choice is specified.
-b color

Set the background to the specified color.

-r color
Set the foreground reverse video characters to the first color. Set
reverse video characters' background to second color.
-g color

Set the foreground graphics characters to the first color. Set graphics characters' background to second color.
-0

Set the color of the screen border (overscan region).

-p pitch duration
Set the pitch and duration of the bell. Pitch is the period in
microseconds, and duration is measured in fifths of a second.

May 16, 1988

Page 1

~'/!"lCULUf((C)

SETCOLOR (C)

When using this option, a control-G (bell) must be echoed to the
screen for the command to work. For example:
setcolor -p 2500 2
echo "G
-cfirst last
Set the first and last scan lines of the cursor. (For more information see screen(HW).)

Notes

The ability of setcolor to set any 'of these described functions is ultimately dependent on the ability of devices to support them. setcolor
emits an escape sequence that mayor may not have an effect on monochrome devices.
Occasionally changing the screen color can help prolong the life of
your monitor.
See Also

screen(HW), console(HW)

May 16, 1988

Page 2

SETKEY(C)

SETKEY (C)

Name
setkey - Assigns the function keys.

Syntax
setkey keynum string
Description
The setkey command assigns the given ANSI string to be the output
of the computer function key given by keynum. For example, the
command:
setkey 1 date
assigns the string "date" as the output of function key 1. The string
can contain control characters, such as a newline character, and
should be quoted to protect it from processing by the shell. For exampIe, the command:
setkey 2 "pwd ; le\n"
assigns the command sequence "pwd ; le" to function key 2. Notice
how the newline character is embedded in the quoted string. This
causes the commands to be carried out when function key 2 is pressed.
Otherwise, the Enter key would have to be pressed after pressing the
function key, as in the previous example.

Files
/bin/setkey

See Also
keyboard(HW)

Notes
setkey works only on the console keyboard.

The string mapping table is where the function keys are defined. It is
an array of 512 bytes (typedef strmap_t) where null terminated strings
can be put to redefine the function keys. The first null terminated
string is assigned to the first string key, the second to the second string
key, and so on. There is one string mapping table per multiscreen.

May 16,1988

Page 1

SETKEY(C)

SETKEY(C)

Although the size of the setkey string mapping table is 512 bytes,
there is a limit of 30 characters that can be assigned to any individual
function key.
Assigning more than 512 characters to the string mapping table causes
the function key buffer to overflow. When this happens, the sequences
sent by the arrow keys are overwritten, effectively disabling them.
Once the function key buffer overflows, the only way to enable the
arrow keys is to reboot the system.
The table below lists the keynum values for the function keys:
i

Function key

keynum

Function key

keynum

FI
F2
F3
F4
F5
F6
F7
F8
F9
FlO
F11
FI2
Shift-FI
Shift-F2
Shift-F3
Shift-F4
Shift-F5
Shift-F6
Shift-F7
Shift-F8
Shift-F9
Shift-FlO
Shift-FII
Shift-FI2
Ctrl-F1
Ctrl-F2
Ctrl-F3
Ctrl-F4
Ctrl-F5
Ctrl-F6
Ctrl-F7
Ctrl-F8
Ctrl-F9

1
2
3
4

Ctrl-FIO
Ctrl-FII
Ctrl-FI2
Ctrl-Shift-Fl
Ctrl-Shift-F2
Ctrl-Shift-F3
Ctrl-Shift-F4
Ctrl-Shift-F5
Ctrl-Shift-F6
Ctrl-Shift-F7
Ctrl-Shift-F8
Ctrl-Shift-F9
Ctrl-Shift-FI0
Ctrl-Shift-F1I
Ctrl-Shift-F12

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

May 16, 1988

5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Numeric Key-Pad
7
8
9
4
5
6
+
1
2
3
0

keynum
49
50
51
52
53
54
55
56
57
58
59
60

Page 2

SH(C)

SH(C)

Name
sh - Invokes the shell command interpreter.
Syntax
sh [ -ceiknrstuvx ] [ args ]
Description
The shell is the standard command programming language that executes commands read from a terminal or a file. See Invocation below
for the meaning of arguments to the shell.
Commands

A simple-command .is a sequence of nonblank words separated by
blanks (a 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 command.
The command name is passed as argument 0 (see exec (S». The value
of a simple-command is its exit status if it terminates normally, or
(octal) lOOO+status if it terminates abnormally (i.e., if the failure produces a core file). See signal(S) for a list of status values.
A pipeline is a sequence of one or more commands separated by a
vertical bar (I). (The caret (,,), is an obsolete synonym for the vertical bar and should not be used in a pipeline.) The standard output of
each command but the last is connected by a pipe(S) 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.
A list is a sequence of one or more pipelines separated by;, &, &&,
or II, and optionally terminated by ; or &. Of these four symbols, ;
and & have equal precedence, which is lower than that of && and II .
The symbols && and II also have equal precedence. A semicolon (;)
causes sequential execution of the preceding pipeline; an ampersand
(&) causes asynchronous execution of the preceding pipeline (i.e., the
shell does not wait for that pipeline to finish). The symbol && (II )
causes the list following it to be executed only if the preceding pipeline returns a zero (nonzero) exit status. An arbitrary number of newlines may appear in a list, instead of semicolons, to delimit commands.

l\1ay 16, 1988

Page 1

SH(C)

SH(C)

A command is either a simple-command or one of the following commands. Unless otherwise stated, the value returned by a command is
that of the last simple-command executed in the command:
for name [ in word ... ]
do
list
done
Each time a for command is executed, name is set to the next word
taken from the in word list. If in word is omitted, then the for command executes the do list once for each positional parameter that is
set (see Parameter Substitution below). Execution ends when there
are no more words in the list.
case word in
[ pattern [I pattern ] ... ) list
;; ]
esac
A case command executes the list associated with the first pattern that matches word. The form of the patterns is the same as that
used for filename generation (see Filename Generation below).
if list then
list
[ elif list then
list]
[ else list]
fi
The list following if is executed and, if it returns a zero exit status, the
list following the first then is executed. Otherwise, the list following
elif is executed and, if its value is zero, the list following the next
then is executed. Failing that, the else list is executed. If no else list
or then list is executed, then the if command returns a zero exit status.
while list
do
list
done
A while command repeatedly executes the while list and, if the exit
status of the last command in the list is zero, executes the do list; otherwise the loop terminates. If no commands in the do list are executed, then the while command returns a zero exit status; until may be
used in place of while to negate the loop termination test.
(list)
Executes list in a subshell.
{list ;}
list is simply executed.

May 16, 1988

Page 2

SH(C)

SH(C)

name () {list;}
Define a function which is referenced by name. The body of functions is the list of commands between { and }. Execution of functions is described later (see Execution.)
The following words are recognized only as the first word of a command and when not quoted:

if then else elif fi case esac for while until do done { }
Comments
A word beginning with # causes that word and all the following characters up to a newline to be ignored.

Command Substitution
The standard output from a command enclosed in a pair of grave
accents (,,) may be used as part or all of a word; trailing newlines
are removed.

Parameter Substitution
The character $ is used to introduce substitutable parameters. Positional parameters may be assigned values by set. Variables may be set
by writing:

name =value [ name =value ] ...
Pattern-matching is not performed on value.

${parameter}
A parameter is a sequence of letters, digits, or underscores (a
name), a digit, or any of the characters *, @, #, ?, -, $, and!. The
value, if any, of the parameter is substituted. The braces are
required only when parameter is followed by a letter, digit, or
underscore that is not to be interpreted as part of its name. A name
must begin with a letter or underscore. If parameter is a digit then
it is a positional parameter. If parameter is * or @, then all the
positional parameters, starting with $1, are substituted (separated
by spaces). Parameter $0 is set from argument zero when the shell
is invoked.
${parameter :-word}
If parameter is set and is not a null argument, substitute its value;
otherwise substitute word.

May 16, 1988

Page 3

SH(C)

SH(C)

${parameter :=word}
If parameter is not set or is null, then set it to word; the value of
the parameter is then substituted. Positional parameters may not
be assigned to in this way.
${parameter :?word}
If parameter is set and is not a null argument, substitute its value;
otherwise, print word and exit from the shell. If word is omitted,
the message "parameter null or not set" is printed.
${parameter :+word}
If parameter is set and is not a null argument, substitute word; otherwise substitute nothing. In the above, word is not evaluated
unless it is to be used as the substituted string, so that in the following example, pwd is executed only if d is not set or is null:
echo ${ d:-' pwd' }

If the colon (:) is omitted from the above expressions, then the shell
only checks whether parameter is set.
The following parameters are automatically set by the shell:

# The number of positional parameters in decimal
-

Flags supplied to the shell on invocation or by the set command

? The decimal value returned by the last synchronously executed
command

$ The process number of this shell
The process number of the last background command invoked
The following parameters are used by the shell:

CDPATH
Defines search path for the cd command. See the section Special
Commands, "cd".

HOME
The default argument (home directory) for the cd command
PATH

The search path for commands (see Execution below)
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

May 16, 1988

Page 4

SH(C)

SH(C)

MAILCHECK
This parameter specifies how often (in seconds) the shell will
check for the arrival of mail in the files specified by the
MAIL PATH or MAIL parameters. The default value is 600
seconds (10 minutes). If set to 0, the shell will check before each
prompt.
MAILPATH
A colon (:) separated list of file names. If this parameter is set, the
shell informs the user of the arrival of mail in any of the specified
files. Each file name can be followed by % and a message that
will be printed when the modification time changes. The default
message is you have mail.
PSI
Primary prompt string, by default "$ "
PS2
Secondary prompt string, by default "> "
IFS
Internal field separators, normally space, tab, and newline
SHACCT
If this parameter is set to the name of a file writable by the user,
the shell will write an accounting record in the file for each shell
procedure executed. Accounting routines such as acctcom(ADM)
and accton(ADM) can be used to analyze the data collected. This
feature does not work with all versions of the shell.
SHELL
When the shell is invoked, it scans the environment (see Environment below) for this name. If it is found and there is an 'r' in the
file name part of its value, the shell becomes a restricted shell.

The shell gives default values to PATH, PSI, PS2, and IFS, while
HOME and MAIL are not set at all by the shell (although HOME is set
by login (M».
Blank Interpretation

After parameter and command substitution, the results of substitution
are scanned for internal field separator characters (those found in IFS)
and split into distinct arguments where such characters are found.
Explicit null arguments (" II or ~ ~) are retained. Implicit null arguments (those resulting from parameters that have no values) are
removed.

May 16, 1988

Page 5

SH(C)

SH(C)

Filename Generation
Following substitution, each command word is scanned for the characters *, ?, and [. If one of these characters appears, the word is
regarded as a pattern. The word is replaced with alphabetically sorted
filenames that match the pattern. If no filename is found that matches
the pattern, the word is left unchanged. The character . at the start of a
filename or immediately following a /, as well as the character / itself,
must be matched explicitly. These characters and their matching patterns are:

*

Matches any string, including the null string.

? Matches any single character.
[ ... ]

Matches anyone of the enclosed characters. A pair of characters
separated by - matches any character lexically between the pair,
inclusive. If the first character following the opening bracket ([) is
an exclamation mark (!), then any character not enclosed is
matched.

Quoting
The following characters have a special meaning to the shell and
cause termination of a word unless quoted:
; & ( ) I

A

< > newline space tab

A character may be quoted (i.e., made to stand for itself) by preceding
it with a \. The pair \newline is ignored. All characters enclosed
between a pair of single quotation marks (" "), except a single quotation mark, are quoted. Inside double quotation marks (" "), parameter
and command substitution occurs and \ quotes the characters \, ", ",
and $. "$*" is equivalent to "$1 $2 ... ", whereas "$@" is
equivalent to "$1" "$2" ...

Prompting
When used interactively, the shell prompts with the value of PSI
before reading a command. If at any time a newline is typed and
further input is needed to complete a command, the secondary prompt
(i.e., the value of PS2) is issued.

May 16, 1988

Page 6

SH(C)

SH(C)

Spelling Checker
When using cd(C) the shell checks spelling. For example, if you
change to a different directory using cd and misspell the directory
name, the shell repsonds with an alternative spelling of an existing
directory. Enter "y" and press RETURN (or just press RETURN) to
change to the offered directory. If the offered spelling is incorrect,
enter "n", then retype the command line. In this example the sh(C)
response is boldfaced:
$ cd /usr/spol/uucp
cd lusrlspooIluucp?y

ok
Input/Output
Before a command is executed, its 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. They are not passed on to the invoked command; substitution occurs before word or digit is used:

word

Use file word as standard output (file descriptor 1).
If the file does not exist, it is created; otherwise, it is
truncated to zero length.

»word

Use file word as standard output. If the file exists,
output is appended to it (by first seeking the
end-of-file); otherwise, the file is created.

«[ - ]word

The shell input is read up to a line that is the same as
word, or to an end-of-file. The resulting document
becomes the standard input. If any character of word
is quoted, no interpretation is placed upon the characters of the document; otherwise, parameter and
command substitution occurs, (unescaped) \newline
is ignored, and \ must be used to quote the characters
\, $, "', and the first character of word. If - is
appended to « , all leading tabs are stripped from
word and from the document.

<&digit

The standard input is duplicated from file descriptor
digit (see dup(S». Similarly for the standard output
using >.

<&-

The standard input is closed. Similarly for the standard output using>.

May 16, 1988

Page 7

SH(C)

SH(C)

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:

... 2>&1
creates file descriptor 2 that is a duplicate of file descriptor 1.
If a command is followed by &, the default standard input for the
command is the empty file Idev/null. Otherwise, the environment for
the execution of a command contains the file descriptors of the invoking shell as modified by input/output specifications.
Environment

The environment (see environ (M» 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 affect
the environment unless the export command is used to bind the shell's
parameter to the environment. The environment seen by any executed
command is composed of any unmodified name-value pairs originally
inherited by the shell, minus any pairs removed by unset, plus any
modifications or additions, all of which must be noted in export commands.
The environment for any simple-command may be augmented by
prefixing it with one or more assignments to parameters. Thus:
TERM=450 cmd args

and
(export TERM; TERM=450; cmd args)
are equivalent (as far as the above execution of cmd is concerned).
If the -k flag is set, all keyword arguments are placed in the environment, even if they occur after the command name.
Signals

The INTERRUPT and QUIT signals for an invoked command are
ignored if the command is followed by &; .otherwise signals have the
values inherited by the shell from its parent, with the exception of signal 11. See the trap command below.

May 16, 1988

Page 8

SH(C)

SH(C)

Execution
Each time a command is executed, the above substitutions are carried
out. If the command name does not match a Special Command, but
matches the name of a defined function, the function is executed in the
shell process (note how this differs from the execution of shell procedures). The positional parameters $1, $2, ... are set to the arguments
of the function. If the command name matches neither a Special Command nor the name of a defined function, a new process is created and
an attempt is made to execute the command via exec (S).
The shell parameter PATH defines the search path for the directory
containing the command. Alternative directory names are separated
by a colon (:). The default path is :/bin:/usr/bin (specifying the
current directory, Ibin, and lusr/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 I, then the
search path is not used. Otherwise, each directory in the path is
searched for an executable file. If the file has execute permission but
is not an a.out file, it is assumed to be a file containing shell commands. A subshell (i.e., a separate process) is spawned to read it. A
parenthesized command is also executed in a subshell.
Shell procedures are often usee by users running the csh. However, if
the first character of the procedure is a # (comment character), csh
assumes the procedure is a csh script, and invokes /bin/csh to execute
it. Always start sh procedures with some other character if csh users
are to run the procedure at any time. This invokes the standard shell
/bin/sh.

The location in the search path where a command was found is
remembered by the shell (to help avoid unnecessary execs later). If
the command was found in a relative directory, its location must be
re-determined whenever the current directory changes. The shell forgets all remembered locations whenever the PATH variable is changed
or the hash -r command is executed (see beloW).

Special Commands
Input/output redirection is permitted for these commands:
No effect; the command does nothing. A zero exit code is
returned .

. file
Reads and executes commands from file and returns. The search
path specified by PATH is used to find the directory containing file.

May 16, 1988

Page 9

SH(C)

SH(C)

break [ n ]
Exits from the enclosing for or while loop, if any. If n is specified,
it breaks n levels.
continue [ n ]
Resumes the next iteration of the enclosing for or while loop. If n
is specified, it resumes at the n-th enclosing loop.
cd [ arg ]

Changes the current directory to arg. The shell parameter HOME
is the default argo The shell parameter CDPATH defines the
search path for the directory containing arg. Alternative directory
names are separated by a colon (:). The default path is 
(specifying the current directory). Note that the current directory
is specified by a null path name, which can appear immediately
after the equal sign or between the colon delimiters anywhere else
in the path list. If arg begins with a /, the search path is not used.
Otherwise, each directory in the path is searched for arg.
If the shell is reading its commands from a terminal, and the specified
directory does not exist (or some component cannot be searched),
spelling correction is applied to each component of directory, in a
search for the "correct" name. The shell then asks whether or not to
try and change directory to the corrected directory name; an answer of
n means "no", and anything else is taken as "yes".

echo [ arg ]
Writes arguments separated by blanks and terminated by a newline
on the standard output. Arguments may be enclosed in quotes.
Quotes are required so that the shell correctly interprets these special escape sequences:

\b
\c
\f
\n
\r

Backspace
Prints line without newline.
Form feed
Newline
Carriage return
\t Tab
\v Vertical tab
\\ Backslash
\n The 8-bit character whose ASCII code
number n must start with a zero
eval [ arg ... ]
The arguments are read as input to the
command(s) executed.
exec [ arg ... ]
The command specified by the arguments
this shell without creating a new process.

May 16,1988

is the 1, 2 or 3-digit octal

shell and the resulting

is executed in place of
Input/output arguments

Page 10

SH(C)

SH(C)

may appear and, if no other arguments are given, cause the shell
input/output to be modified.
exit [ n ]
Causes a shell to exit with the exit status specified by n. If n is
omitted, the exit status is that of the last command executed. An
end-of-file will also cause the shell to exit.
export [ name . .. ]
The given names are marked for automatic export to the environment of subsequently executed commands. If no arguments are
given, a list of all names that are exported in this shell is printed.
hash [ -r ] [name... ]
For each name, the location in the search path of the command
specified by name is determined and remembered by the shelL The
-r option causes the shell to forget all remembered locations. If no
arguments are given, information about remembered commands is
presented. Hits is the number of times a command has been
invoked by the shell process. Cost is a measure of the work
required to locate a command in the search path. There are certain
situations which require that the stored location of a command be
recalculated. Commands for which this will be done are indicated
by an asterisk (*) adjacent to the hits information. Cost will be
incremented when the recalculation is done.
newgrp [ arg . .. ]
Equivalent to exec newgrp arg ...
pwd
Print the current working directory. See pwd(C) for usage and
description.
read [ name . .. ]
One line is read from the standard input and the first word is
assigned to the first name, the second word to the second name,
etc., with leftover words assigned to the last name. The return
code is 0 unless an end-of-file is encountered.
read only [ name ... ]
The given name s are marked readonly and the values of the these
names may not be changed by subsequent assignment. If no arguments are given, a list of all readonly names is printed.
return [ n ]
Causes a function to exit with the return value specified by n. If n
is omitted, the return status is that of the last command executed.
set [ -eknuvx [ arg . .. ] ]
-e If the shell is noninteractive, exits immediately if a command
exits with a nonzero exit status.
-f Disables file name generation.
-h Locates and remembers function commands as functions are
defined (function commands are normally located when the
function is executed).

May 16,1988

Page 11

SH(C)

SH(C)

-k Places all keyword arguments in the environment for a command, not just those that precede the command name.
-D Reads commands but does not execute them.
-u Treats unset variables as an error when substituting.
-v Prints shell input lines as they are read.
-x Prints commands and their arguments as they are executed.
Although this flag is passed to subshells, it does not enable tracing in those subshells.
Does not change any of the flags; useful in setting $1 to -.
Using + rather than - 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 $-. The remaining arguments are posi:
tional parameters and are assigned, in order, to $1, $2, ... If no
arguments are given, the values of all names are printed.
shift
The positional parameters from $2 ... are renamed $1 ...
test
Evaluates conditional expressions. See test (C) for usage and
description.
times
Prints the accumulated user and system times for processes run
from the shell.
trap [ arg ] [ n ] ...
arg is a command to be read and executed when the shell receives
signal(s) n. (Note that 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. The highest signal number allowed is 16.
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 1J
(memory fault) produces an error. If arg is absent, all trap(s) n are
reset to their original values. If arg is the null string, this signal is
ignored by the shell and by the commands it invokes. If n is 0, the
command arg is executed on exit from the shell. The trap command with no arguments prints a list of commands associated with
each signal number.
type [ name ... ]
For each name, indicate how it would be interpreted if used as a
command name.
ulimit [[ -f ] n ]
imposes a size limit of n blocks on files.
-f imposes a size limit of n blocks on files written by child
processes (files of any size may be read). Any user may
decrease the file size limit, but only the super-user (root) can
increase the limit. With no argument, the current limit is
printed.

May 16,1988

Page 12

SH(C)

SH(C)

If no option is given and a number is specified, -f is assumed.
unset [ name ... ]
For each name, remove the corresponding variable or function.
The variables PATH, PSI, PS2, MAILCHECK and IFS cannot be
unset.
umask [ 000 ]
The user file-creation mask is set to the octal number 000 where 0
is an octal digit (see umask(C». If 000 is omitted, the current
value of the mask is printed.
wait [ n ]
Waits for the specified process to terminate, and reports the termination status. If n is not given, all currently active child processes
are waited for. The return code from this command is always O.

Invocation
If the shell is invoked through exec (S) and the first character of argument 0 is -, commands are initially read from /etc/profile and then
from $HOME/.profile, if such files exist. Thereafter, commands are
read as described below, which is also the case when the shell is
invoked as /bin/sh. The flags below are interpreted by the shell on
invocation only; note that unless the -c or -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:
-c string If the -c flag is present, commands are read from string.
-s
If the -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.
-t
If the -t flag is present, a single command is read and executed, and the shell exits. This flag is intended for use by
C programs only and is not useful interactively.
-i
If the -i flag is present or if the shell input and output are
attached to a terminal, this shell is interactive. In this
case, TERMINATE is ignored (so that kill 0 does not kill
an interactive shell) and INTERRUPT is caught and
ignored (so that wait is interruptible). In all cases, QIDT
is ignored by the shell.
-r
If the -r flag is present, the shell is a restricted shell (see
rsh(C».

The remaining flags and arguments are described under the set command above.

May 16, 1988

Page 13

SH(C)

SH(C)

Exit Status
Errors detected by the shell, such as syntax errors, cause the shell to
return a nonzero exit status. If the shell is being used noninteractively, execution of the shell file is abandoned. Otherwise, the shell
returns the exit status of the last command executed. See the exit command above.
Files
/etc/profile
$HOME/.profile
/tmp/sh*
/dev/null

system default profile if none is present
read by login shell at login
temporary file for <<
source of empty file

See Also
cd(C), env(C), 10gin(M), newgrp(C), rsh(C), test(C), umask(C),
dupeS), exec(S), fork(S), pipe(S), signal(S), umask(S), waiteS),
a.out(F), profile(M), environ(M)
Notes
The command readonly (without arguments) produces the same output as the command export.
If « is used to provide standard input to an asynchronous process
invoked by &, the shell gets mixed up about naming the input document; a garbage file /tmp/sh * is created and the shell complains about
not being able to find that file by another name.

If a command is executed, and a command with the same name is
installed in a directory in the search path before the directory where
the original command was found, the shell will continue to exec the
original command. Use the hash command to correct this situation.
If you move the current directory or one above it, pwd may not give
the correct response. Use the cd command with a full path name to
correct this situation.

When a sh(C) user logs in, the system reads and executes commands
in letc!profile before executing commands in the user's
$H0 MEl .profile. You can, therefore, modify the environment for all
sh(C) users on the system by editing letc!profile.

May 16,1988

Page 14

SHL(C)

SHL(C)

Name

shl - Shell layer manager
Syntax

shl
Description
shl allows a user to interact with more than one shell from a single terminal. The user controls these shells, known as layers, using the commands described below.

The current layer is the layer that can receive input from the keyboard. Other layers attempting to read from the keyboard are blocked.
Output from multiple layers is multiplexed onto the terminal. To have
the output of a layer blocked when it is not current, the stty(C) option
loblk may be set within the layer.
The stty character swtch (set to "z if NUL) is used to switch control to
shl from a layer. shl has its own prompt, ::13>, to help distinguish it
from a layer.
A layer is a shell that has been bound to a virtual tty device
(/dev/sxt???). The virtual device can be manipulated like a real tty
device using stty (C) and ioctl (S). Each layer has its own process
group id.
Definitions

A name is a sequence of characters delimited by a blank, tab or newline. Only the first eight characters are significant. The names (1)
through (7) cannot be used when creating a layer. They are used by
shl when no name is supplied. They may be abbreviated to just the
.
digit.
Commands

The following commands may be issued from the shl prompt level.
Any unique prefix is accepted.
create name
Create a layer called name and make it the current layer. If no
argument is given, a layer will be created with a name of the form
(#) where # is the last digit of the virtual device bound to the layer.
The shell prompt variable PSt is set to the name of the layer followed by a space, or, if superuser, the name followed by a sharp (#)

May 16,1988

Page 1

SHL(C)

SHL(C)

and a space. A maximum of seven layers can be created.
block name [ name ... ]
For each name, block the output of the corresponding layer when it
is not the current layer. This is equivalent to setting the stty option
loblk within the layer.
delete name name ...
For each name, delete the corresponding layer. All processes in
the process group of the layer are sent the SIGHUP signal (see signal(2)).
help (or?)
Print the syntax of the shl commands.
layers -I name ...
For each name, list the layer name and its process group. The -I
option produces a ps(l)-like listing. If no arguments are given,
information is presented for all existing layers.
resume name
Make the layer referenced by name the current layer. If no argument is given, the last existing current layer will be resumed.
toggle
Resume the layer that was current before the last current layer.
unblock name [name ... ]
For each name, do not block the output of the corresponding layer
when it is not the current layer. This is equivalent to setting the
stty option loblk within the layer.
quit
Exit shl. All layers are sent the SIGHUP signal.
name
Make the layer referenced by name the current layer.
Files
/dev/sxt???
$SHELL

Virtual tty devices
Variable containing path name of the shell to
use (default is /bin/sh).

See Also
ioctl(S), mkdev(ADM), sh(C), signal(S), stty(C), sxt(M)

May 16, 1988

Page 2

SHL (C)

SHL(C)

Note

It is inadvisable to kill shl.
If shl does not run properly on a particular terminal, you may have to
set istrip for that terminal's line by entering the following command
at the terminal:

stty istrip
By default, XENIX is configured for one sheUlayer session at a time.
To increase this single session limit, enter the command:
mkdev shl
This executes a script which prompts you for the number of sessions
desired. The script also allows you to relink the kernel. The new session limit becomes effective after the kernel is rebooted. (For more
information, see mkdev(ADM).)

May 16, 1988

Page 3

SLEEP (C)

SLEEP (C)

Name

sleep - Suspends execution for an interval.
Syntax
sleep time
Description
sleep suspends execution for time seconds. It is used to execute a
command after a certain amount of time as in:

(sleep 105; command)&
or to execute a command every so often, as in:
while true
do
command
sleep 37
done
See Also

alarm(S), sleep(S)
Notes

It is recommended that time be less than 65536 seconds.

May 16,1988

Page 1

SORT (C)

SORT (C)

Name
sort - Sorts and merges files.
Syntax
sort [-emu] [-ooutput] [-ykmem] [-zrecsz] [-dfiMnr] [-btx] [+posl]
[-pos2] [files]
Description

sort sorts lines of all the named files together and writes the result on
the standard output. The standard input is read if - is used as a file
name or if no input files are named.
Comparisons are based on one or more sort keys extracted from each
line of input. By default, there is one sort key, the entire input line,
and ordering is le~icographic by bytes in the machine's collating
sequence.
The following options alter the default behavior:
-c

Check that the input file is sorted according to the ordering
rules; give no output unless the file is out of sort.

-m

Merge only, the input files are already sorted.

-u

Unique: suppress all but one in each set of lines having equal
keys. This option can result in unwanted characters placed at
the end of the sorted file.

-ooutput
The argument given 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. There may be optional blanks between -0 and output.
-ykmem
The amount of main memory used by the sort has a large impact
on its performance. Sorting a small file in a large amount of
memory is a waste. If this option is omitted, sort begins using a
system default memory size, and continues to use more space as
needed. If this option is presented with a value, kmem, sort will
start using that number of kilobytes of memory, unless the
administrative minimum or maximum is violated, in which case
the corresponding extremum will be used. Thus, -yO is
guaranteed to start with minimum memory. By convention, -y
(with no argument) starts with maximum memory.

May 16, 1988

Page 1

SORT (C)

SORT (C)

-zrecsz
The size of the longest line read is recorded in the sort phase so
buffers can be allocated during the merge phase. If the sort
phase is omitted via the -c or -m options, a popular system
default size will be used. Lines longer than the buffer size will
cause sort to terminate abnormally. Supplying the actual
number of bytes in the longest line to be merged (or some larger
value) will prevent abnormal termination.

The following options override the default ordering rules.
-d

"Dictionary" order: only letters, digits and blanks (spaces and
tabs) are significant in comparisons.

-f

Fold lower case letters into upper case.

-i

Ignore characters outside the ASCII range 040-0176 in nonnumeric comparisons.

-M

Compare as months. The first three non-blank characters of the
field are folded to upper case and compared so that "JAN" <
"FEB" < ... < "DEC". Invalid fields compare low to "JAN".
The -M option implies the -b option (see below).

-D

An initial numeric string, consisting of optional blanks, an
optional minus sign, and zero or more digits with optional
decimal point, is sorted by arithmetic value. The -D option
implies the -b option (see below). Note that the -b option is
only effective when restricted sort key specifications are in
effect.

-r

Reverse the sense of comparisons.

When ordering options appear before restricted sort key specifications,
the requested ordering rules are applied globally to all sort keys.
When attached to a specific sort key (described below), the specified
ordering options override all global ordering options for that key.
The notation +pos] -pos2 restricts a sort key to one beginning at pos]
and ending at pos2. The characters at positions pos] and pos2 are
included in the sort key (provided that pos2 does not precede pos1). A
missing -pos2 means the end of the line.

May 16, 1988

Page 2

SORT (C)

SORT (C)

Specifying posl and pos2 involves the notion of a field (a minimal
sequence of characters followed by a field separator or a newline). By
default, the first blank (space or tab) of a sequence of blanks acts as
the field separator. All blanks in a sequence of blanks are considered
to be part of the next field; for example, all blanks at the beginning of
a line are considered to be part of the first field. The treatment of field
separators can be altered using the options:
-tx

Use x as the field separator character; x is not considered to be
part of a field (although it may be included in a sort key). Each
occurrence of x is significant (e.g., xx delimits an empty field).

-b

Ignore leading blanks when determining the starting and ending
positions of a restricted sort key. If the -b option is specified
before the first +posl argument, it will be applied to all +posl
arguments. Otherwise, the b flag may be attached independently to each +posl or -pos2 argument (see below).

Posl and pos2 each have the form m.n optionally followed by one or
more of the flags b, d, f, i, fl, or r. A starting position specified by
+m.n is interpreted to mean the n+ 1st character in the m+ 1st field. A
missing .n means .0, indicating the first character of the m+ 1st field. If
the b flag is in effect, n is counted from the first non-blank in the
m+ 1st field; +m.Ob refers to the first non-blank character in the m+ 1st
field.
A last position specified by -m.n is interpreted to mean the nth character (including separators) after the last character of the mth field. A
missing .n means .0, indicating the last character of the mth field. If
the b flag is in effect, n is counted from the last leading blank in the
m+ 1st field; -m.1 b refers to the first non-blank in the m+ 1st field.
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.

Examples
Sort the contents of in/tie with the second field as the sort key:
sort + 1 -2 infile
Sort, in reverse order, the contents of infilel and infile2, placing the
output in outfile and using the first character of the second field as the
sort key:
sort -r -0 outfile + 1.0 -1.2 infile1 infile2
Sort, in reverse order, the contents of infilel and infile2 using the first
non-blank character of the second field as the sort key:

May 16, 1988

Page 3

SORT (C)

SORT (C)

sort -r + LOb -1.1 b infile 1 infile2
Print the password file (passwd(F» sorted by the numeric user ID (the
third colon-separated field):
sort -t: +2n -3 /etc/passwd
Print the lines of the already sorted file infile, suppressing all but the
first occurrence of lines having the same third field (the options -urn
with just one input file make the choice of a unique representative
from a set of equal lines predictable):
sort -urn +2 -3 infile
Files
/usr/tmp/stm???
See Also
comm(C), join(C), uniq(C)
Diagnostics
Comments and exits with non-zero status for various trouble" conditions (e.g., when input lines are too long), and for disorders discovered
under the -c option. When the last line of an input file is missing a
newline character, sort appends one, prints a warning message, and
continues.

May 16, 1988

Page 4

SPLIT (C)

SPLIT (C)

Name

split - Splits a file into pieces.
Syntax
split [ -n ] [ file [ name] ]
Description
split reads file and writes it in as many n-line pieces as necessary
(default 1000), onto a set of output files. The name of the first output
file is name with aa appended, and so on lexicographically. If no output name is given, x is default.
If no input file is given, or if a dash (-) is given instead, the standard
input file is used.
See Also

bfs(C), csplit(C)

May 16, 1988

Page 1

S1TY(C)

S1TY(C)

Name
stty - Sets the options for a terminal.

Syntax
stty [ -a ] [ -g] [ options]
Description
stty sets certain terminal I/O options for the device that is the current
standard input; without arguments, it reports the settings of certain
options. With the -a option, stty reports all of the option settings; with
the -g option, it reports current settings in a form that can be used as
an argument to another stty command. Detailed information about the
modes listed in the first four groups may be found in termio(M).
options in the last group are implemented using options in the previ0us groups. Refer to vidi(C) for hardware specific information that
describes control modes for the video monitor and other display devices.
Common Control Modes

parenb (-parenb)
Enables (disables) parity generation and detection.
parodd (-parodd)
Selects odd (even) parity.
cs5 cs6 cs7 cs8
Selects character size (see tty (M».

o

Hangs up phone line immediately.

5075110134150200300600
1200 1800 2400 4800 9600 ext a
Sets terminal baud rate to the number given, if possible.
hupcl (-hupcl)

Hangs up (does not hang up) phone connection on last close.
hup (-hup)

Same as hupcl (-hupcl).

cstopb (-cstopb)
Uses two(one) stop bits per character.

May 16, 1988"

Page 1

S1TY(C)

S1TY(C)

eread (-eread)
Enables (disables) the receiver.
eloeal (-eloeal)
Assumes a line without (with) modem control.
ctsflow (-etsflow)
Enables CTS protocol for a modem line.
rtsflow (-rtsflow)
Enables RTS signaling for a modem line.
Input Modes

ignhrk (-ignhrk)
Ignores (does not ignore) break on input.
brkint (-brkint)
Signals (does not signal) INTERRUPT on break.
ignpar (-ignpar)
Ignores (does not ignore) parity errors.
parmrk (-parmrk)
Marks (does not mark) parity errors (see tty (M».
inpek (-inpek)
Enables (disables) input parity checking.
istri p (-istri p )
Strips (does not strip) input characters to 7 bits.
inler (-inler)
Maps (does not map) NL to CR on input.
igner (-igner)
Ignores (does not ignore) CR on input.
icrnl (-iernl)
Maps (does not map) CR to NL on input.
iuele (-iuele)
Maps (does not map) uppercase alphabetics to lowercase on input.
ixon (-ixon)
Enables (disables) START/STOP output control. Output is stopped
by sending an ASCII DC3 and started by sending an ASCII DCI.
ixany (-ixany)
Allows any character (only DCl) to restart output.

May 16, 1988"

Page 2

S1TY(C)

S1TY(C)

ixoff (-ixoff)
Requests that the system send (not send) START/STOP characters
when the input queue is nearly empty/full.
Output Modes

opost (-opost)
Post-processes output (does not post-process output; ignores all
other output modes).
oleuc (-oleuc)
Maps (does not map) lowercase alphabetics to uppercase on output.
onler (-onler)
Maps (does not map) NL to CR-NL on output.
ocrnl (-ocrnl)
Maps (does not map) CR to NL on output.
onocr (-onocr)
Does not (does) output CRs at column zero.
onlret (-onlret)
On the terminal NL performs (does not perform) the CR function.
ofill (-ofill)
Uses fill characters (use timing) for delays.

ofdel (-ofdel)
Fill characters are DELETEs (NULs).
crO crl cr2 cr3
Selects style of delay for RETURNs (see tty (M».
nlO nil
Selects style of delay forLINEFEEDs (see tty(M».
tabO tabl tab2 tab3
Selects style of delay for horizontal TABs (see tty (M».
bsO bsl
Selects style of delay for BACKSPACEs (see tty (M».
ffO fft
Selects style of delay for FORMFEEDs (see tty (M».

vtO vtl
Selects style of delay for Vertical TABs (see tty (M».

May 16, 1988"

Page 3

SITY(C)

S17Y(C)

Local Modes
isig (-isig)
Enables (disables) the checking of characters against the special
control characters INTERRUPT and QUIT.
ieanon (-ieanon)
Enables (disables) canonical input (ERASE and KILL processing).
xease (-xease)
Canonical (unprocessed) upper/lowercase presentation.
eeho (-eeho)
Echoes back (does not echo back) every character typed.
eehoe (-eehoe)
Echoes (does not echo) ERASE character as a SPACEBAR string.
Note: this mode will erase the ERASE character on many CRT terminals; however, it does not keep track of column position and, as
a result, may be confusing on escaped characters, TABs, and
BACKSPACEs.
eehok (-eehok)
Echoes (does not echo) NL after KILL character.
ltke (-ltke)
The same as eehok (-eehok); obsolete.
eehonl (-eehonl)
Echoes (does not echo) NL.
noflsh (-noflsh)
Disables (enables) flush after INTERRUPT or QUIT.
stwrap (-stwrap)
Disables (enables) truncation of lines longer than 79 characters on
a synchronous line.
stflush (-stflush)
Enables (disables) flush on a synchronous line after every write (S).
stappl (-stappl)
Uses application (line) mode on a synchronous line.

May 16, 1988"

Page 4

STIY(C)

STIY(C)

Control Assignments
control-character-C
control-character C Sets control-character to C, where controlcharacter is ERASE, KILL, INTERRUPT, QUIT, EOF, EOL. erase,
kill, interrupt, quit, eof, or eol. If C is preceded by a caret C)
(escaped from the shell), then the value used is the corresponding
CTRL character (e.g., " . . D" is a CTRL-D ); " . . ?" is interpreted as
DELETE and " . . -" is interpreted as undefined.
min i, time i (0final.file

May 16, 1988

Page 1

TEST (C)

TEST (C)

Name
test - Tests conditions.

Syntax
test expr
[expr]
Description
test evaluates the expression expr, and if its value is true, returns a
zero (true) exit status; otherwise, test returns a nonzero exit status if
there are no arguments. The following primitives are used to construct expr:
-r file

True if file exists and is readable.

-w file

True if file exists and is writable.

-x file

True if file exists and is executable.

-ffile

True if file exists and is a regular file.

-dfile

True if file exists and is a directory.

-cfile

True if file exists and is a character special file.

-bfile

True if file exists and is a block special file.

-ufile

True iffile exists and its set-user-ID bit is set.

-gfile

True iffile exists and its set-group-ID bit is set.

-kfile

True if file exists and its sticky bit is set.

-sfile

True if file exists and has a size greater than zero.

-t [Jildes]

True if the open file whose file descriptor number is
fildes (1 by default) is associated with a terminal dev-

ice.

-z sl

True if the length of string sl is zero.

-n sl

True if the length of string sl is nonzero.

sl =s2

True if strings sl and s2 are identical.

May 16, 1988

Page 1

TEST (C)

TEST (C)

sl !=s2

True if strings sl and s2 are not identical.

sl

True if sl is not the null string.

nl -eq n2

True if the integers nl and n2 are algebraically equal.
Any of the comparisons -ne, -gt, -ge, -It, and -Ie may
be used in place of -eq .

These primaries may be combined with the following operators:
Unary negation operator
-a

Binary and operator

-0

Binary or operator (-a has higher precedence than
-0)

(expr)

Parentheses for grouping

Notice that all the operators and flags are separate arguments to test.
Notice also, that parentheses are meaningful to the shell and, therefore, must be escaped.
See Also
find(C), sh(C)

Warning
In the second form of the command (i.e., the one that uses [], rather
than the word test), the square brackets must be delimited by blanks.

May 16, 1988

Page 2

TIC (C)

TIC (C)

Name
tic - Tenninfo compiler.

Syntax
tic [-v [n] [-p pennlist] ] file ...
Description
tic translates tenninfo files from the source fonnat into the compiled
fonnat. The results are placed in the directory lusrllib/terminfo.

The -v (verbose) option causes tic to output trace infonnation showing
its progress. If the optional digit n is appended, the level of verbosity
can be increased.
The -p option directs tic to create a pennissions file permlist for use
with Jixperm(ADM).
tic compiles all tenninfo descriptions in the given files. When a use=
field is discovered, tic first searches the current file and then the master file .Iterminfo.src.
If the environment variable TERMINFO is set, the results are placed

there instead of lusrllib/terminfo.
Some limitations: the total size of a description cannot exceed 4096
bytes; the name field cannot exceed 128 bytes.

Files
/usr/lib/tenninfo/* /*

-Compiled tenninal capability database.

See Also
tenninfo(M), tenninfo(S), tenninfo(F), tid(C)

Notes
Use of the -p option is not recommended. The functionality may
change in future versions of XENIX.

May 16,1988

Page 1

TID (C)

TID (C)

Name
tid - Tenninfo decompiler.

Syntax
tid [term]
Description
tid decompiles the description of tenninal term originally compiled by
tic (C). If term is not specified, the setting of the TERM environment
variable is used.

Files
/usrnib/terminfo/*/*

- Compiled terminal descriptions.

See Also
tic(C), tenninfo(F), terminfo(M).

Notes
The output of tid is not acceptable input to tic.

May 16, 1988

Page 1

TOUCH (C)

TOUCH (C)

Name
touch - Updates access and modification times of a file.
Syntax
touch [-amc] [mmddhhmm[yy] ] files
Description
touch causes the access and modification times of each argument to
be updated. If no time is specified (see date(C» the current time is
used. The first mm refers to the month, dd refers to the day, hh refers
to the hour, the second mm refers to the minute, and yy refers to the
year. The -a and -m options cause touch to update only the access or
modification times respectively (default is -am). The -c option
silently prevents touch from creating the file if it did not previously
exist.

The return code from 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).
See Also
date(C), utime(S)

May 16, 1988

Page 1

TPUT(C)

TPUT (C)

Name
tput - Queries the terminfo database.
Syntax
tput [ -Ttype ] attribute
Description
The command tput uses the term info database to make the values of
terminal-dependent attributes available to the shell. tput outputs a
string if the terminal attribute is of type string, or an integer if the
attribute is of type integer. If the attribute is of type Boolean, tput
simply sets the exit code (0 for true if the terminal has the capability,
1 for false if it does not) and produces no output.
The -T flag indicates the type of the terminal. Normally this option is
unnecessary, as the default is taken from the environment variable
TERM.

attribute is the terminal capability name from the term info database.
Examples
tput clear

Echo clear-screen sequence for the current terminal.

tput cols

Print the number of columns for the current terminal.

tput -T450 cols

Print the number of columns for the 450 terminal.

bold='tput smso'
offbold='tput rmso'

Set the shell variables "bold" to begin standout mode sequence and "offbold" to end
standout mode sequence for the current terminal. This might be followed by a prompt, such
as:
echo "${bold}Name: ${offbold}\c"

May 16, 1988

Page 1

TPUT(C)

lrUl(C)

tput he

Set exit code to indicate if the current tenninal
is a hardcopy tenninal.

Files

lusrllib/tenninfoJ*1* -Compiled tenninal capability database.
See Also

tenninfo(M), tenninfo(S), tic(C), stty(C)
Notes

If the attribute is of type boolean, a value of 0 is returned for TRUE
and a value of 1 for FALSE.
If the attribute is of type string or integer, a value of 0 is returned upon
successful completion. Any other value returned indicates an error.
For example, the specification of a bad attribute (any capability name
that is not found in the tenninfo database) produces an error.

May 16,1988

Page 2

TR (C)

TR (C)

Name
tr - Translates characters.
Syntax
tr [ -cds] [string1 [string2 ] ]
Description
tr copies the standard input to the standard output with substitution or
deletion of selected characters. Input characters found in string] are
mapped into the corresponding characters of string2. Any combination of the options -cds may be used:
-c

Complements the set of characters in string] with respect to
the universe of characters whose ASCII codes are 001
through 377 octal

-d

Deletes all input characters in string]

-s

Squeezes all strings of repeated output characters that are in
string2 to single characters

The following abbreviation conventions may be used to introduce
ranges of characters or repeated characters into the strings:
[a-z]

Stands for the string of characters whose ASCII codes run
from character a to character z, inclusive.

[a*n]

Stands for n repetitions of a. If the first digit of n is 0, n is
considered octal; otherwise, n is taken to be decimal. A
zero or missing n is taken to be huge; this facility is useful
for padding string2 .

The escape character \ may be used as in the shell to remove special
meaning from any character in a string. In addition, \ followed by 1, 2,
or 3 octal digits, stands for the character whose ASCII code is given by
those digits.

May 16, 1988

Page 1

TR (C)

TR (C)

The following example creates a list of all the words in filel, one per
line infile2, where 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 ASCII code for newline:
tr -cs "[A-Z][a-z]" "[\012*]" file2

See Also
ed(C), sh(C), ascii(M)

Notes
Won't handle ASCII NUL in stringl or string2; always deletes NUL
from input.

May 16, 1988

Page 2

TRANSLATE (C)

TRANSLATE (C)

Name
translate - translates files from one format to another
Syntax
translate option [ infile ] [ outfile ]
Description
translate translates files according to the options specified. Translation is done according to the options defined below.
format
is assumed to be a file
in the directory
/usr/lib/mapchan/translate if a full pathname is not provided.
translate uses standard input and standard output unless otherwise
specified via the optional filename arguments.

Options
-ea

From EBCDIC to ASCII.

-ae

From ASCII to EBCDIC.

-feformat

From a user defined format to EBCDIC format.

-fa format

From a user defined format to ASCII format.

-efformat

From EBCDIC format to a user defined format.

-afformat

From ASCII format to a user defined format.

-bm

From binary/object code to mailable ASCn
uuencode format.

-mb

From mailable ASCII uuencode format to
original binary.

Files
/usr/lib/mapchan/translate/*
See Also
uuencode(C), dd(C), mapchan(M), sysadmsh(ADM)

May 16,1988

Page 1

TRANSLATE (C)

TRANSLATE (C)

Notes

The -bm and -mb options are, for example, used to translate executable object code format to ASCn for transfer across communications
networks.
The syntax for the user defined format file is the same as the syntax
for the mapping files for mapchan(M) and trchan.
Use dd to convert character and file formats (especially tapes) to the
format specified. Example:
dd if=/dev/rmtO of=outfile ibs=SOO cbs=SO conv=ascii,lcase
This command reads an EBCDIC tape, blocked ten SO-byte EBCDIC
card images per record, into the ASCII file outfile. For more information on conversion options, refer to dd(C) in the XENIX Reference.

May 16, 1988

Page 2

TRUE (C)

TRUE (C)

Name

true - Returns with a zero exit value.
Syntax
true
Description
true does nothing except return with a zero exit value. false (C), true's
counterpart, does nothing except return with a nonzero exit value.
true is typically used in shell procedures such as:

while true
do
command
done
See Also

sh(C), false (C)
Diagnostics
true has exit status zero.

May 16,1988

Page 1

TSET(C)

TSET(C)

Name
tset - Sets terminal modes.
Syntax
tset [ - ] [ -hrsuIQS ] [ -e[c] ] [ -E[c] ] [ -k[c] ]
[ -m [ident] [test baudrate ]:type ] [ type]
Description
tset causes terminal dependent processing such as setting erase and
kill characters, setting or resetting delays, and the like. It is driven by
the /etc/ttytype and /etc/termcap files.

The type of terminal is specified by the type argument. The type may
be any type given in /etc/termcap. If type is not specified, the terminal type is the value of the environment variable TERM, unless the -h
flag is set or any -m argument is given. In this case, the type is read
from /etc/ttytype (the port name to terminal type database). The port
name is determined by a ttyname (S) call on the diagnostic output. If
the port is not found in /etc/ttytype the terminal type is set to
unknown.
Ports for which the terminal type is indeterminate are identified in
/etc/ttytype as dialup, plugboard, etc. The user can specify how these
identifiers should map to an actual terminal type. The mapping flag,
-m, is followed by the appropriate identifier (a four-character or
longer substring is adequate), an optional test for baud rate, and the
terminal type to be used if the mapping conditions are satisfied. If
more than one mapping is specified, the first correct mapping prevails.
A missing identifier matches all identifiers. Baud rates are specified
as with stty(C), and are compared with the speed of the diagnostic output. The test may be any combination 'of: >, =, <, @, and !. (Note: @
is a synonym for = and ! inverts the sense of the test. Remember that
escape characters are meaningful to the shell.)
If the type as determined above begins with a question mark, the user
is asked if he really wants that type. A null response means to use that

type; otherwise, another type can be entered which will be used
instead. (The question mark must be escaped to prevent filename
expansion by the shell.)
tset is most useful when included in the .Iogin (for csh(C» or .profile
(for sh(C») file executed automatically at login, with -m mapping used
to specify the terminal type you most frequently dial in on.

May 16, 1988

Page 1

TSET(C)

TSET(C)

Options
-e This option sets the erase character to the named character, c, with
c defaulting to Ctrl-H.

-E This flag is identical to -e except that it only operates on terminals
that can backspace.
-k This option sets the kill character to the named character, c, with c
defaulting to Ctrl-U. In all of these flags, "AX" where X is any
character is equivalent to Ctrl-X .

-

This option prints the terminal type on the standard output; this can
be used to get the terminal type by entering:
set termtype = 'tset -'
If no other options are given, tset operates in "fast mode" and only
outputs the terminal type, bypassing all other processing.

-b Forces tset to search /etc/ttytype for information and to overlook
the environment variable, TERM.
-s This option outputs "setenv" commands (if your default shell is
csh(C) or "export" and assignment commands (if your default
shell is sh(C»;

For the -s option with the Bourne shell, enter:
tset -s ... > /tmp/tset$ $
/tmp/tset$ $
rm /tmp/tset$ $

-s

This option only outputs the strings to be placed in the environment variables.
If you are using csh, enter:
set noglob
set term=('tset -S .... ')
setenv TERM $term[1]
setenv TERMCAP "$term[2]"
unset term
unset noglob

-r This option displays the terminal type on the diagnostic output.

-Q This option suppresses displaying the "Erase set to" and "Kill set
to" messages.

-I This option suppresses outputting the terminal initialization
strings.

May 16, 1988

Page 2

TSET(C)

TSET (C)

-m
This option is the mapping flag. It is used to specify the terminal
type you most frequently use. It is followed by the appropriate
identifier for your terminal, listed in /etc/ttytype . When you log
on the system, it sets the terminal type to ident unless you specify
otherwise.

Examples
tset gt42
Sets the terminal type to gt42.
tset -mdialup\>300:adm3a -mdialup:dw2 -Qr -e#

If the entry in /etc/ttytype corresponding to the login port is
"dialup", and the port speed is greater than 300 baud, set the terminal type to adm3a. If the /etc/ttytype entry is "dialup" and the
port speed is less than or equal to 300 baud, set the terminal type to
dw2. Set the erase character to "#", and display the terminal type
(but not the erase character) on standard error.
tset -m dial:ti733 -m plug:\?hp2621 -m unknown:\? -e -k"U
If the /etc/ttytype entry begins with "dial", the terminal type
becomes ti733. If the entry begins with "plug", tset prompts with:
TERM = (hp2621)
Enter the correct terminal type if it is different than that shown. If
the entry is "unknown", tset prompts with:
TERM = (unknown)
In any case erase is set to the terminal's backspace character, and
the terminal type is displayed on standard error and the kill character is set to Ctrl-U.

Files
/etc/ttytype

Port name to terminal type map database

/etc/termcap

Terminal capability database

:May 16, 1988

Page 3

TSET(C)

TSET(C)

See Also
tty(M), tenncap(M), stty(C)

Credit
This utility was developed at the University of California at Berkeley
and is used with pennission.

May 16,1988

Page 4

1TY(C)

1TY(C)

Name
tty - Gets the tenninal' s name.

Syntax
tty [ -s]

Description
The tty command prints the pathname of the user's tenninal on the
standard output. The -s option inhibits printing, allowing you to test
just the exit code.

Exit Codes

o if the standard input is a tenninal,

1 otherwise.

Diagnostics
not a tty

May 16, 1988

If the standard input is not a tenninal and -s is not
specified

Page 1

UMASK(C)

UMASK(C)

Name
umask - Sets file-creation mode mask.
Syntax
umask [000]
Description
The user file-creation mode mask is set to 000. The three octal digits
refer to read/write/execute permissions for owner, group, and others,
respectively. Only the low-order 9 bits of cmask and the file mode
creation mask are used. The value of each specified digit is "subtracted" from the corresponding "digit" specified by the system for
the creation of any file (see umask(S) or createS»~. This is actually a
binary masking operation, and thus the name "umask". In general,
binary ones remove a given permission, and zeros have no effect at
all. For example, umask 022 removes group and others write permission (files normally created with mode 777 become mode 755 ; files
created with mode 666 become mode 644).

If 000 is omitted, the current value of the mask is printed.
umask is recognized and executed by the shell. By default, login
shells have a umask of 022.
See Also
chmod(C), sh(C), chmod(S), createS), umask(S)

May 16, 1988

Page 1

UNAME(C)

UNAME(C)

Name
uname - Prints the name of the current XENIX system.
Syntax
uname [ -snrmvdupa ]
Description
uname prints the current system name of the XENIX system on the

standard output file. It is primarily used to determine which system
you are using. The options cause selected information returned by
uname(S) to be printed:
-s

Prints the system name (default).

-n

Prints the nodename (the node name may be a name that the system is known by to a communications network).

-r

Prints the operating system release.

-m

Manufacturer prints original supplier (number) of XENIX system.

-v

Prints the operating system version.

-d

Distributor prints OEM (number) for the system.

-u

Prints user serial number.

-p

Prints processor of the machine.

-a

Prints all the above information.

See Also
uname(S)

May 16,1988

Page 1

UNIQ (C)

UNIQ (C)

Name
uniq - Reports repeated lines in a file.
Syntax
uniq [ -udc [ +n] [ -n ] ] [ input [ output] ]
Description
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. Input and output should
always be different. Note that repeated lines must be adjacent in order
to be found; see sort(C). If the -u flag is used, just the lines that are
not repeated in the original file are output. The -d option specifies
that one copy of just the repeated lines is to be written. The normal
mode output is the union of the -u and -d mode outputs.

The -c option supersedes -u and -d and generates an output report in
default style but with each line preceded by a count of the number of
times it occurred.
The n arguments specify skipping an initial portion of each line in the
comparison:
-n

The first n fields together with any blanks before each are
ignored. A field is defined as a string of nonspace, non tab
characters separated by tabs and spaces from its neighbors.

+n

The first n characters are ignored. Fields are skipped before
characters.

See Also
comm(C), sort(C)

May 16, 1988

Page 1

UNfrs (C)

UIVll

~ ~ \.....)

Name
units - Converts units.
Syntax
units
Description
units converts quantities expressed in various standard scales to their
equivalents in other scales. It works interactively in this fashion:

You have: inch
You want: em
* 2.540000e+OO
/3.937008e-01
A quantity is specified as a multiplicative combination of units
optionally preceded by a numeric multiplier. Powers are indicated by
suffixed positive integers, division is shown by the usual sign:
You have: 15 Ibs force/in2
You want: atm
* 1.02068ge+OO
/ 9.79729ge-01
units only does multiplicative scale changes; thus it can convert Kelvin to Rankine, but not Centigrade to Fahrenheit. Most familiar units,
abbreviations, and metric prefixes are recognized, as well as the following:

pi

Ratio of circumference to diameter

c

Speed of light

e

Charge on an electron

g

Acceleration of gravity

force

Same as g

mole
Avogadro's number
water
Pressure head per unit height of water

May 16, 1988

Page 1

UNITS (C)

UNITS (C)

au Astronomical unit

Pound is not recognized as a unit of mass; Ib is. Compound names are
run together, (e.g. Jightyear). British units that differ from their US
counterparts are prefixed with "br". For a complete list of units,
enter:
cat lusrllib/unittab
Files

lusr/lib/unittab

May 16, 1988

Page 2

UPTIME (e)

UPTIME (e)

Name
uptime - Displays infonnation about system activity.

Syntax
uptime
Description
uptime prints the current time of day, the length of time the system has
been up, and the number of users logged onto the system. On systems
that maintain the necessary data, load averages are also shown. Load
averages are the number of processes in the run queue averaged over
1, 5, and 15 minutes. All of this infonnation is also contained in the
first line of the wee) command.

See Also
wee)

May 16,1988

Page 1

USEMOUSE (C)

USEMOUSE (C)

Name

usemouse - Maps mouse input to keystrokes for use with non-mouse
based programs.
Syntax
usemouse [ -f conffile] [-t type] [-b horiz_sens] [-v vert_sens] [
-c cmd] [-b] parameters
Description

This utility allows you to use a mouse with any program that would
otherwise accept only keyboard input.
For example, you can use a mouse with vi(C) to move the cursor
around the screen and generate your most commonly used vi commands. The usemouse(C) command translates mouse input into
specific keystrokes required by a program. You can use any of several
predefined mouse keystroke sets (called maps) that correspond to different popular programs. You can also define your own maps with
keystrokes that match different mouse movements and mouse buttons.
Options

The options are:
-f conffile
The -f flag may be used to select an alternate configuration file.

The altenlate configuration file, conffile, should use the format of
letc/default/usemouse and be entered as an absolute pathname on
the command line. For example:
usemouse -f lu/daniel/mouseconf

is the correct form to specify an alternate configuration file. The-f
and -t flags are mutually exclusive.
-t type

The -t flag may be used to select a predefined configuration file.
type can be the name of any file in lusr/lib/mouse, such as vi,
rogue, or any others the system administrator chooses to place
there. These files are identical in format to letc/default/usemouse.
-b horiz_sens

Defines the horizontal sensitivity. Horizontal mouse movements
smaller than this threshold are ignored. Mouse movements that are
multiples of this value generate multiple strings. The sensitivity

May 16, 1988

Page 1

USEMOUSE (C)

USEMOUSE (C)

defaults to 5 units. The minimum value is 1 unit, and the maximum is 100 units. The lower the value, the more sensitive your
mouse is to motion. Note that setting a high value may cause your
mouse to behave as though it is not functioning, due to the large
motion required to generate a signal.
-v vert_sens
Defines the vertical sensitivity. Vertical mouse movements
smaller than this threshold are ignored. Mouse movements that are
multiples of this value generate multiple strings. The sensitivity
defaults to 5 units. The minimum value is 1 unit, and the maximum is 100 units. The lower the value, the more sensitive your
mouse is to motion. Note that setting a high value may cause your
mouse to behave as though it is not functioning, due to the large
motion required to generate a signal.
-ccmd
This option selects a command for usemouse to run. This defaults
to the shell specified in the SHELL environment variable. If
SHELL is unspecified, Ibin/sh is used. Note that the command
given with this flag can contain blank spaces if the entire command
is placed within double quotes. For example:

usemouse -c "vi letc/termcap"
is valid.
-b Supresses bell CO) for the duration of mouse usage. Useful with
vi(C).

parameters
These are name=value pairs indicating what ASCII string to insert
into the tty input stream, when the given event is received. Valid
parameters include:

rbu=string
rbd=string
mbu=string
mbd=string
Ibu=string
Ibd=string
rt=string
It=string
up=string
dn=string
ul=string
ur=string
dr=string

May 16, 1988

String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate
String to generate

on right button up
on right button down
on middle button up
on middle button down
on left button up
on left button down
on mouse right
on mouse left
on mouse up
on mouse down
on mouse up-left
on mouse up-right
on mouse down-left

Page 2

USEMOUSE (C)
dl=string
hsens=num
vsens=num
bells=yes/ no

USEMOUSE (C)

String to generate on mouse down-right
Sensitivity to horizontal motion
Sensitivity to vertical motion
Whether to remove "G characters

Parameters may be specified in any order. They may contain octal
escapes. They may be quoted with single or double quotes if they contain blank spaces. Any parameters may be omitted and their value, if
any, is taken from the configuration file.

The usemouse(C) Command
To start using the mouse with a text program, enter the command:

usemouse
This command sets the mouse for use with the default map, which is
found in fete/default/mouse. Alternate map files can be found in the
directory /usr/lib/mouse. You can create your own alternate map files
and place them in this directory or in your own custom map file directory. The default map file has the following values:
Mouse

Keystroke

Left Button
Middle Button
Right Button
Up
Down
Left
Right
Up and Left
Up and Right
Down and Left
Down and Right
Bells

vi top of file (1 G) command
vi delete character (x) command
vi bottom of file (G) command
Up Arrow Key
Down Arrow Key
Left Arrow Key
Right Arrow Key
not defined
not defined
not defined
not defined
no

Invoking the usemouse command without specifying any options
makes the mouse ready for use with a wide variety of programs or
applications. Invoking usemouse with no options causes the mouse to
use the default keystroke map. Invoking the mouse in this way creates
a new command shell. You can continue to use the mouse for the duration of the shell. To terminate usemouse, simply enter Ctrl-D.
You can also invoke usemouse for the duration of a specific command:

usemouse -e command
This puts you in the program specified by command using the mouse.
When you leave the program, mouse input is terminated.

May 16, 1988

Page 3

US.ft'MOUSE (C)

USEMOUSE (C)

Using the Mouse with Specific Programs
You can use any of several predefined maps that are set up specifically
for use with different programs. (These maps are found in
lusr/lib/mouse.) For example:

usemouse -t vi
This invokes the vi-specific map, which includes mapping the traditional h-j-k-l direction keys to the mouse movements. The terminal
bell is automatically silenced by the vi map entry bells=no. This is
done to prevent the bell being activated continuously when the user
generates a spurious command with the mouse. (There is also a -b
option that can be used on the usemouse command line to do the same
thing.)
You can combine a command with a selected map file by putting both
on the command line. For example:

usemouse -t vi -c vi filename
This invokes the vi map along with the command; when you quit out
of vi the mouse disengages.

Setting Up Abbreviated (Aliased) Mouse Commands
If you plan to use the mouse frequently, you can substitute short, easy
to use commands that will call up the longer command lines. This is
known as command aliasing. For more information on command aliasing, consult the section "Using Aliases" in the "C-Shell" chapter of
the XENIX User's Guide.

Specifying Map Keystrokes on the Command Line
You can also specify the characters to be generated by mouse motions
on the usemouse command line. You can specify button actions or
motion actions to supplement or replace a definition from a map file.
For example, assume you want to use the default usemouse file, but
you want to redefine the middle mouse button mbd (middle button
down) as the vi "i" (insert) instead of the "x" (delete character) command. The following command line does this:

usemouse -c vi mbd=i
The mouse operations are defined by a series of acronyms that are the
same as used in the actual map file:

May 16, 1988

Page 4

USEMOUSE (C)

USEMOUSE (C)

Parameter

Mouse Operation

Default

rbu
rbd
mbu
mbd
lbu
lbd
ul
ur
dr
dl
rt
lt
up
dn
hsens
vsens

right button up
right button down
middle button up
middle button down
left button up
left button down
mouse up-left
mouse up-right
mouse down-left
mouse down-right
mouse right
mouse left
mouse up
mouse down
horiz. sensitivity
vert. sensitivity

not used
10
not used
x
not used
G

\033 [A\033 [C
\033[A\033[D
\033 [B\033[C
\033 [B\033 [D
\033[C
\033[D
\033[A
\033[B
5
5

Creating Customized Maps
You can create your own personal map files for use with the mouse.
The easiest way to do this is to copy the default map in
letcldefault/usemouse and edit it. You can use quoted strings or the
octal sequences found in the ascii(M) page. The mouse
direction/button parameters are defined in the usemouse table above.
For example, after placing a customized file, mine, in your home
directory, you would invoke the following command to use it with the
program prog:
llsemouse -f mine -c prog
How usemouse Works
usemouse merges data from a mouse into the input stream of a tty. The
mouse data is translated to arrow keys or any other arbitrary ASCII
strings. Mouse movements up, down, left right, up-left, up-right,
down-left, and down-right, as well as individual up and down button
transitions, are programmable. This permits the mouse to be used
with programs that are not designed to accept mouse input.

By default,the usemouse utility gets value configurations from the file
Ietc! defaultl usemouse .
After running the utility, provided a mouse is available, the user will
be running a command with mouse motions and button events
translated to ASCII strings and merged into their tty input stream. By
default, the command is a shell.

May 16, 1988

Page 5

USEMOUSE (C)

USEMOUSE (C)

Files
/dev/mouse
/dev/mouse/bus [0-1]
/dev/mouse/vpix [0-1]
/dev/mouse/microsoft ser
/dev/mouse!logitech_Ser
/dev/mouse/mousesys_ser
/dev/mouse/ttyp[0-7]
/dev/mouse/ptyp [0-7]
/etc/default/usemouse
/usr/lib/event/devices
/usr/lib/event/ttys
/usr/lib/mouse/*

Directory for mouse-related special device files.
Bus mouse device files.
vpix-mouse device files.
Microsoft serial mouse device files.
Logitech serial mouse device files.
Mousesys serial mouse device files.
Special pseudo-tty files for mouse input.
Special pseudo-tty files for mouse input.
Default map file for mouse-generated characters.
File containing device information for mice.
File listing ttys eligible to use mice.
Alternate map files for mice.

See Also
mouse(HW)

May 16, 1988

Page 6

UUCP(C)

UUCP (C)

Name

uucp, uulog, uuname - UNIX-to-UNIX system copy
Syntax
uucp [ options] source-files destination-file
uulog [ options] -s system
uulog [ options] system
uulog [ options] -fsystem
uuname [ -I ] [ -c ]
Description
uucp

uucp copies files named by the sourcejile arguments to the
destination-file argument. A file name may be a path name on your
machine, or may have the form:

system-name !path-name
where system-name is taken from a list of system names that uucp
knows about. The system-name may also be a list of names such as
system-name!system-name! ... !system-name!path-name
in which case an attempt is made to send the file via the specified
route, to the destination. See Warnings and Notes below for restrictions. Care should be taken to ensure that intermediate nodes in the
route are willing to forward information (see Warnings below for restrictions).
The shell metacharacters ?, * and [ ... ] appearing in path-name will
be expanded on the appropriate system.
Path names may be one of:
(l)

a full path name;

(2)

a path name preceded by -user where user is a login name
on the specified system and is replaced by that user's login
directory;

(3)

a path name preceded by -Idestination where destination is
appended to lusrlspool/uucppublic; (NOTE: This destination will be treated as a file name unless more than one file is
being transferred by this request or the destination is already
a directory. To ensure that it is a directory, follow the destination with a '/'. For example -/dan/ as the destination will

June 30, 1988

Page 1

UUCP (C)

UUCP (C)

make the directory /usr/spool/uucppublic/dan if it does not
exist and put the requested file(s) in that directory).
(4)

anything else is prefixed by the current directory.

If the result is an erroneous path name for the remote system the copy
will fail. If the destination-file is a directory, the last part of the
source-file name is used.
uucp preserves execute permissions across the transmission and gives
0666 read and write permissions (see chmod(2)).

The following options are interpreted by uucp:

-c

Do not copy local file to the spool directory ror transfer to
the remote machine (default).

-c

Force the copy of local files to the spool directory for
transfer.

-d

Make all necessary directories for the file copy (default).

-f

Do not make intermediate directories for the file copy.

-ggrade

Grade is a single letter/number; lower ascii sequence
characters will cause the job to be transmitted earlier during a particular conversation.

-j

Output the job identification ASCII string on the standard
output. This job identification can be used by uustat to
obtain the status or terminate a job.

-m

Send mail to the requester when the copy is completed.

-nuser

Notify user on the remote system that a file was sent.

-r

Do not start the file transfer, just queue the job.

-sfile

Report status of the transfer to file. Note that the file must
be a full path name.

-xdebug level
- Produce debugging output on standard output. The
debug level is a number between and 9; higher numbers
give more detailed information.

°

uulog
uulog queries a log file of uucp or uuxqt transactions in a file
lusrlspool/uucp/.Log/uucicolsystem,
or

June 30, 1988

Page 2

UUCP (C)

UUCP (C)

/usr/spool/uucp/.Log/uuxqt/system.
The options cause uulog to print logging infonnation:
-ssys

Print infonnation about file transfer work involving system sys.

-fsystem

Does a "tail -f" of the file transfer log for system. (You
must press DELETE or BREAK to exit this function.)
Other options used in conjunction with the above:

-x

Look in the uuxqt log file for the given system, instead of
the uucico log file (default).

-number

Indicates that a "tail" command of number lines should
be executed.

uuname
uuname lists the names of systems known to uucp. The -c option
returns the names of systems known to cu. (The two lists are .the
same, unless your machine is using different Systems files for cu and
uucp. See the Sysfiles file.) The -I option returns the local system
name.

Files
/usr/spool/uucp
spool directories
/usr/spool/uucppublic/ *public directory for receiving and
sending (/usr/spool/uucppublic)
/usr/lib/uucp/*
other data and program files
See Also
mail(C), uustat(C), uux(C), uuxqt(C).
chmod(S) in the XENIX Programmer's Reference.
Warnings
The domain of remotely accessible files can (and for obvious security
reasons, usually should) be severely restricted. You will very likely
not be able to fetch files by path name; ask a responsible person on the
remote system to send them to you. For the same reasons you will
probably not be able to send files to arbitrary path names. As distributed, the remotely accessible files are those whose names begin
/usr/spool/uucppublic (equivalent to -I).

June 30, 1988

Page 3

UUCP (C)

UUCP (C)

All files received by uucp will be owned by uucp.
The -m option will only work sending files or receiving a single file.
Receiving multiple files specified by special shell characters ? * [ ... ]
will not activate the -m option.
The forwarding of files through other systems may not be compatible
with the previous version of uucp. If forwarding is used, all systems in
the route must have the same version of uucp.
Notes

Protected files and files that are in protected directories that are owned
by the requester can be sent by uucp. However, if the requester is
root, and the directory is not searchable by "other" or the file is not
readable by "other," the request will fail.

June 30, 1988

Page 4

UUENCODE (C)

UUENCODE (C)

Name
uuencode, uudecode - encode/decode a binary file for transmission via
mail

Syntax
uuencode [ source] remotedest I mail sysl!sys2!'.!decode
uudecode [ file]
Description
uuencode and uudecode are used to send a binary file via uucp (or
other) mail. This combination can be used over indirect mail links.
uuencode takes the named source file (default standard input) and produces an encoded version on the standard output. The encoding uses
only printing ASCII characters, and includes the mode of the file and
the remotedest for recreation on the remote system.
uudecode reads an encoded file, strips off any leading and trailing
lines added by mailers, and recreates the original file with the specified mode and name.

The intent is that all mail to the user "decode" should be filtered
through the uudecode program. This way the file is created automatically without human intervention. This is possible on the uucp network by either using sendmail or by making rmail be a link to mail
instead of mail . In each case, an alias must be created in a master file
to get the automatic invocation of uudecode.
If these facilities are not available, the file can be sent to a user on the
remote machine who can uudecode it manually.
The encode file has an ordinary text form and can be edited by any
text editor to change the mode or remote name.

See Also
uucp(C), uux(ADM), mail(l)

Restrictions
The file is expanded by 35% (3 bytes become 4 plus control information) causing it to take longer to transmit.

May 16, 1988

Page 1

UUENCODE (C)

UUENCODE (C)

The user on the remote system who is invoking uudecode (often uucp)
must have write permission on the specified file.

May 16, 1988

Page 2

UUSTAT(C)

UUSTAT(C)
Name
uustat - uucp status inquiry and job control
Syntax
uustat
uustat
uustat
uustat
uustat
uustat
uustat

[-a]
[-m]
[-p]
[-q]
[ -kjobid ]
[ -r jobid ]
[ -s system] [ -u user]

Description
uustat will display the status of, or cancel, previously specified uucp
commands, or provide general status on uucp connections to other systems. Only one of the following options can be specified with uustat
per command execution:
-a

-m
-p
-q

Output all jobs in queue.
Report the status of accessibility of all machines.
Execute a "ps -flp" for all the process-ids that are in the
lock files.
List the jobs queued for each machine. If a status file
exists for the machine, its date, time and status information are reported. In addition, if a number appears in 0
next to the number of C or X files, it is the age in days of
the oldest C./X. file for that system. The Retry field
represents the number of hours until the next possible call.
The Count is the number of failure attempts. NOTE: for
systems with a moderate number of outstanding jobs, this
could take 30 seconds or more of real-time to execute. As
an example of the output produced by the -q option:
eagle
mh3bs3

3C
2C

04/07-11:07NO DEVICES AVAILABLE
07/07-10:42SUCCESSFUL

The above output tells how many command files are waiting for each
system. Each command file may have zero or more files to be sent
(zero means to call the system and see if work is to be done). The date
and time refer to the previous interaction with the system followed by
the status of the interaction.
-kjobid
Kill the uucp request whose job identification is jobid.
The killed uucp request must belong to the person issuing
the uustat command unless one is the super-user.
-rjobid
Rejuvenate jobid. The files associated with jobid are
touched so that their modification time is set to the
current time. This prevents the cleanup daemon from

May 16, 1988

Page 1

UUSTAT(C)

UUSTAT(C)

deleting the job until the jobs modification time reaches
the limit imposed by the daemon.
Either or both of the following options can be specified with uustat:
-ssys

Report the status of all uucp requests for remote system

-uuser

Report the status of all uucp requests issued by user.

sys.

Output for both the -s and -u options has the following format:
eaglenOOOO
eagleNlbd7
eagleC 1bd8

4/07-11:01:03(POLL)
4/07-11:07 Seagledan522 /usr/dan/A
4/07 -11 :07 Seagledan59 D .3b2a12ce4924
4/07 -11 :07 Seagledanrmail mike
With the above two options, the first field is the jobid of the job. This
is followed by the date/time. The next field is either an'S' or 'R'
depending on whether the job is to send or request a file. This is followed by the user-id of the user who queued the job. The next field
contains the size of the file, or in the case of a remote execution (
rmail - the command used for remote mail), the name of the command.
When the size appears in this field, the file name is also given. This
can either be the name given by the user or an internal name (e.g.,
D.3b2alce4924) that is created for data files associated with remote
executions (rmail in this example).
When no options are given, uustat outputs the status of all uucp
requests issued by the current user.

Files
/usr/spool/uucp/*

spool directories

See Also
uucp(C).

May 16, 1988

Page 2

UUSUB (C)

UUSUB (C)
Name

uusub - Monitor uucp network.
Syntax

uusub [options]
Description
uusub defines a uucp subnetwork and monitors the connection and
traffic among the members of the subnetwork. The following options
are available:
-asys
-dsys

-I
-r
-f
-uhr
-csys

Add sys to the subnetwork.
Delete sys from the subnetwork.
Report the statistics on connections.
Report the statistics on traffic amount.
Flush the connection statistics.
Gather the traffic statistics over the past hr hours.
Exercise the connection to the system sys. If sys is specified
as all, then exercise the connection to all the systems in the
subnetwork.

The connections report format is:
sys #call #ok time #dev #login #nack #other
where sys is the remote system name, #call is the number of times the
local system tries to call sys since the last flush was done, #ok is the
number of successful connections, time is the the latest successful
connect time, #dev is the number of unsuccessful connections because
of no available device (e.g. ACU), #login is the number of unsuccessful connections because of login failure, #nack is the number of
unsuccessful connections because of no response (e.g., line busy, system down), and #other is the number of unsuccessful connections
because of other reasons.
The traffic statistics format is:
sfile sbyte rfile rbyte
where sfile is the number of files sent and sbyte is the number of bytes
sent over the period of time indicated in the latest uusub command
with the -uhr option. Similarly, rfile and rbyte are the numbers of
files and bytes received.

May 16, 1988

Page 1

UUSUB (C)

UUSUB (C)

The command:
uusub -c all -u 24

is typically started by cron(C) once a day.

Files
/usr/spool/uucp/SYSLOG
system log file
/usr/lib/uucp/L_sub
connection statistics
/usr/lib/uucp/R_sub
traffic statistics

See Also
uucp(C), uustat(C).

May 16, 1988

Page 2

UUTO (C)

UUTO (C)

Name
uuto, uupick - public UNIX-to-UNIX system file copy
Syntax
uuto [ options] source-files destination
uupick [ -s system]

Description
uuto sends sourcejiles to destination. uuto uses the uucp(C) facility
to send files, while it allows the local system to control the file access.
A source-file name is a path name on your machine. Destination has
the form:
system! user

where system is taken from a list of system names that uucp knows
about (see uuname). User is the login name of someone on the specified system.
Two options are available:
-p

-m

Copy the source file into the spool directory before transmission.
Send mail to the sender when the copy is complete.

The files (or sub-trees if directories are specified) are sent to PUBDIR
on system, where PUBDIR is a public directory defined in the uucp
source. By default this directory is /usr/spool/uucppublic.
Specifically the files are sent to
PUBDIR/receive/user/mysystem/files.

The destined recipient is notified by mail (1) of the arrival of files.
uupick accepts or rejects the files transmitted to the user. Specifically,
uupick searches PUBDIR for files destined for the user. For each entry
(file or directory) found, the following message is printed on the standard output:
from system: [file file-name] [dir dirname] ?
uupick then reads a line from the standard input to determine the
disposition of the file:



Go on to next entry.

d

Delete the entry.

June 30, 1988

Page 1

UUTO (C)

UUTO (C)

m [dir ]

Move the entry to named directory dir. If dir is not
specified as a complete path name (in which
$HOME is legitimate), a destination relative to the
current directory is assumed. If no destination is
given, the default is the current directory.

a [ dir ]

Same as m except moving all the files sent from
system.

p

Print the content of the file.

q

Stop.

EOT (control-d)

Same as q.

!command

Escape to the shell to do command.

*

Print a command summary.

uupick invoked with the -ssystem option will only search the PUBDIR
for files sent from system.

Files
PUBDIR /usr/spool/uucppublic

public directory

See Also
mail(C), uucp(C), uustat(C), uux(C), uuc1ean(ADM).
Warnings

In order to send files that begin with a dot (e.g., .profile) the files must
by qualified with a dot. For example: .profile, .prof*, .profil? are
correct; whereas *prof*, ?profile are incorrect.

June 30, i 988

Page 2

UUX(C)

UUX(C)

Name

uux - UNIX-to-UNIX system command execution
Syntax
UUX [

options] command-string

Description

uux will gather zero or more files from various systems, execute a
command on a specified system and then send standard output to a file
on a specified system.

NOTE: For security reasons, most installations limit the list of commands executable on behalf of an incoming request from uux, permitting only the receipt of mail (see mail (3». (Remote execution permissions are defined in /usr/lib/uucp/Permissions.)
The command-string is made up of one or more arguments that look
like a shell command line, except that the command and file names
may be prefixed by system-name!. A null system-name is interpreted
as the local system.
File names may be one of
(1)

a full path name;

(2)

a path name preceded by ~xxx where xxx is a login name on
the specified system and is replaced by that user's login
directory;

(3)

anything else is prefixed by the current directory.

As an example, the command
uux "!diffusg!/usr/dan/file1 pwba!/a4/dan/file2 > !-/dan/file.diff"
will get the filel and file2 files from the "usg" and "pwba" machines,
execute a diff(l) command and put the results in file.diff in the local
PUBDIR/dan/ directory.
Any special shell characters such as <>; I should be quoted either by
quoting the entire command-string, or quoting the special characters
as individual arguments.
uux will attempt to get all files to the execution system. For files that
are output files, the file name must be escaped using parentheses. For
example, the command

June 30, 1988

Page 1

UUX(C)

UUX(C)

uux a!cut -fl b!/usr/file \(cl/usr/file\)
gets /usr/file from system "b" and sends it to system "a", performs a cut
command on that file and sends the result of the cut command to system "c".
uux will notify you if the requested command on the remote system
was disallowed. This notification can be turned off by the -0 option.
The response comes by remote mail from the remote machine.

The following options are interpreted by uux:
The standard input to uux is made the standard input to
the command-string.
-aname

Use name as the user identification replacing the initiator
user-id. (Notification will be returned to the user.)

-b

Return whatever standard input was provided to the uux
command if the exit status is non-zero.

-c

Do not copy local file to the spool directory for transfer to
the remote machine (default).

-c

Force the copy of local files to the spool directory for
transfer.

-ggrade

Grade is a single letter/number; lower ASCII sequence
characters will cause the job to be transmitted earlier during a particular conversation.

-j

Output the jobid ASCII string on the standard output
which is the job identification. This job identification can
be used by uustat to obtain the status or tenninate a job.

-0

Do not notify the user if the command fails.

-p

Same as -: The standard input to uux is made the standard
input to the command-string.

-r

Do not start the file transfer, just queue the job.

-sfile

Report status of the transfer inftle.

-xdebug level
- Produce debugging output on the standard output. The
debug level is a number between and 9; higher numbers
give more detailed information.

°

-z

June 30, 1988

Send success notification to the user.

Page 2

UUX(C)

UUX(C)

Files

/usr/spool/uucp/*
/usr/lib/uucp/Pennissions
/usr/lib/uucp/*

spool directories
remote execution pennissions
other data and programs

See Also

mail(C), uucp(C), uustat(C).

Warnings
Only the first command of a shell pipeline may have a system-name !.
All other commands are executed on the system of the first command.
The use of the shell metacharacter * will probably not do what you
want it to do. The shell tokens « and » are not implemented.
The execution of commands on remote systems takes place in an execution directory known to the uucp system. All files required for the
execution will be put into this directory unless they already reside on
that machine. Therefore, the simple file name (without path or
machine reference) must be unique within the uux request. The following command will NOT work:
uux "a!diffb!/usr/dan/xyz c!/usr/dan/xyz > !xyz.diff'
but the command
uux "a!diff a!/usr/dan/xyz c!/usr/dan/xyz > !xyz.diff'
will work. (If diff is a pennitted command.)
Notes

Protected files and files that are in protected directories that are owned
by the requester can be sent in commands using uux. However, if the
requester is root, and the directory is not searchable by "other," the
request will fail.

June 30, 1988

Page 3

VI (C)

VI (C)

Name
vi, view, vedit - Invokes a screen-oriented display editor.
Syntax
vi [ -option ... ] [ command ... ] [filename ... ]
view [ -option ... ] [ command ... ] [filename ... ]
vedit [ -option ... ] [ command ... ] [ filename ... ]
Description
vi offers a powerful set of text editing operations based on a set of
mnemonic commands. Most commands are single keystrokes that
perform simple editing functions. vi displays a full screen "window"
into the file you are editing. The contents of this window can be
changed quickly and easily within vi. While editing, visual feedback
is provided (the name vi itself is short for' 'visual" ).

The view command is the same as vi except that the read-only option
(-R) is set automatically. The file cannot be changed with view.
The vedit command is the same as vi except for differences in the
option settings. vedit uses novice mode, turns off the magic option,
sets the option report=l calls the showmode and sets redraw.
The showmode option informs the vedit user, in a message in the
lower right hand corner of the screen, which mode is being used. For
instance after the ESC-i command is used, the message reads
"INSERT MODE".
Note that you can not set the novice option from within vi or ex. If
you want to use the novice option you must use the vedit utility. (It is
possible to set the no novice option from within vedit.)
vi and the line editor ex are one and the same editor: the names vi and
ex identify a particular user interface rather than any underlying functional difference. The differences in user interface, however, are quite
striking. ex is a powerful line-oriented editor, similar to the editor ed.
However, in both ex and ed, visual updating of the terminal screen is
limited, and commands are entered on a command line. vi, on the
other hand, is a screen-oriented editor designed so that what you see
on the screen corresponds exactly and immediately to the contents of
the file you are editing. In the following discussion, vi commands and
options are printed in boldface type.

May 16, 1988

Page 1

VI (C)

VI(C)

Options available on the vi command line include:
-t

Equivalent to an initial tag command; edits the file containing the tag and positions the editor at its definition.

-r

Used in recovering after an editor or system crash, retrieving the last saved version of the named file. If no file is
specified, this option prints a list of saved files.

-I

Specific to editing LISP, this option sets the showmatch
and lisp options.

-wn

Sets the default window size to n. Useful on dialups to
start in small windows.

-R

Sets a read-only option so that files can be viewed but not
edited.

The Editing Buffer
vi performs no editing operations on the file that you name during
invocation. Instead, it works on a copy of the file in an "editing
buffer."

When you invoke vi with a single filename argument, the named file is
copied to a temporary editing buffer. The editor remembers the name
of the file specified at invocation, so that it can later copy the editing
buffer back to the named file. The contents of the named file are not
affected until the changes are copied back to the original file.
Modes of Operation

Within vi there are three distinct modes of operation:
Command Mode

Within command mode, signals from the
keyboard are interpreted as editing commands.

Insert Mode

Insert mode can be entered by typing any
of the vi insert, append, open, substitute,
change, or replace commands. Once in
insert mode, letters typed at the keyboard are inserted into the editing buffer.

ex Escape Mode

The vi and ex editors are one and the
same editor differing mainly in their user
interface. In vi , commands are usually
single keystrokes. In ex, commands· are
lines of text terminated by a RETURN.
vi has a special "escape" command that

May 16, 1988

Page 2

VI (C)

VI (C)

gives access to many of these lineoriented ex commands. To use the ex
escape mode, type a colon (:). The colon
is echoed on the status line as a prompt
for the ex command. An executing command can be aborted by pressing INTERRUPT. Most file manipulation commands are executed in ex escape mode
(for example, the commands to read in a
file and to write out the editing buffer to
a file).
Special Keys

There are several special keys in vi. The following keys are used to
edit, delimit, or abort commands and command lines.
ESC

Used to return to vi command mode or to cancel partially formed commands.

RETURN

Terminates ex commands when in ex escape mode.
Also used to start a newline when in insert mode.

INTERRUPT

Often the same as the DEL or RUB OUT key on many
terminals. Generates an interrupt, telling the editor to
stop what it is doing. Used to abort any command that
is executing.

/

Used to specify a string to be searched for. The slash
appears on the status line as a prompt for a search
string. The question mark (?) works exactly like the
slash key, except that it is used to search backward in a
file instead of forward.
The colon is a prompt for an ex command. You can
then type in any ex command, followed by an ESC or
RETURN, and the given ex command is executed.

The following characters are special in insert mode:
BKSP

Backs up the cursor one character on the current line. The
last character typed before the BKSP is removed from the
input buffer, but remains displayed on the screen.

Ctrl-U

Moves the cursor back to the first character of the insertion and restarts insertion.

Ctrl-V

Removes the special significance of the next typed character. Use Ctrl-V to insert control characters. Linefeed
and Ctrl-J cannot be inserted in the text except as newline
characters. Ctrl-Q and Ctrl-S are trapped by the operating

May 16, 1988

Page 3

VI (C)

VI (C)

system before they are interpreted by vi, so they too cannot be inserted as text.
Ctrl-W

Moves the cursor back to the first character of the last
inserted word.

Ctrl-T

During an insertion, with the autoindent option set and at
the beginning of the current line, entering this character
will insert shiftwidth whitespace.

Ctrl-@

If entered as the first character of an insertion, it is
replaced with the last text inserted, and the insertion terminates. Only 128 characters are saved from the last
insertion. If more than 128 characters were inserted, then
this command inserts no characters. A Ctrl-@ cannot be
part of a file, even if quoted.

Starting and Exiting vi

To enter vi, enter:
vi

Edits empty editing buffer

vi file

Edits named file

vi + 123 file

Goes to line 123

vi +45 file

Goes to line 45

vi +/word file

Finds first occurrence of ((word"

vi +/tty file

Finds first occurrence of ((tty"

There are several ways to exit the editor:
ZZ

The editing buffer is written to the file only if any changes were
made.

:x

The editing buffer is written to the file only if any changes were
made.

:q!

Cancels an editing session. The exclamation mark (!) tells vi to
quit unconditionally. In this case, the editing buffer is not written out.

vi Commands
vi is a visual editor with a window on the file. What you see on the
screen is vi's notion of what the file contains. Commands do not
cause any change to the screen until the complete command is

May 16, 1988

Page 4

VI (C)

VI (C)

entered. Most commands may take a preceding count that specifies
repetition of the command. This count parameter is not given in the
following command descriptions, but is implied unless overridden by
some other prefix argument. When vi gets an improperly formatted
command, it rings a bell.
Cursor Movement

The cursor movement keys allow you to move your cursor around in a
file. Note in particular the direction keys (if available on your terminal), the H, J, K, and L cursor keys, and SPACEBAR, BKSP, Ctrl-N, and
Ctrl-P. These three sets of keys perform identical functions.
Forward Space -I, SPACEBAR, or right direction key

Syntax:

1
SPACEBAR
right direction key

Function:
Moves the cursor forward one character. If a count is given, move
forward count characters. You cannot move past the end of the
line.
Backspace - h, BKSP, or left direction key

Syntax:

h
BKSP
left direction key

Function:

Moves cursor backward one character. If a count is given,
moves backward count characters. Note that you cannot
move past the beginning of the current line.

Next Line - +, RETURN, j, Ctrl-N, and LF

Syntax:

+
RETURN

Function:

Moves the cursor down to the beginning of the next line.

Syntax:

j
Ctrl-N
LF
down direction key

Function:

May 16, 1988

Moves the cursor down one line, remaining in the same
column. Note the difference between these commands
and the preceding set of next line commands which move
to the beginning of the next line.

Page 5

VI (C)

VI (C)

Previous Line - k, Ctrl-P, and up direction key
Syntax:

k
Ctrl-P
up direction key

Function:

Moves the cursor up one line, remammg in the same
column. If a count is given, the cursor is moved count
lines.

Syntax:
Function:

Moves the cursor up to the beginning of the previous line.
If a count is given, the cursor is moved up a count lines.

Beginning of Line - 0 and "
Syntax:

o

Function:

Moves the cursor to the beginning of the current line.
Note that 0 always moves the cursor to the first character
of the current line. The caret (") works somewhat
differently: it moves to the first character on a line that is
not a tab or a space. This is useful when editing files that
have a great deal of indentation, such as program texts.

End of Line - $
Syntax:

$

Function:

Moves the cursor to the end of the current line. Note that
the cursor resides on top of the last character on the line.
If a count is given, the cursor is moved forward count-1
lines to the end of the line.

Goto Line - G
Syntax:

[linenumber]G

Function:

Moves the cursor to the beginning of the line specified by
linen umber . If no linen umber is given, the cursor moves
to the beginning of the last line in the file. To find the line
number of the current line, use Ctrl-G.

Column

-I

Syntax:

[column]1

Function:

Moves the cursor to the column in the current line given
by column. If no column is given, the cursor is moved to
the first column in the current line.

May 16, 1988

Page 6

VI (C)

VI (C)

Word Forward - wand W

Syntax:

w
W

Function:

Moves the cursor forward to the beginning of the next
word. The lowercase w command searches for a word
defined as a string of alphanumeric characters separated
by punctuation or whitespace (i.e., tab, newline, or space
characters). The uppercase W command searches for a
word defined as a string of nonwhitespace characters.

Back Word - band B

Syntax:

b
B

Function:

Moves the cursor backward to the beginning of a word.
The lowercase b command searches backward for a word
defined as a string of alphanumeric characters separated
by punctuation or whitespace (i.e., tab, newline, or space
characters). The uppercase B command searches for a
word defined as a string of non-whitespace characters. If
the cursor is already within a word, it moves backward to
the beginning of that word.

End - e and E

Syntax:

e
E

Function:

Moves the cursor to the end of a word. The lowercase e
command moves the cursor to the last character of a word,
where a word is defined as a string of alphanumeric characters separated by punctuation or whitespace (i.e., tab,
newline, or space characters). The uppercase E moves the
cursor to the last character of a word where a word is
defined as a string of nonwhitespace characters. If the
cursor is already within a word, it moves to the end of that
word.

Sentence - (and)

Syntax:
Function:

May 16, 1988

Moves the cursor to the beginning (left parenthesis) or
end of a sentence (right parenthesis). A sentence is
defined as a sequence of characters ending with a period
(.), question mark (?), or exclamation mark (!), followed
by either two spaces or a newline. A sentence begins on
the first nonwhitespace character following a preceding

Page 7

VI(C)

VI(C)

sentence. Sentences are also delimited by paragraph and
section delimiters. See below.
Paragraph - { and}

Syntax:

}
{

Function:

Moves the cursor to the beginning ({) or end (}) of a paragraph. A paragraph is defined with the paragraphs
option. By default, paragraphs are delimited by the nroff
macros ".IP", ".LP", ".P", ".QP", and ".bp". Paragraphs also begin after empty lines.

Section - [[ and ]]

Syntax:

]]
[[

Function:

Moves the cursor to the beginning ([D or end (]l) of a section. A section is defined with the sections option. By
default, sections are delimited by the nroff macros ".NH"
and" .SH". Sections also start at formfeeds (Ctrl-L) and
at lines beginning with a brace ({).

Match Delimiter - %

Syntax:

%

Function:

Moves the cursor to a matching delimiter, where a delimiter is a parenthesis, a bracket, or a brace. This is useful
when matching pairs of nested parentheses, brackets, and
braces.

Home-H

Syntax:

[offset]H

Function:

Moves the cursor to the upper left comer of the screen.
Use this command to quickly move to the top of the
screen. If an offset is given, the cursor is homed offset-l
number of lines from the top of the screen. Note that the
command "dH" deletes all lines from the current line to
the top line shown on the screen.

May 16, 1988

Page 8

VI(C)

VI(C)

Middle Screen - M

Syntax:

M

Function:

Moves the cursor to the beginning of the screen's middle
line. Use this command to quickly move to the middle of
the screen from either the top or the bottom. Note that the
command "dM" deletes from the current line to the line
specified by the M command.

Lower Screen - L

Syntax:

[offset]L

Function:

Moves the cursor to the lowest line on the screen. Use
this command to quickly move to the bottom of the
screen. If an offset is given, the cursor is homed offset-l
number of lines from the bottom of the screen. Note that
the command "dL" deletes all lines from the current line
to the bottom line shown on the screen.

Previous Context - " and "

Syntax:
'character
'character
Function:

May 16, 1988

Moves the cursor to previous context or to context marked
with the m command. If the single quotation mark or
back quotation mark is doubled, the cursor is moved to
previous context. If a single character is given after either
quotation mark, the cursor is moved to the location of the
specified mark as defined by the m command. Previous
context is the location in the file of the last "nonrelative"
cursor movement. The single quotation mark ( ') syntax
is used to move to the beginning of the line representing
the previous context. The back quotation mark (' ) syntax
is used to move to the previous context within a line.

Page 9

V/(C)

V/(C)

The Screen Commands

The screen commands are not cursor movement commands and cannot
be used in delete commands as the delimiters of text objects. However, the screen commands do move the cursor and are useful in paging or scrolling through a file. These commands are described below:
Scroll- Ctrl·U and Ctrl·D

Syntax:

[size]Ctrl·U
[size]Ctrl·D

Function:

Scrolls the screen up a half window (Ctrl-U) or down a
half window (Ctrl-D). If size is given, the scroll is size
number of lines. This value is remembered for all later
scrolling commands.

Page - Ctrl·F and Ctrl·B

Syntax:

Ctrl·F
Ctrl·B

Function:

Pages screen forward and backward. Two lines of continuity are kept between pages if possible. A preceding
count gives the number of pages to move forward or backward.

Status· Ctrl·G

Syntax:

BELL
Ctrl·G

Function:

Displays vi status on status line. This gives you the name
of the file you are editing, whether it has been modified,
the current line number, the number of lines in the file,
and the percentage of the file (in lines) that precedes the
cursor.

Zero Screen - z

Syntax:

[linenumber ]z[size ]RETURN
[linenumber ]z[size].
[linenumber]z[size] -

Function:

Redraws the display with the current line placed at or
"zeroed" at the top, middle, or bottom of the screen,
respectively. If you give a size, the number of lines
displayed is equal to size. If a preceding linenumber is
given, the given line is placed at the top of the screen. If
the last argument is a RETURN, the current line is placed
at the top of the screen. If the last argument is a period
( . ), the current line is placed in the middle of the screen.

May 16, 1988

Page 10

VI (C)

VI (C)

If the last argument is a minus sign (-), the current line is
placed at the bottom of the screen.
Redraw - Ctrl-R or Ctrl-L

Syntax:

Ctrl-R
Ctrl-L

Function:

Redraws the screen. Use this command to erase any system messages that may scramble your screen. Note that
system messages do not affect the file you are editing.

Text Insertion

The text insertion commands always place you in insert mode. Exit
from insert mode is always done by pressing ESC. The following
insertion commands are "pure" insertion commands; no text is
deleted when you use them. This differs from the text modification
commands, change, replace, and substitute, which delete and then
insert text in one operation.
Insert - i and I

Syntax:

i[text]ESC
I [text] ESC

Function:

Insert text in editing buffer. The lowercase i command
places you in insert mode. Text is inserted before the
character beneath the cursor. To insert a newline, press a
RETURN. Exit insert mode by typing the ESC key. The
uppercase I command places you in insert mode, but
begins text insertion at the beginning of the current line,
rather than before the cursor.

Append - a and A

Syntax:

a[text]ESC
A[text]ESC

Function:

Appends text to the editing buffer. The lowercase a command works exactly like the lowercase i command, except
that text insertion begins after the cursor and not before.
This is the one way to add text to the end of a line. The
uppercase A command begins appending text at the end of
the current line rather than after the cursor.

May 16, 1988

Page 11

VJ(C)

VJ(C)

Open New Line - 0 and 0

Syntax:

o[text]ESC
o [text] ESC

Function:

Opens a new line and inserts text. The lowercase 0 command opens a new line below the current line; uppercase
o opens a new line above the current line. After the new
line has been opened, both these commands work like the
I command.

Text Deletion

Many of the text deletion commands use the D key as an operator.
This operator deletes text objects delimited by the cursor and a cursor
movement command. Deleted text is always saved away in a buffer.
The delete commands are described below:
Delete Character - x and X

Syntax:

x
X

Function:

Deletes a character. The lowercase x command deletes
the character beneath the cursor. With a preceding count,
count characters are deleted to the right beginning with
the character beneath the cursor. This is a quick and easy
way to delete a few characters. The uppercase X command deletes the character just before the cursor. With a
preceding count, count characters are deleted backward,
beginning with the character just before the cursor.

Delete - d and D

Syntax:

dcursor-movement
dd
D

Function:

Deletes a text object. The lowercase d command takes a
cursor-movement as an argument. If the cursor-movement
is an intraline command, deletion takes place from the
cursor to the end of the text object delimited by the
cursor-movement. Deletion forward deletes the character
beneath the cursor; deletion backward does not. If the
cursor-movement is a multi-line command, deletion takes
place from and including the current line to the text object
delimited by the cursor-movement.

May 16, 1988

Page 12

VI (C)

VI(C)

The dd command deletes whole lines. The uppercase D command
deletes from and including the cursor to the end of the current line.
Deleted text is automatically pushed on a stack of buffers numbered 1
through 9. The most recently deleted text is also placed in a special
delete buffer that is logically buffer o. This special buffer is the
default buffer for all (put) commands using the double quotation mark
(") to specify the number of the buffer for delete, put, and yank commands. The buffers 1 through 9 can be accessed with the p and P (put)
commands by appending the double quotation mark (") to the number
of the buffer. For example:
"4p

puts the contents of delete buffer number 4 in your editing buffer just
below the current line. Note that the last deleted text is "put" by
default and does not need a preceding buffer number.
Text Modification

The text modification commands all involve the replacement of text
with other text. This means that some text will necessarily be deleted.
All text modification commands can be "undone" with the u command:
Undo - u and U

Syntax:

u
U

Function:

Undoes the last insert or delete command. The lowercase
u command undoes the last insert or delete command.
This means that after an insert, u deletes text; and after a
delete, u inserts text. For the purposes of undo, all text
modification commands are considered insertions.
The uppercase U command restores the current line to its
state before it was edited, no matter how many times the
current line has been edited since you moved to it.

Repeat -.

Syntax:
Function:

May 16, 1988

Repeats the last insert or delete command. A special case
exists for repeating the p and P "put" commands. When
these commands are preceded by the name of a delete
buffer, successive u commands display the contents of the
delete buffers.

Page 13

VI(C)

VI (C)

Change - c and C

Syntax:

ccursor-movement text ESC
CtextESC
cctext ESC

Function:

Changes a text object and replaces it with text . Text is
inserted as with the i command. A dollar sign ($) marks
the extent of the change. The c command changes arbitrary text objects delimited by the cursor and a cursormovement . The C and cc commands affect whole lines
and are identical in function.

Replace - rand R

Syntax:

rchar
RtextESC

Function:

Overstrikes character or line with char or text, respectively. Use r to overstrike a single character and R to
overstrike a whole line. A count multiplies the replacement text count times.

Substitute - sand S

Syntax:

stext ESC
Stext ESC

Function:

Substitutes current character or current line with text. Use
s to replace a single character with new text. Use S to
replace the current line with new text. If a preceding
count is given, text substitutes for count number of characters or lines depending on whether the command is s or
S, respectively.

Filter - !

Syntax:

!cursor-movement cmd RETURN

Function:

Filters the text object delimited by the cursor and cursormovement through the XENIX command, cmd. For exampIe, the following command sorts all lines between the
cursor and the bottom of the screen, substituting the
designated lines with the sorted lines:
!Lsort
Arguments and shell metacharacters may be included as
part of cmd; however, standard input and output are
always associated with the text object being filtered.

May 16, 1988

Page 14

VI(C)

VI(C)

Join Lines - J

Syntax:

J

Function:

Joins the current line with the following line. If a count is
given, count lines are joined.

Shift - < and>

Syntax:

> [cursor-movement]

<[cursor-movement]

»
«
Function:

Shifts text right (» or left «). Text is shifted by the value
of the option shiftwidth, which is normally set to eight
spaces. Both the > and < commands shift all lines in the
text object delimited by the current line and cursormovement. The» and « commands affect whole lines.
All versions of the command can take a preceding count
that acts to multiply the number of objects affected.

Text Movement

The text movement commands move text in and out of the named
buffers a-z and out of the delete buffers 1-9. These commands either
"yank" text out of the editing buffer and into a named buffer or "put"
text into the editing buffer from a named buffer or a delete buffer. By
default, text is put and yanked from the "unnamed buffer", which is
also where the most recently deleted text is placed. Thus it is quite
reasonable to delete text, move your cursor to the location where you
want the deleted text placed, and then put the text back into the editing buffer at this new location with the p or P command.
The named buffers are most useful for keeping track of several chunks
of text that you want to keep on hand for later access, movement, or
rearrangement. These buffers are named with the letters a through z.
To refer to one of these buffers (or one of the numbered delete buffers)
in a command, use a quotation mark. For example, to yank a line into
the buffer named a, enter:
"ayy
To put this text back into the file, enter:
flap
If you delete text in the buffer named A rather than a, text is appended
to the buffer.

May 16,1988

Page 15

VI (C)

VI (C)

Note that the contents of the named buffers are not destroyed when
you switch files. Therefore, you can delete or yank text into a buffer,
switch files, and then do a put. Buffer contents are destroyed when you
exit the editor, so be careful.

Put - p and P
Syntax:

[" alphanumeric]p
[" alphanumeric]P

Function:

Puts text from a buffer into the editing buffer. If no buffer
name is specified, text is put from the unnamed buffer.
The lowercase p command puts text either below the
current line or after the cursor, depending on whether the
buffer contains a partial line or not. The uppercase P
command puts text either above the current line or before
the cursor, again depending on whether the buffer contains
a partial line or not.

Yank - y and Y
Syntax:

[" letter]ycursor-movement
[" letter]yy
[" letter]Y

Function:

Copies text in the editing buffer to a named buffer. If no
buffer name is specified, text is yanked into the unnamed
buffer. If an uppercase letter is used, text is appended to
the buffer and does not overwrite and destroy the previous
contents. When a cursor-movement is given as an argument, the delimited text object is yanked. The Y and yy
commands yank a single line, or, if a preceding count is
given, multiple lines can be yanked.

May 16, 1988

Page 16

VI(C)

VI (C)
Searching

The search commands search either forward or backward in the editing buffer for text that matches a given regular expression.
Search - / and ?

Syntax:

/[pattern ]/[0 jfset] RETURN
/[pattern ]RETURN
? [pattern]? [ojfset]RETURN
? [pattern ]RETURN

Function:

Searches forward (I) or backward (?) for pattern. A string
is actually a regular expression. The trailing delimiter is
not required. If no pattern is given, then last pattern
searched for is used. After the second delimiter, an ojfset
may be given, specifying the beginning of a line relative
to the line on which pattern was found. For example:
/word/finds the beginning of the line immediately preceding the
line containing "word" and the following command:
/word/+2
finds the beginning of the line two lines after the line containing "word". See also the ignorecase and magic
options.

Next String - nand N

Syntax:

n
N

Function:

Repeats the last search command. The n command
repeats the search in the same direction as the last search
command. The N command repeats the search in the
opposite direction of the last search command.

Find Character - f and F

Syntax:

fchar
Fchar

Function:

Finds character char on the current line. The lowercase f
searches forward on the line; the uppercase F searches

May 16, 1988

Page 17

VI(C)

VI(C)

backward. The semicolon (;) repeats the last character
search. The comma (,) reverses the direction of the
search.
To Character - t and T

Syntax:

tchar
Tchar

Function:

Moves the cursor up to but not on char. The semicolon
(;) repeats the last character search. The comma (,) reverses the direction of the search.

Mark - m

Syntax:

mletter

Function:

Marks a place in the file with a lowercase letter. You can
move to a mark using the "to mark" commands described
below. It is often useful to create a mark, move the cursor, and then delete from the cursor to the mark "a" with
the following command:

To Mark - ~ and'

Syntax:

~ letter
, letter

Function:

Move to letter. These commands let you move to the
location of a mark. Marks are denoted by single lowercase alphabetic characters. Before you can move to a
mark, it must first be created with the ill command. The
back quotation mark (' ) moves you to the exact location
of the mark within a line; the forward quotation mark ( , )
moves you to the beginning of the line containing the
mark. Note that these commands are also legal cursor
movement commands.

Exit and Escape Commands

There are several commands that are used to escape from vi command
mode and to exit the editor. These are described in the following section.

May 16, 1988

Page 18

VI (C)

VI (C)

ex Escape -:
Syntax:
Function:

Enters ex escape mode to execute an ex command. The
colon appears on the status line as a prompt for an ex
command. You then can enter an ex command line terminated by either a RETURN or an ESC and the ex command will execute. You are then prompted to type
RETURN to return to vi command mode. During the input
of the ex command line or during execution of the ex
command, you may press INTERRUPT to stop what you
are doing and return to vi command mode.

Exit Editor - ZZ
Syntax:

ZZ

Function:

Exit vi and write out the file if any changes have been
made. This returns you to the shell from which you
started vi.

Quit to ex - Q
Syntax:

Q

Function:

Enters the ex editor. When you do this, you will still be
editing the same file. You can return to vi by entering the
vi command from ex.

ex Commands
Entering the colon (:) escape command when in command mode produces a colon prompt on the status line. This prompt is for a command
available in the line-oriented editor, ex. In general, ex commands let
you write out or read in files, escape to the shell, or switch editing
files.
Many of these commands perform actions that affect the "current"
file by default. The current file is normally the file that you named
when you started vi, although the current file can be changed with the
"file" command, f, or with the' 'next" command, n. In most respects,
these commands are identical to similar commands for the editor, ed.
All such ex commands are aborted by either RETURN or ESC. We
shall use RETURN in our examples. Command entry is terminated by
typing INTERRUPT.

May 16, 1988

Page 19

VI(C)

VI (C)

Command Structure

Most ex command names are English words, and initial prefixes of the
words are acceptable abbreviations. In descriptions, only the abbreviation is discussed, since this is the most frequently used form of the
command. The ambiguity of abbreviations is resolved in favor of the
more commonly used commands. As an example, the command substitute can be abbreviated s , while the shortest available abbreviation
for the set command is see
Most commands accept prefix addresses specifying the lines in the file
that they are to affect. A number of commands also may take a trailing count specifying the number of lines to be involved in the· command. Counts are rounded down if necessary. Thus, the command
" lOp" displays the tenth line in the buffer while "move 5" moves the
current line after line 5.
Some commands take other information or parameters, stated after the
command name. Examples might be option names in a set command,
such as "set number", a filename in an edit command, a regular
expression in a substitute command, or a target address for a copy
command. For example:
1,5 copy 25
A number of commands have variants. The variant form of the command is invoked by placing an exclamation mark (!) immediately after
the command name. Some of the default variants may be controlled
by options; in this case, the exclamation mark turns off the meaning of
the default.
In addition, many commands take flags, including the characters "p"
and "1". A "p" or "1" must be preceded by a blank or tab. In this
case, the command abbreviated by these characters is executed after
the command completes. Since ex normally displays the new current
line after each change, p is rarely necessary. Any number of plus (+)
or minus (-) characters may also be given with these flags. If they
appear, the specified offset is applied to the current line value before
the printing command is executed.

Most commands that change the contents of the editor buffer give
feedback if the scope of the change exceeds a threshold given by the
report option. This feedback helps to detect undesirably large
changes so that they may be quickly and easily reversed with the undo
command. After commands with global effect, you will be informed if
the net change in the number of lines in the buffer during this command exceeds this threshold.

May 16, 1988

Page 20

VI (C)

VI (C)

Command Addressing

The following specifies the line addressing syntax for ex commands:
The current line. Most commands leave the current
line as the last line which they affect. The default
address for most commands is the current line, thus
" ." is rarely used alone as an address.
n

The nth line in the editor's buffer, lines being numbered sequentially from 1.

$

The last line in the buffer.

%

An abbreviation for" 1,$", the entire buffer.

+n or-n

An offset, n relative to the current buffer line. The
forms ". +3" "+3" and "+++" are all equivalent.
If the current line is line 100 they all address line
103.

/patternl or ?pattern?
Scan forward and backward respectively for a text
matching the regular expression given by pattern.
Scans normally wrap around the end of the buffer.
If all that is desired is to print the next line containing pattern, the trailing slash (/) or question mark
(?) may be omitted. If pattern is omitted or explicitly empty, the string matching the last specified
regular expression is located.
The forms
"RETURN" and "?RETURN" scan using the last
named regular expression. After a substitute,
"RETURN" and "??RETURN" would scan using
that substitute's regular expression.

or 'x

Before each nonrelative motion of the current line
dot (.), the previous current line is marked with a
label, subsequently referred to with two single quotation marks C'). This makes it easy to refer or
return to this previous context. Marks are established with the vi m command, using a single
lowercase letter as the name of the mark. Marked
lines are later referred to with the following notation:

'x.
where x is the name of a mark.
Addresses to commands consist of a series of addresses, separated by
a colon (,) or a semicolon (;). Such address lists are evaluated left to
right. When addresses are separated by a semicolon (;) the current

May 16, 1988

Page 21

V/(C)

V/(C)

line ( . ) is set to the value of the previous addressing expression before
the next address is interpreted. If more addresses are given than the
command requires, all but the last one or two are ignored. If the command takes two addresses, the first addressed line must precede the
second in the buffer. Null address specifications are permitted in a list
of addresses, the default in this case is the current line ' , .' '; thus
" ,100" is equivalent to ".,1 00". It is an error to give a prefix address
to a command which expects none.
Command Format

The following is the format for all ex commands:
[address] [command] [!] [parameters] [count] [flags]

All parts are optional depending on the particular command and its
options. The following section describes specific commands.
Argument List Commands

The argument list commands allow you to work on a set of files, by
remembering the list of filenames that are specified when you invoke
vi. The args command lets you examine this list of filenames. The
file command gives you information about the current file. The n
(next) command lets you either edit the next file
in the argument list or change the list. And the rewind command lets
you restart editing the files in the list. All of these commands are
described below:
args

The members of the argument list are displayed, with
the current argument delimited by brackets.
For example, a list might look like this:
file1 file2 [file3] file4 file5
The current file is file3 .

f

Displays the current filename, whether it has been
modified since the last write command, whether it is
read-only, the current linenumber, the number of
lines in the buffer, and the percentage of the buffer
that you have edited. In the rare case that the current
file is "[Not edited]", this is noted also; in this case
you have to use w! to write to the file, since the editor is not sure that a w command will not destroy a
file unrelated to the current contents of the buffer.

ffile

The current filename is changed to file which is considered "[Not edited]' '.

May 16, 1988

Page 22

VI (e)

VI (e)
n

The next file in the command line argument list is
edited.

n!

This variant suppresses warnings about the
modifications to the buffer not having been written
out, discarding irretrievably any changes that may
have been made.

n [+commandj file list

The specified filelist is expanded and the resulting
list replaces the current argument list; the first file in
the new list is then edited. If command is given (it
must contain no spaces), then it is executed after
editing the first such file.
rew

The argument list is rewound, and the first file in the
list is edited.

rew!

Rewinds the argument list discarding any changes
made to the current buffer.

If you use e-Shell and set the prompt variable to output a prompt for

non-interactive- shells, the prompt is interpreted as a filename when
you use these commands. This causes unexpected problems. To avoid
these problems, use the default prompt value as specified in
lusrlliblmkuserlmkuser.cshrc.
Edit Commands

To edit a file other than the one you are currently editing, you will
often use one of the variations of the e command.
In the following discussions, note that the name of the current file is
always remembered by vi and is specified by a percent sign (%). The
name of the previous file in the editing buffer is specified by a number
sign (#).

The edit commands are described below:
efile

U sed to begin an editing session on a new file. The edi-

tor first checks to see if the buffer has been modified
since the last w command was issued. If it has been, a
warning is issued and the command is aborted. The
command otherwise deletes the entire contents of the
editor buffer, makes the named file the current file, and
displays the new filename. Aft.er ensuring that this file
is sensible, (i.e., that it is not a binary file, directory, or
a device), the editor reads the file into its buffer. If the
read of the file completes without error, the number of
lines and characters read is displayed on the status line.
If there were any non-ASCII characters in the file, they

May 16, 1988

Page 23

V/(C)

V/(C)

are stripped of their non-ASCII high bits, and any null
characters in the file are discarded. If none of these
errors occurred, the file is considered edited. If the last
line of the input file is missing the trailing newline
character, it is supplied and a complaint issued. The
current line is initially the first line of the file.
e!file

This variant form suppresses the complaint about
modifications having been made and not written from
the editor buffer, thus discarding all changes that have
been made before editing the new file.

e +nfile

Causes the editor to begin editing at line n rather than
at the first line. The argument n may also be an editor
command containing no spaces; for example, "+/pattern".

Ctrl.:"

This is a shorthand equivalent for ":e #RETURN",
which returns to the previous position in the last edited
file. If you do not want to write the file, you should use
":e! #RETURN" instead.

Write Commands
The write commands let you write out all or part of your editing buffer
to either the current file or to some other file. These commands are
described below:
wfile

Writes changes made back to file, displaying the
number of lines and characters written. Normally, file
is omitted and the buffer is written to the name of the
current file. If file is specified, text is written to that
file. The editor writes to a file only if it is the current
file and is edited, or if the file does not exist. Otherwise, you must give the variant form w! to force the
write. If the file does not exist it is created. The
current filename is changed only if there is no current
filename; the current line is never changed.
If an error occurs while writing the current and edited
file, the editor displays:

No write since last change
even if the buffer had not previously been modified.
w»file

May 16,1988

Appends the buffer contents at the end of an existing
file. Previous file contents are not destroyed.

Page 24

VI(C)

VI(C)

w! name

Overrides the checking of the nonnal write command,
and writes to any file that the system pcnnits.

w!command

Writes the specified lines into command. Note the
difference between
w!file

which overrides checks and
w!cmd

which writes to a command. The output of this command is displayed on the screen and not inserted in the
editing buffer.
Read Commands

The read commands let you read text into your editing buffer at any
location you specify. The text you read in must be at least one line
long, and can be either a file or the output from a command.
r file

Places a copy of the text of the given file in the editing
buffer after the specified line. If no file is given, the
current filename is used. The current filename is not
changed unless there is none, in which case the file
becomes the current name. If the file buffer is empty
and there is no current name, this is treated as an e
command.
Address 0 is legal for this command and causes the file
to be read at the beginning of the buffer. Statistics are
given as for the e command when the r successfully terminates. After an r the current line is the last line read.

r !command

Reads the output of command into the buffer after the
specified line. A blank or tab before the exclamation
mark (!) is mandatory.

Quit Commands

There are several ways to exit vi. Some abort the editing session,
some write out the editing buffer before exiting, and some warn you if
. you decide to exit without writing out the buffer. All of these ways of
exiting are described below:
q

May 16, 1988

Exits vi. No automatic write of the editor buffer to a file
is perfonned. However, vi displays a warning message if
the file has changed since the last w command was issued,

Page 25

VI (C)

VI(C)

and does not quit. vi also displays a diagnostic if there are
more files in the argument list left to edit. Normally, you
will wish to save your changes, and you should enter a w
command. If you wish to discard them, enter the q! command variant.
q!

Quits from the editor, discarding changes to the buffer
without complaint.

wq name

Like a w and then a q command.

wq! name

Overrides checking normally made before execution of
the w command to any file. For example, if you own a file
but do not have write permission turned on, the wq!
allows you to update the file anyway.

x name

If any changes have been made and not written, writes the
buffer out and then quits. Otherwise, it just quits.

Global and Substitute Commands

The global and substitute commands allow you to perform complex
changes to a file in a single command. Learning how to use these
commands is a must for an experienced vi user.
g/pattern/ cmds
The g command has two distinct phases. In the first
phase, each line matching pattern in the editing buffer is
marked. Next, the given command list is executed with
the current line, dot ( . ), initially set to each marked line.

The command list consists of the remaining commands on
the current input line and may continue to multiple lines
by ending all but the last such line with a backslash (\).
This multiple-line option will not work from within vi,
you must switch to ex to do it. If cmds (or the trailing
slash (!) delimiter) is omitted, each line matching pattern
is displayed.
The g command itself may not appear in cmds. The
options autoprint and autoindent are inhibited during a
global command and the value of the report option is
temporarily infinite, in deference to a report for the entire
global. Finally, the context mark ( ~) or (' ) is set to the
value of the current line (.) before the global command
begins and is not changed during a global command.
The following global commands, most of them substitutions, cover the most frequent uses of the global command.

May 16, 1988

Page 26

VI (C)

VI (C)

g/si /p

This command simply prints all lines that contain
the string "s 1" .

g/si /s//s2/

This command substitutes the first occurrence of
"sl" on all lines that contain it with the string
"s2".

g/si /s//s2/g

This command substitutes all occurrences of "sl"
with the string "s2". This includes multiple
occurrences of ' 's 1" on a line.

g/si /s//s2/gp

This command works the same as the preceding
example, except that in addition, all changed lines
are displayed on the screen.

g/si/s//s2/gc

This command prompts you to confirm that you
want to make each substitution of the string "s 1' ,
with the string "s2". If you enter a Y , the given
substitution is made, otherwise it is not.

g/sO/s/si/s2/g

This command marks all those lines that contain the
string "sO", and then for those lines only, substitutes all occurrences of the string "s 1" with "s2".

g!/pattern/ cmds

This' variant form of g runs cmds at each line not
matching pattern.

g/"/s// /g

This command inserts blank spaces at the beginning
of each line in a file.

s/patternlrepl/ options
On each specified line, the first instance of text
matching the regular expression pattern is replaced
by the replacement text repl. If the global indicator
option character g appears, all instances on a line
are substituted. If the confirm indication character
c appears, before each substitution the line to be
substituted is printed on the screen with the string
to be substituted marked with caret (") characters.
By entering Y , you cause the substitution to be performed; any other input causes no change to take
place. After an s command, the current line is the
last line substituted.
v/patternlcmds

May 16, 1988

A synonym for the global command variant g!, running the specified cmds on each line that does not
match pattern.

Page 27

VI(C)

VI (C)

Text Movement Commands

The text movement commands are largely superseded by commands
available in vi command mode. However, the following two commands are still quite useful:
co addr flags

A copy of the specified lines is placed after addr,
which may be "0". The current line "." addresses
the last line of the copy.

[range ]maddr

The m command moves the lines specified by range
after the line given by addr. For example, m+
swaps the current line and the following line, since
the default range is just the current line. The first of
the moved lines becomes the current line (dot).

Shell Escape Commands

You will often want to escape from the editor to execute normal
XENIX commands. You may also want to change your working direc-

tory so that your editing can be done with respect to a different working directory. These operations are described below:
cd directory

The specified directory becomes the current directory. If no directory is specified, the current value
of the home option is used as the target directory.
After a cd , the current file is not considered to have
been edited so that write restrictions on preexisting
files still apply.

sh

A new shell is created. You may invoke as many
commands as you like in this shell. To return to vi,
enter a Ctrl-D to terminate the shell.

!command

The remainder of the line after the exclamation (!)
is sent to a shell to be executed. Within the text of
command , the characters "%" and "#" are
expanded as the filenames of the current file and the
last edited file and the character "!" is replaced
with the text of the previous command. Thus, in
particular, "!!" repeats the last such shell escape.
If any such expansion is performed, the expanded
line is echoed. The current line is unchanged by
this command.

If there has been "[No write]" of the buffer contents since the last
change to the editing buffer, a diagnostic is displayed before the command is executed as a warning. A single exclamation (!) is displayed
when the command completes.

May 16, 1988

Page 28

VI (C)

VI (C)

If you use C-Shell and set the prompt variable to output a prompt for
non-interactive shells, the prompt is interpreted as an argument for
command in shell escapes. This causes unexpected problems. To
avoid these problems, use the default prompt value as specified in
lusrlliblmkuserlmkuser.cshrc.
Other Commands

The following command descriptions explain how to use miscellane0us ex commands that do not fit into the above categories:
abbr

Maps the first argument to the following string. For example, the following command
:abbr rainbow yellow green blue red
maps "rainbow" to "yellow green blue red". Abbreviations can be turned off with the uoabbreviate command,
as in:
:una rainbow

map, map! Maps any character or escape sequence to an existing
command sequence. Characters mapped with map! work
in both command and insert mode, while characters
mapped with map work only in command mode. Characters mapped with map! cannot be unmapped using
uomap.
ou

Displays each specified line preceded by its buffer line
number. The current line is left at the last line displayed.
To get automatic line numbering of lines in the buffer, set
the number option.

preserve

The current editor buffer is saved as though the system
had just crashed. This command is for use only in emergencies when a w command has resulted in an error and
you do not know how to save your work.

=

Displays the line number of the addressed line. The
current line is unchanged.

recover file

Recovers file from the system save area. The system
saves a copy of the editing buffer only if you have made
changes to the file, the system crashes, or you execute a
preserve command. When you use preserve , you are
notified by mail when a file is saved.

May 16, 1988

Page 29

VI (C)

VI(C)

set argument
With no arguments, set displays those options whose
values have been changed from their defaults; with the
argument all, it displays all of the option values.
Giving an option name followed by a question mark (?) causes the
current value of that option to be displayed. The question mark is
unnecessary unless the option is a Boolean value. Switch options are
given values either with:
set option
to tum them on or:
set nooption
to tum them off. String and numeric options are assigned with:
set option=value
More than one option may be given to set; all are interpreted from left
to right. The option values can be set automatically with the EXINIT
environment variable. For more information, see environ(M).

tag label
The focus of editing switches to the location of label. If necessary,
vi will switch to a different file in the current directory to find
label. If you have modified the current file before giving a tag
command, you must first write it out. If you give another tag command with no argument, the previous label is used.
Similarly, if you press Ctrl-], vi searches for the word immediately
after the cursor as a tag. This is equivalent to entering ":tag", the
word following the cursor, and then pressing·the RETURN key.
The tags file is normally created by a program such as ctags, and
consists of a number of lines with three fields separated by blanks
or tabs. The first field gives the name of the tag, the second the
name of the file where the tag resides, and the third gives an
addressing form which can be used by the editor to find the tag.
This field is usually a contextual scan using / pattern / to be
immune to minor changes in the file. Such scans are always performed as if the nomagic option was set. The tag names in the
tags file must be sorted alphabetically. There are a number of
options that can be set to affect the vi environment. These can be
set with the ex set command either while editing or immediately
after vi is invoked in the vi start-up file, .exrc.

unmap
Unmaps any character or escape sequence that has been mapped
using the map command.

May 16, 1988

Page 30

VI (C)

VI (C)

The first thing that must be done before you can use vi, is to set the
terminal type so that vi understands how to talk to the particular terminal you are using.
Each time vi is invoked, it reads commands from the file named .exrc
in your home directory. This file normally sets the user's preferred
options so that they need not be set manually each time you invoke vi.
Each of the options is described in detail below.
Options

There are only two kinds of options: switch options and string options.
A switch option is either on or off. A switch is turned off by prefixing
the word no to the name of the switch within a set command. String
options are strings of characters that are assigned values with the syntax option =string . Multiple options may be specified on a line. vi
options are listed below:
autoindent, ai
default: noai
Can be used to ease the preparation of structured program text. For
each line created by an append, change, insert, open, or substitute
operation, vi looks at the preceding line to determine and insert an
appropriate amount of indentation. To back the cursor up to the
preceding tab stop, press Ctrl-D. The tab stops going backward are
defined as multiples of the shiftwidth option. You cannot backspace over the indent, except by pressing Ctrl-D.
Specially processed in this mode is a line with no characters added
to it, which turns into a completely blank line (the whitespace provided for the autoindent is discarded). Also, specially processed
in this mode are lines beginning with a caret (A) and immediately
followed by a Ctrl-D. This causes the input to be repositioned at
the beginning of the line, but retains the previous indent for the
next line. Similarly, a "0" followed by a Ctrl-D, repositions the
cursor at the beginning without retaining the previous indent.
Autoindent doesn't happen in global commands.
autoprint ap
default: ap
Causes the current line to be displayed after each ex copy, move,
or substitute command. This has the same effect as supplying a
trailing "p" to each such command. Autoprint is suppressed in
globals, and only applies to the last command on a line.
autowrite, aw
default: noaw
Causes the contents of the buffer to be automatically written to the
current file if you have modified it when you give a next, rewind,
tag, or ! command, or a Ctrl- (switch files) or Ctrl-] (tag go to)
command.
A

May 16, 1988

Page 31

VI (C)

VI(C)

beautify, bf
default: nobeautify
Causes all control characters except tab, newline and formfeed to
be discarded from the input. A complaint is registered the first
time a backspace character is discarded. Beautify does not apply
to command input.
directory, dir
default: dir=/tmp
Specifies the directory in which vi places the editing buffer file. If
the directory does not have write permission, the editor will exit
abruptly when it fails to write to the buffer file.
edcompatible
default: noedcompatible
Causes the presence or absence of g and c suffixes on substitute
commands to be remembered, and to be toggled on and off by
repeating the suffixes. The suffix r causes the substitution to be like
the tilde C) command, instead of like the ampersand command
(&).

error bells, eb
default: noeb
Error messages are preceded by a bell. If possible, the editor
always places the error message in inverse video instead of ringing
the bell.
hardtabs, ht
default: ht=8
Gives the boundaries on which terminal hardware tabs are set or on
which tabs the system expands.
ignorecase, ic
default: noic
Maps all uppercase characters in the text to lowercase in regular
expression matching. In addition, all uppercase characters in regular expressions are mapped to lowercase except in character class
specifications enclosed in brackets.
lisp
default: nolisp
Autoindent indents appropriately for LISP code, and the ( ) { } [[
and ]] commands are modified to have meaning for LISP.
list

default: nolist
All printed lines are displayed, showing tabs and end-of-lines.

magic
default: magic
If nomagic is set, the number of regular expression metacharacters
is greatly reduced, with only up-arrow C) and dollar sign ($) having special effects. In addition, the metacharacters "-" and "&"
in replacement patterns are treated as normal characters. All the
normal metacharacters may be made magic when nomagic is set
by preceding them with a backslash (\).
mesg
default: nomesg
Causes write permission to be turned off to the terminal while you
are in visual mode, if nomesg is set. This prevents people writing
to your screen with the XENIX write command and scrambling

May 16, 1988

Page 32

VI(C)

VI (C)
your screen as you edit.
number, n
default: nonumber
Causes all output lines to be printed with their line numbers.

open
default: open
If set to noopen, the commands open and visual are not pennitted
from ex. This is set to prevent confusion resulting from accidental
entry to open or visual mode.
optimize, opt
default: optimize
Output of text to the screen is expedited by setting the tenninal so
that it does not perfonn automatic carriage returns when displaying
more than one line of output, thus greatly speeding output on terminals without addressable cursors when text with leading whitespace is printed.
paragraphs, para
default: para =IPLPPPQPP TPbp
Specifies paragraph delimiters for the { and } operations. The pairs
of characters in the option's value are the names of the nroff macros that start paragraphs.
prompt
default: prompt
ex input is prompted for with a colon (:). If noprompt is set, when
ex command mode is entered with the Q command, no colon
prompt is displayed on the status line.
redraw
default: noredraw
The editor simulates (using great amounts of output), an intelligent
tenninal on a dumb tenninal. Useful only at very high speed.
remap
default: remap
If on, mapped characters are repeatedly tried until they are
unchanged. For example, if 0 is mapped to 0 and 0 is mapped to I,
o will map to I if remap is set, and to 0 if noremap is set.
report
default: report=5
Specifies a threshold for feedback from commands. Any command
that modifies more than the specified number of lines will provide
feedback as to the scope of its changes. For global commands and
the undo command, the net change in the number of lines in the
buffer is presented at the end of the command. Thus notification is
suppressed during a g command on the individual commands perfonned.
scroll
default: scroll= ~ window
Detennines the number of logical lines scrolled when Ctrl-D is
received from a tenninal input in command mode, and the number
of lines displayed by a command mode z command (double the
value of scroll).

May 16, 1988

Page 33

VI (C)

VI (C)

sections
default: sections=SHNHH HU
Specifies the section macros for the [[ and ]] operations. The pairs
of characters in the option's value are the names of the nroff macros that start paragraphs.
shell, sh
default: sh=/bin/sh
Gives the pathname of the shell forked for the shell escape command (!), and by the shell command. The default is taken from
SHELL in the environment, if present.
shiftwidth, sw
default:sw=8
Gives the width of a software tab stop, used in reverse tabbing with
Ctrl-D when using autoindent to append text, and by the shift commands.
showmatch, sm
default: nosm
When a ) or } is typed, moves the cursor to the matching ( or { for
one second if this matching character is on the screen.
showmode
default: noshowmode
Causes the message "INPUT MODE to appear on lower right
comer of the screen when insert mode is activated.
slowopen
default: noslowopen
Postpones update of the display during inserts.
tabstop, ts
default: ts=8
The editor expands tabs in the input file to be on n boundaries for
the purposes of display.
taglength, tl
default: tl=O
The first n characters in a tag name are significant, but all others
are ignored. A value of zero (the default) means that all characters
are significant.
tags
default: tags=tags /usr/lib/tags
A path of files to be used as tag files for the tag command. A
requested tag is searched for in the specified files, sequentially. By
default, files named tag are searched for in the current directory
and in lusrlIib.
term
default=value of shell TERM variable
The terminal type of the output device.
terse
default: noterse
Shorter error diagnostics are produced for the experienced user.
timeout , to
default: noto
Eliminates the 1 second time limit for maps (character mappings).

May 16, 1988

Page 34

VI (C)

VI (C)

warn
default: warn
Warn if there has been "[No write since last change]" before a
shell escape command (!).
window
default: window = speed dependent
This specifies the number of lines in a text window. The default is
8 at slow speeds (600 baud or less), 16 at medium speed (1200
baud), and the full screen (minus one line) at higher speeds.

w300, w1200, w9600
These are not true options but set window (above) only if the
speed is slow (300), medium (1200), or high (9600), respectively.
wrapscan, ws
default: ws
Searches, using the regular expressions in addressing, will wrap
around past the end of the file.
wrapmargin, wm
default: wm=O
Defines the margin for automatic insertion of newlines during text
input. A value of zero specifies no wrap margin.
writeany, wa
default: nowa
Inhibits the checks normally made before write commands, allowing a write to any file that the system protection mechanism will
allow.
Regular Expressions
A regular expression specifies a set of strings of characters. A
member of this set of strings is said to be "matched" by the regular
expression. vi remembers two previous regular expressions: the previous regular expression used in a substitute command and the previous regular expression used elsewhere, referred to as the previous
scanning regular expression. The previous regular expression can
always be referred to by a null regular expression: e.g., "//" or "??".

The regular expressions allowed by vi are constructed in one of two
ways depending on the setting of the magic option. The ex and vi
default setting of magic gives quick access to a powerful set of regular expression metacharacters. The disadvantage of magic is that the
user must remember that these metacharacters are magic and precede
them with the backs lash (\) to use them as "ordinary" characters.
With nomagic set, regular expressions are much simpler, there being
only two metacharacters. The power of the other metacharacters is
still available by preceding the now ordinary character with a "\".
Note that "\" is always a metacharacter. In this discussion, the magic
option is assumed. With nomagic , the only special characters are the
caret C) at the beginning of a regular expression, the dollar sign ($) at
the end of a regular expression, and the backJash (\). The tilde (-)
and the ampersand (&) also lose their special meanings related to the
replacement pattern of a substitute.

May 16, 1988

Page 35

VI(C)

VI (C)

The following basic constructs are used to construct magic mode regular expressions.
char An ordinary character matches itself. Ordinary characters are
any characters except a caret (A) at the beginning of a line, a
dollar sign ($) at the end of line, a star (*) as any character other
than the first, and any of the following characters:

These characters must be preceded by a backslash (\) if they are
to be treated as ordinary characters.
At the beginning of a pattern, forces the match to succeed only
at the beginning of a line.

$

At the end of a regular expression, forces the match to succeed
only at the end of the line.
Matches any single character except the newline character.

\<

Forces the match to occur only at the beginning of a "word";
that is, either at the beginning of a line, or just before a letter,
digit, or underline and after a character not one of these.

\>

Similar to "\<", but matching the end of a "word", i.e., either
the end of the line or before a character which is not a letter, a
digit, or the underline character.

[string]

Matches any single character in the class defined by string.
Most characters in string define themselves. A pair of characters separated by a dash (-) in string defines the set of characters
between the specified lower and upper bounds, thus "[a-z]" as a
regular expression matches any single lowercase letter. If the
first character of string is a caret (A) then the construct matches
those characters which it otherwise would not. Thus "[Aa_z]"
matches anything but a lowercase letter or a newline. To place
any of the characters caret, left bracket, or dash in string they
must be escaped with a preceding backslash (\).
The concatenation of two regular expressions first matches the leftmost regular expression and then the longest string that can be recognized as a regular expression. The first part of this new regular
expression matches the first regular expression and the second part
matches the second. Any of the single character matching regular
expressions mentioned above may be followed by a star 0 to form a
regular expression that matches zero or more adjacent occurrences of
the characters matched by the prefixing regular expression. The tilde
C) may be used in a regular expression to match the text that defined
the replacement part of the last s command. A regular expression may
be enclosed between the sequences "\(" and "\)" to remember the

May 16, 1988

Page 36

VJ(C)

VJ(C)

text matched by the enclosed regular expression. This text can later
be interpolated into the replacement text using the following notation:
\digit

where digit enumerates the set of remembered regular expressions.
The basic metacharacters for the replacement pattern are the ampersand (&) and the tilde C); these are given as "\&" and "\-" when
nomagie is set. Each instance of the ampersand is replaced by the
characters matched by the regular expression. In the replacement pattern, the tilde stands for the text of the previous replacement pattern.
Other metasequences possible in the replacement pattern are always
introduced by a backs lash (\). The sequence "'vI" is replaced by the
text matched by the nth regular subexpression enclosed between "\("
and "\)". When nested, parenthesized subexpressions are present, n is
determined by counting occurrences of "\(" starting from the left.
The sequences "\u" and "\1" cause the immediately following character in the replacement to be converted to uppercase or lowercase,
respectively, if this character is a letter. The sequences "\U" and
"\L" tum such conversion on, either until "\E" or "\e" is encountered, or until the end of the replacement pattern.
Credit
This utility was developed at the University of California at Berkeley
and is used with permission.
Notes
The /usrlIib/ex3.7preserve program can be used to restore vi buffer
files that were lost as a result of a system crash. The program searches
the /tmp directory for vi buffer files and places them in the directory
/usr/preserve. The owner can retrieve these files using the -r option.
The /usrlIib/ ex3. 7preserve program must be placed in the system
startup file, /ete/re, before the command that cleans out the /tmp
directory. See the XENIX System Administrator's Guide for more information on jete/reo

May 16, 1988

Page 37

VIDI (C)

VIDI (C)

Name

vidi - Sets the font and video mode for a video device.
Syntax

vidi [ -d ] [ -f fontfile ] command
Description

vidi sets video mode or loads/extracts a font from the device that is the
current standard input; without arguments, it lists the all of the valid
video mode and font commands.
Some video cards support changeable character fonts. The vidi font
commands ("font8x8", "font8xI4", and "font8xI6") are used to load
and extract fonts from the tables stored in the kernel. If neither of the
-d or -f options has been specified, vidi will attempt to load the specified font from /usr/lib/vidil!ontname. The -d option causes vidi to read
the specifed font from the kernel and write (dump) the font to the standard output.
The -f option is used to load fonts other than those in /usr/lib/vidi or to
specify an output file other than standard output. When loading a font,
-f filename will load the font from filename instead of from
/usr/lib/vidil!ontname. When extracting a font (-d option) -f filename
causes vidi to write the extracted font into filename instead of writing
the font to the standard output.
The other vidi commands set the video mode of the video adapter connected to vidi's standard input. The commands are :
mono
move current screen to the
cga
move current screen to the
ega
move current screen to the
vga
move current screen to the

May 16, 1988

monochrome adapter.
Color Graphics adapter.
Enhanced Graphics adapter.
Video Graphics adapter.

Page 1

VIDI (C)

VIDI (C)

Command

Cols

Rows

c40x25
e40x25
v40x25
m80x25
c80x25
em80x25
e80x25
vm80x25
v80x25
e80x43

40
40
40
80
80
80
80
80
80
80

25
25
25
25
25
25
25
25
25
43

Command
mode5
mode6
modeD
modeE
modeF
mode10
mode 11
mode12
mode13

Text Modes
Font Adapter
8x8
8x14
8x16
8x14
8x8
8x14
8x14
8x16
8x16
8x14

eGA (EGA VGA)
EGA (VGA)
VGA
MONO (EGA_MONO VGA_MONO)
eGA (EGA VGA)
EGA_MONO (VGA_MONO)
EGA (VGA)
VGA_MONO
VGA
EGA (VGA)

Graphics Modes
Pixel Resolution
320x200
640x200
320x200
640x200
640x350
640x350
640x480
640x480
320x200

Colors
4
2
16
16
2 (mono)
16
2
16
256

See Also

screen(HW)

May 16, 1988

Page 2

VMSTAT(C)

VMSTAT(C)

Name
vms tat - Report paging and system statistics.
Syntax
vms tat [ -fs ] [ -n name list ] [ -I lines ] [ interval [ count ]]

Description
vmstat reports some statistics kept by the system on processes,
demand paging, and cpu and trap activity. Three types of reports are
available:
(default)
A summary of the number of processes in various states, paging
activity, system activity, and cpu cycle consumption.

-f Number offork(S),s done.
-s A verbose listing of paging and trap activity.
If no interval or count is specified, the totals since system bootup are
displayed.
If an interval is given, the number of events that have occurred in the
last interval seconds is shown. If no count is specified, this display is
repeated forever every interval seconds. Otherwise, when a count is
also specified, the information is displayed count times.

Other flags that may be specified include:

-c corefile
Uses the file corefile in place of Idev/kmem.
-n namelist
Use file namelist as an alternate symbol table instead of Ixenix.

-I lines
For the default display, repeat the header every lines reports
(default is 20).
The fields in the default report are:

procs
The number of processes which are:

r

In the run queue.

June 30, 1988

Page 1

VMSTAT(C)

VMSTAT(C)

b Blocked waiting for resources.

w Swapped out.
These values always reflect the current situation, even if the totals
since boot are being displayed.
paging
Reports on the performance of the demand paging system. Unless
the totals since boot are being displayed, this information is averaged over the proceeding interval seconds:
si Number of processes swapped in.
so Number of processes swapped out.
eh Page cache hits.
em
Page cache misses.
ffr Filesystem page reads.
swr
Swap area page reads.

sww
Swap area page writes.
ree
Number of pages reclaimed from the free list.
shf
Number of pages shared as copy-on-write after fork.
she
Number of pages shared due to cache hits.
epy
Number of shared pages copied.
pf Number of page faults.
system
Reports on the general system aCtIVIty. Unless the totals since
boot are being shown, these figures are averaged over the last
interval seconds:
in Number of (non-clock) device interrupts.

June 30, 1988

Page 2

VMSTAT(C)

VMSTAT(C)
sy Number of system calls.

cs Number of context switches.
cpu
Percentage of cpu cycles spent in various operating modes:

us User.
su System.
id Idle.
This information may not be displayed on some systems.
The -f and -s reports are a series of lines of the form:
number description
which means that number of the items described by description happened (either since boot or in the last interval seconds, as appropriate). These reports should be self-explanatory.
Files
/xenix
Default namelist.
/dev/kmem
Default source of statistics.
Notes
This utility is only applicable to
80386-based machines and may not
be included in your distribution.

See Also
fork(S), ps(C), pstat(C)

June 30, 1988

Page 3

VSH (C)

VSH (C)

Name
vsh - menu driven visual shell
Syntax
vsh

Description
vsh is a highly interactive, visually oriented shell which eases many
XENIX activities. The vsh features both standard and customizable
XENIX command menus and on-line help. The vsh displays information and menus in windows on the screen. To enter vsh, simply enter:

vsh
from a shell prompt. vsh can also be made a user's default shell by
changing their shell entry in /etc/passwd (the last colon-separated
field). Help is available from all menus by typing the question mark
character.
The very last line of the screen is a status line. The status line
displays the current pathname, the date, time and operating system
name. If you have new mail, the status line will indicate so. Above
the status line is the message line, which displays messages, error or
otherwise, from vsh.
A command menu is displayed at the bottom of the screen. The standard menu contains a range of commonly used XENIX commands.
Above the command menu is the output window. This window contains a scrolling display of the output from commands. This window
is not visible at start-up, but is displayed while running certain commands such as '='.
In the top of the screen is a window with a listing of the current working directory. To alter the size of this window, use the Window command from the main command menu. Items in the listing window may
be selected using standard key commands (q.v.). Two special key
commands are used with the listing window. The equals sign '='
('SHOW') key, displays the contents of the currently selected file or
directory. The minus sign '-' ('GOAWAY') key, returns you to the
listing window.

May 16, 1988

Page 1

VSH (C)

VSH (C)

Commands may be invoked in one of two ways. A command can be
selected by pressing the first letter of its name. Alternatively, press
the space bar. Each time the space bar is pressed, the next menu item
is highlighted. This highlighting indicates that the command has been
selected. Backspace moves to the previous selection.
Once a command is selected, press the return key. A menu is
displayed which gives the valid arguments for the particular command. The default choice is shown in parentheses, e.g.:
recursive: Yes (No)
To send the output to another program, you may enter a vertical bar in
the "output:" field of the commands' menu.
When the menu is filled in, press RETURN to start the command.

Main Menu Commands
The following menu options are available from the standard main
menu. Certain sub-commands are available under the Options selection. These are described in the next section.
Copy
Copy a file to a new file. Copy the contents of a directory to a new
directory.
Delete
Delete a file or directory.
Edit
Invoke an editor for a file. Default is the visual editor vi(C).
Help
Get help on diverse topics. A menu is displayed at the bottom of
the screen of available help topics.
Mail
Send or read XENIX mail.
Name
Rename a directory or file.
Options
Perform various commands. See OPTIONS section.
Print
Print file or files on systems' lineprinter.

May 16, 1988

Page 2

VSH (C)

VSH (C)

Quit
Quit the visual shell.
Run
Run a specified XENIX command or applications program.
View
View a specified file or directory listing. This file or directory listing will be displayed in the upper window. Use the vsh scrolling
commands to move around (see KEY COMMANDS Section).
Window
Reset upper window 'redraw' characteristics and height.
Options Subcommand

The Options selection on the main menu has several important commands grouped under the selections Directory, Filesystem, Output,
and Permissions. These ar€ as follows:
Directory

Make
Make a directory under current working directory.
Usage
Display disk usage by number of blocks in current working directory.
Filesystem

Create
Create a filesystem.
File sCheck
Check file system consistency.
Mount
Mount a file system on a specified mount-point.
SpaceFree
Report number of disk blocks available on all or some mounted file
systems.
Unmount
Unmount specified file system if it is not currently busy.

May 16, 1988

Page 3

VSH (C)

VSH (C)

Output
VShell
Echo vsh commands in output window (default).
XENIX
Echo actual XENIX commands in output window. For instance, if
running "Options Filesystem FilesCheck", the commandfsck will
be displayed in the output window if "Options Output Xenix" is
set.

Permissions
Change permissions on a file or directory.
Key Commands

The following keyboard commands allow editing of menus and fields,
and give access to various vsh features.

Move the cursor up one line.

Move the cursor down one line.

Move the cursor left one character.

Move the cursor right one character.

Scroll page up.

Scroll page down.

Scroll page left.

Scroll page right.

Home. Go to start of menu.

May 16,1988

Page 4

VSH (C)

VSH (C)


End. Go to the end of menu.

Cancel. Stop present operation and return to the main command
menu.

Start the present command.
, , or 
Move to and select entire contents of next field in command line.

Select next item in menu.
 or 
Select previous menu item. In editing command lists, deletes character. Replacement text may then be typed.
 or 
Delete selected character.

Move to next character to right of current cursor position.

Move to next character to left of current cursor position.

Move to next word to right of current cursor position.

Move to next word to left of current cursor position.

,

? Help. Request information about the selected command or command in progress at the time of the request.
Show. Display sub-directory listings and text files in directory listings. Display submenus for commands in main menu.
Goaway. Return listing window to current or parent directory after
a show command.
@ Display the Modify menu.

Redraw the screen.
Display filter menu.

May 16, 1988

PageS

VSH (C)

VSH (C)

Files

menu.def

standard menu definition file.

.mnu

extension
menus.

/usr/lib/vshNSHELL.HPP

help file

/usr/lib/vshNSHELL.HPT

yet another help file

for

customized

command

Notes

The use of wildcard characters (*, [,], and ?) to specify file names is
not supported by vsh. (Wildcard characters are discussed in the XENIX
Tutorial.)
The swtch character is reset by )lsh. It is not possible to switch to the
session manager, shl(C), while running vsh.
It is necessary to run vsh as superuser and select "help" in order to
initialize the help files. If this is not done, help is not available.

May 16,1988

Page 6

W(C)

W(C)

Name
w - Displays infonnation about who is on the system and what they
are doing.
Syntax
w [-hlqtw] [-n namelist] [-s swapdev] [-c corefile] [-u utmpfile]
[users ... ]
Description
w prints a summary of the current activity on the system, including
what each user is doing. The heading line shows the current time of
day, how long the system has been up, and the number of users logged
onto the system. On systems that maintain the necessary data, the
heading line also shows load averages. Load averages are the number
of processes in the run queue averaged over 1, 5, and 15 minutes.

The options are:
-h Don't print the heading or title lines.

-I
Long fonnat (default): For each user, w outputs the user's login
name, the tenninal or pseudo tenninal the user is currently using,
when the user logged onto the system, the number of minutes the
user has been idle (how much time has expired since the user last
typed anything), the CPU time used by all processes and their children attached to the tenninal, the CPU time used by the currently
active process, and the name and arguments of the currently active
process.
-q Quick fonnat: For each user, woutputs the user's login name, the
tenninal or pseudo tenninal the user is currently using, the number
of minutes the user has been idle, and the name of the currently
active process.
-t

Only the heading line is output (equivalent to uptime(C)).
-w Both the heading line and the summary of users is output.

-nnamelist
The argument is taken as the name of an alternate name list
( /xenix is the default).
-sswapdev
Uses the file swapdev in place of Idev/swap. This is useful when
examining a corefile.

May 16, 1988

Page 1

W(C)

W(C)

-ccorefile
Uses the file corefile in place of Idevlkmem.
-uutmpfile
The file utmpfile is used instead of letc!utmp as a record of who is
currently logged in.

If any users are given, the user summary is restricted to reporting on
those users.
Files

/xenix
/etc/utmp
/dev/kmem
/dev/swap
See Also

date(C), finger(C), ps(C), uptime(C), who(C), whodo(C)
Notes

The "currently active process" is only an approximation and is not
always correct. Pipelines can produce strange results, as can some
background processes. If w is completely unable to guess at the
currently active process, it prints "-."

May 16, 1988

Page 2

WAIT (C)

WAIT (C)

Name
wait - Awaits completion of background processes.
Syntax
wait
Description
Waits until all background processes started with an ampersand (&)
have finished, and reports Qn abnormal terminations.
Because the wait(S) system call must be executed in the parent process, the shell itself executes wait, without creating a new process.
See Also
sh(C)
Notes
Not all the processes of a pipeline with three or more stages are children of the shell, and thus cannot be waited for.

May 16, 1988

Page 1

WC(C)

WC(C)

Name
wc - Counts lines, words and characters.

Syntax
wc [ -Iwc ] [names]
Description
we counts lines, words and characters in the named files, or in the
standard input if no 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 newlines.

The options I, w, and c may be used in any combination to specify that
a subset of lines, words, and characters are to be reported. The default
is -Iwc.
When names are specified on the command line, they are printed
along with the counts.

May 16, 1988

Page 1

WHAT (C)

WHAT (C)

Name
what - Identifies files.
Syntax
what files

Description
what searches the given files for all occurrences of the pattern @(#)
and prints out what follows until the first tilde (-), greater-than sign
(», new-line, backslash (\) or null character. The sees command
get(CP) substitutes this string as part of the @(#) string.

For example, if the shell procedure in file print contains
# @(#)this is the print program
# @(#)syntax: print [files]
pr $* Ilpr
then the command
what print
displays the name of the file print and the identifying strings in that
file:
print:
this is the print program
syntax: print [files]
what is intended to be used with the get(CP) command, which
automatically inserts identifying information, but it can also be usec;l
where the information is inserted manually.

See Also
admin(CP), get(CP)

May 16, 1988

Page 1

WHO (C)

WHO (C)

Name
who - Lists who is on the system.
Syntax
who [ -uTHldtasq] [ file ]
who am i
who am I
Description
who can list the user's name, terminal line, login time, and the elapsed
time since activity occurred on the line; it also lists the process ID of
the command interpreter (shell) for each current XENIX system user.
It examines the /etc/utmp file to obtain its information. If file is
given, that file is examined. Usually, file will be /ete/wtmp, which
contains a history of all the logins since the file was last created.
who with the am i or am I option identifies the invoking user.

Except for the default -s option, the general format for output entries
is:
name [state] line time activity pid [comment] [exit]
With options, who can list logins, logoffs, reboots, and changes to the
system clock, as well as other processes spawned by the init process.
These options are:
-u

This option lists only those users who are currently logged in.
The name is the user's login name. The line is the name of the
line as found in the directory /dev. The time is the time that
the user logged in. The activity is the number of hours and
minutes since activity last occurred on that particular line. A
dot (.) 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 old. This field is useful when trying
to determine whether a person is working at the terminal or
not. The pid is the process ID of the user's shell. The comment
is the comment field. It can contain information about where
the terminal is located, the telephone number of the dataset,
the type of terminal if hard-wired, etc.

-T

This option is the same as the -u option, except that the state of
the terminal line is printed. The state describes whether someone else can write to that terminal. A plus character (+)

May 16, 1988

Page 1

WHO (C)

WHO (C)

appears if the tenninal is writable by anyone; a minus character (-) appears if it is not. Root can write to all lines having a
plus character (+) or a minus character (-) in the state field. If
a bad line is encountered, a question mark (?) is displayed.
-I

This option lists only those lines on which the system is waiting for someone to login. The name field is LOGIN in such
cases. Other fields are the same as for user entries except that
the state field does not exist.

-H

This option displays column headings above the regular output.

-q

This is a quick who, displaying only the names and the number
of users currently logged on. When this option is used, all
other options are ignored.

-d

This option displays all processes that have expired and have
not been respawned by init. The exit field appears for dead
processes and contains the tennination, and exit values (as
returned by waiteS»~, of the dead process. This can be useful in
detennining why a process tenninated.

-t

This option indicates the last change to the system clock (via
the date (C) command) by root. See su(C).

-a

This option processes the /etc/utmp file or the named file with
all options turned on.

-s

This option is the default and lists only the name, line, and
time fields.

Files
/etc/utmp
/etc/wtmp
/etc/inittab

See Also
date(C), 10gin(M), mesg(C), su(C), utmp(F), inittab(F), waiteS)

Notes
The options -A, -b, -p, and -r are listed in the usage message and are
accepted as legal options by who but do not do anything.

May 16, 1988

Page 2

WHODO (C)

WHODO (C)

Name
whodo - Detennines who is doing what.
Syntax

letc/whodo
Description
whodo produces merged, refonnatted, and dated output from the
who (C) and ps(C) commands.

See Also
ps(C), who(C)

May 16, 1988

Page 1

WRITE (C)

WRITE (C)

Name

write - Writes to another user.
Syntax
write user [ tty ]
Description
write copies lines from your terminal to that of another user. When
first called, it sends the message:

Message from your-logname your-tty
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, write displays:
(end of message)
on the other terminal and exits.
If you want to write to a user who is logged in more than once, the tty
argument may be used to indicate the appropriate terminal.
Permission to write may be denied or granted by use of the mesg(C)
command. At the outset, writing is allowed. Certain commands, in
particular nroff(CT) and pr(C), disallow messages in order to prevent
messy output.
If the character ! is found at the beginning of a line, write calls the
shell to execute the rest of the line as a command.
The following protocol is suggested for using write: when you first
write to another user, wait for him or her to write back before starting
to send. Each party should end each message with a distinctive signal
«0) for "over" is conventional), indicating that the other may reply;
(00) for "over and out" is suggested when conversation is to be terminated.

May 16, 1988

Page 1

WRITE (C)

WRITE (C)

Files
/etc/utmp

To find user

/bin/sh

To execute!

See Also
mail(C), mesg(C), who(C)

May 16,1988

Page 2

XARGS (C)

XARGS (C)

Name
xargs - Constructs and executes commands.

Syntax
xargs [flags] [ command [initial-arguments] ]
Description
xargs combines the fixed initial-arguments with arguments read from
the standard input to execute the specified command one or more
times. The number of arguments read for each command invocation
and the manner in which they are combined are determined by the
flags specified.
Command, which may be a shell file, is searched for using the shell
$PATH variable. If command is omitted, Ibin/echo is used.

Arguments read in from standard input are defined to be contiguous
strings of characters delimited by one or more blanks, tabs, or newlines; 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 of quoted strings, a backslash (\)
will escape the next character.
Each argument list is constructed starting with the initial-arguments,
followed by some number of arguments read from standard input
(exception: see -i flag). Flags -i, -I, and -n determine how arguments
are selected for each command invocation. When none of these flags
are coded, the initial-arguments are followed by arguments read continuously from standard input until an internal buffer is full, and command is executed with the accumulated args. This process is repeated
until there are no more args. When there are flag conflicts (e.g., -I vs.
-n), the last flag has precedence. Flag values are:
-Inumber

May 16, 1988

Command is executed for each number lines of
nonempty arguments from the standard input. This is
instead of the default single line of input for each command. The last invocation of command will be with
fewer lines of arguments if fewer than number remain.
A line is considered to end with the first newline unless
the last character of the line is a blank or a tab; a trailing blank/tab signals continuation through the next
nonempty line. If number is omitted, 1 is assumed.
Option -x is forced.

Page 1

XARGS(C)

XARGS (C)

-ireplstr

Insert mode: command is executed for each line from
the standard input, taking the entire line as a single arg,
inserting it in initial-arguments for each occurrence of
replstr. A maximum of 5 arguments in initialarguments may each contain one or more instances of
replstr. Blanks and tabs at the beginning of each line
are thrown away. Constructed arguments may not grow
larger than 255 characters, and option -x is also forced.
{ } is assumed for replstr if not specified.

-nnumber

Executes command , using as many standard input
arguments as possible, up to the number of arguments
maximum. Fewer arguments are used if their total size
is greater than size characters, and for the last invocation if there are fewer than number arguments remaining. If option -x is also coded, each number of arguments must fit in the size limitation, or xargs terminates execution.

-t

Trace mode: The command and each constructed argument list are echoed to file descriptor 2 just prior to
their execution.

-p

Prompt mode: The user is prompted whether to execute
command at each invocation. Trace mode (-t) is turned
on to display the command instance to be executed, followed by a ? .. prompt. A reply of y (optionally followed by anything), will execute the command; anything else, including a carriage return, skips that particular invocation of command.

-x

Causes xargs to terminate if any argument list would
be greater than size characters; -x is forced by the
options -i and -I. When neither of the options -i, -I, or
-n are coded, the total length of all arguments must be
within the size limit.

-ssize

The maximum total size of each argument list is set to
size characters; size must be a positive integer less than
or equal to 470. If -s is not coded, 470 is taken as the
default. Note that the character count for size includes
one extra character for each argument and the count of
characters in the command name.

-eeofstr

Eofstr is taken as the logical end-of-file string. Underscore (_) is assumed for the logical EOF string if -e is
not coded. -e with no eofstr coded turns off the logical
EOF string capability (underscore is taken literally).
xargs reads standard input until either end-of-file or the
logical EOF string is encountered.

May 16, 1988

Page 2

XARGS (C)

XARGS (C)

xargs terminates if it either receives a return code of -1 from, or if it

cannot execute, command. When command is a shell program, it
should explicitly exit (see sh(C)) with an appropriate value to avoid
accidentally returning with -1.
Examples

The following will move all files from directory $1 to directory $2,
and echo each move command just before doing it:
Is $1 I xargs -i -t mv $l/{ } $2/{ }
The following will combine the output of the parenthesized commands onto one line, which is then echoed to the end of file log:
(logname; date; echo $0 $*) I xargs »log
The user is prompted to enter which files in the current directory are to
be printed and prints them one at a time:
Is I xargs -p -1 Ipr
Or many at a time:
Is I xargs -p -1 I xargs Ipr
The following will execute diff(C) with successive pairs of arguments
originally entered as shell arguments:
echo $* I xargs -n2 diff

May 16, 1988

Page 3

YES (C)

YES (C)

Name
yes - Prints string repeatedly.
Syntax
yes [ string ]
Description
yes repeatedly outputs "y", or if a single string argument is given, arg
is output repeatedly. The command will continue indefinitely unless
aborted. Useful in pipes to commands that prompt for input and
require a' 'y" response for a yes. In this case, yes terminates when
the command it pipes to terminates, so that no infinite loop occurs.

May 16, 1988

Page 1

Contents
Miscellaneous (M)
intro
aliases,
aliases.hash,
maliases,
maliases.hash,
faliases
ascii
coffconv
console
daemon.mn
environ
error
getty
imagen,
imagen.sbs,
imagen.pbs,
imagen.spp,
imagen.remote
init, inir
ld

login
map chan
mapkey,
mapscrn, mapstr,
convkey
messages
mscreen
multiscreen
profile
sxt
systty
termcap
terminals
term info
termio
trchan
tty

Introduction to miscellaneous features and files.

Micnet aliasing files.
Map of the ASCII character set.
Convert 386 COFF files to XENIX format.
System console device.
Micnet mailer daemon.
The user environment.
Kernel error output device.
Sets terminal mode.

IMAGEN printer interface scripts.
Process control initialization.
Invokes the link editor.
Gives access to the system.
Configure tty device mapping.
Configure console screen mapping.
Description of system console messages.
multiscreens on serial terminals.
Multiple screens.
Sets up an environment at login time.
Pseudo-device driver.
System maintenance device.
Terminal capability data base.
List of supported terminals.
Terminal capability data base.
General terminal interface.
Translate character sets.
General terminal interface.

tz

ii

Time zone variable.

INTRO (M)

INTRO (M)

Name

intro - Introduction to miscellaneous features and files.
Description

This section contains miscellaneous information useful in maintaining
the system. Included are descriptions of files, devices, tables and programs that are important in maintaining the entire system.

May 16,1988

Page 1

ALIASES (M)

ALIASES (M)

Name
aliases, aliases.hash, maliases, maliases.hash, faliases - Micnet aliasing files.
Description
These files contain the alias definitions for a Micnet network. Aliases
are short names or abbreviations that may be used in the mail command to refer to specific machines or users in a network. Aliasing
allows a complex combination of site, machine, and user names to be
represented by a single name.
The aliases, maliases, and faliases files each define a different type of
alias. The aliases file defines the standard aliases which are names
for specific systems and users and, in some case, for commands. The
maliases file defines machine aliases, names, and paths for specific
systems. The faliases file defines forwarding aliases which are temporary names for forwarding mail intended for one system or user to
another.
The aliases.hash file is the hashed version of the aliases file created
by the aliashash command. The file is used by the mail command to
resolve all standard aliases and is identical to the aliases file except
for a hash table at the beginning of the file. The hash table allows for
more efficient access to the entries in the file. The aliases file need
only be present to generate the aliases.hash file. The aliases file is
not required to run the network.
The maliases.hash file is the hashed version of the maliases file. It is
an optional file created by executing the following command:
/usr/lib/mail/aliashash /usr/lib/mail/maliases
If the maliases.hash file is created, maliases is no longer necessary to
run the network. If the number of machines in the network is large,
and particularly if several types of networks are in use, it is recommended that the maliases file be hashed. In such a network, the
configuration is no longer homogeneous, aliases are likely to be fairly
complex and machine aliases are likely to differ between machines.
The use of machine aliases allows the standard alias file to be identical on all machines in the network. In such an environment, netutil
can only generate network files that can be used as a starting point.
The rest of the network maintenance should be done manually with a
text editor.
Each file contains zero or more lines. If hashing is to be performed, at
least one alias is required. Each line lists the alias and its meaning.
The alias meaning can have site, machine, and user login names and

May 16, 1988

Page 1

ALIASES (M)

ALIASES (M)

other aliases (its exact composition depends on the type of alias). A
colon (:) separating the alias and meaning is required.
In the aliases file, a line can have the forms:

alias: [ [site !]machine:]user[, [ [site!]machine:]user] ...
alias: [ [site!]machine:]command-pipeline
alias :error-message
Site and machine are the site and machine names of the system to
which the user belongs or on which the specified command is to be
executed. The site and machine names must end with an exclamation
mark (!) or colon (:) respectively, and must be defined in a systemid
file. A machine alias may be used in place of a site and machine name
if it is followed by a question mark.
User is a user login name or another alias. User names in a list must
be separated by commas. A newline may immediately follow a
comma. Spaces and tabs are allowed, but only immediately before or
after a comma or newline.
Command-pipeline is any valid command (with necessary arguments)
preceded by a pipe symbol ~) and enclosed in double quotation marks.
Spaces may separate the command and arguments, but there must be
no space between the first double quotation mark and the pipe symbol.
Error-message is any sequence of letters, numbers, and punctuation
marks (except a double quotation mark), preceded by a number sign
(#) and enclosed in double quotation marks.
In the faliases file, each line can have the same form as lines in the
aliases file except that no more than one user name can be given for
anyone alias. To prevent alias expansion on a remote machine, the
meaning should be escaped with "\\' " as in:

foo: mach?\\foo
Failure to do the escape may result in an infinite forwarding loop. If
this happens and the loop does not invoke a uucp connection, looping
will be detected, and the mail will be returned to the sender.
The alias.hash file has already been searched at this point. If there is
no explicit machine given as part of the meaning, the recipient will be
assumed to be local. After forward aliasing is complete, machine
aliasing is performed as necessary.

May 16, 1988

Page 2

ALIASES (M)

ALIASES (M)

In the maliases file, a line has the form:

alias: [ [site!]machine:]. "
Site and machine are the site and machine names for a specific net-

work and system. Multiple site and machine names direct messages
along the specified path of systems. If no site or machine name is
given, the alias is ignored.
Before the mail program sends a message, it searches the aliases.hash,
faliases, and maliases files to see if any of the names given with the
command are aliases. Each file is searched in tum (aliases.hash,
faliases, then maliases) and if a match is found, the alias is replaced
with its meaning. If no match is found, the name is assumed to be the
valid login name of a user on that machine. The search in the
aliases.hash file continues until all aliases have been replaced, so it is
possible for several replacements to occur for a single name. Alias
loops are now detected. If a loop exists, any recipients involved in the
alias loop are dropped from the mail recipient list, and an error message is displayed. The faliases file is searched once, from beginning
to end, even if it is empty. The maliases file is searched only if the
alias contains a machine alias.
When an alias is a user or a list of users, the mail command sends the
message to each user in the list. When it is a command-pipeline, the
mail command starts execution of the command on the specified
machine and sends the message as input. When the alias is an errormessage, the mail command ignores the message and instead, displays
the alias and its meaning at the standard error.
In all files, any line beginning with a number sign (#) is considered a
comment and is ignored.

As a special feature, any alias that contains a site name as the first
component of its meaning is automatically prepended with the
machine alias uucp? This alias may be explicitly defined in the
maliases file to help direct mail between networks to the system performing the uucp link.

Directives
Though alias directives are never included in an alias expansion, they
can be used to restrict the expansion to a class of users, forward the
unexpanded alias to another machine, or produce error messages. An
aliases file may include directives of the form:
testalias: $xalaska, mikem, georger, terih
sams: "$e ambiguous, use samst or samsm"

May 16, 1988

Page 3

ALIASES (M)

ALIASES (M)

Fields on the right-hand side of an alias (after the colon) that begin
with a dollar sign ($) character, are alias directives. Fields containing
any blanks or tabs must be enclosed in quotes. The directive must precede all normal right-hand fields as shown in the example above. The
character following the dollar sign ($) specifies the directive type:
$n 
$x 
$e 
$p 
$r 
None of the above directives are currently supported in
lusr/lib/mail/faliases.
Only
the
$e
is
supported
in
lusr/lib/mail/maliases and maliases.hash. Unrecognized directives
do not create error messages and are treated as if they do not exist.
The above directives are described in detail as follows:
$n For a user alias, this field should contain the full real name of the
user associated with the alias. For a group alias, a description of
the group should be given.
$x Causes the alias to be forwarded, unexpanded, to the machine

specified in this field. White space is only allowed immediately
following the $x. Since machine aliasing will be performed, the
appropriate machine alias must exist in the maliases file.

$e This field contains an error message to be printed. The left side of
the alias will be removed from the list of users to be aliased. An
alternate form of $e is #.
$p This field contains the character star (*) or a string of upper and
lowercase alphabetic characters. Each character indicates that the
user on the left-hand side of the alias belongs to a special "class"
of users. The star (*) character implies membership in all such
classes.

$r This field contains a string of upper and lower case alphabetic
characters, each character indicating a "class" of users to be
granted expansion permision. The absence of a $r field means that
any user can expand the alias. If the $r field exists, expansion is
only allowed if:
1)

the user requesting expansion has a $p field and it contains one or
more of the characters found in the $r field.

May 16, 1988

Page 4

ALIASES (M)

2)

the user has a $p field and it contains a "*".

3)

the real user ID is 0 (super user).

ALIASES (M)

If expansion is not allowed, no error messages result; the alias in ques-

tion is treated as if it were not present.
To send mail delivery problems to root, the following alias could be
used:
network: "$n the network mail recipient," root
To forward a group alias called testalias to a machine called alaska
and expand it there, the following alias may be used:
testalias: $xalaska, mikem, georger, terih
Files

/usr/lib/mail/aliases
/usr/lib/mail/aliases .hash
/usr/lib/mail/maliases
/usr/lib/mail/faliases
/usr/lib/mail/maliases.hash
See Also

aliashash(ADM), netutil(ADM), systemid(F), top(F)

May 16, 1988

Page 5

ASCII (M)

ASCII (M)

Name
ascii - Map of the ASCII character set.
Description
ascii is a map of the 7 -bit ASCII character set. It lists both octal and
hexadecimal equivalents of each character. It contains:
Octal
000
010
020
030
040
050
060
070
100
110
120
130
140
150
160
170

nul
bs
dIe
can
sp
(
0
8

001 soh
011 ht
021 del
031 em
041 !
051 )
061 1
071 9
lOlA
111 I
121 Q
131Y
141 a
151 i
161 q
171 y

@

H
P
X
-.
h
P
x

002
012
022
032
042
052
062
072
102
112
122
132
142
152
162
172

stx
nl
dc2
sub
"

r
z

003
013
023
033
043
053
063
073
103
113
123
133
143
153
163
173

02 stx
Oa nl
12 dc2
la sub
22 "
2a *
32 2
3a :
42 B
4a J
52 R
Sa Z
62 b
6a j
72r
7a z

03
Ob
13
Ib
23
2b
33
3b
43
4b
53
5b
63
6b
73
7b

*
2
:
B
J
R
Z
b
j

etx
vt
dc3
esc
#

+
3
;
C
K
S
[
c
k
s
{

004 eot
014 np
024 dc4
034 fs
044 $
054 ,
064 4
074 <
104 D
114 L
124 T
134\
144 d
154 1
164 t
174 I

005
015
025
035
045
055
065
075
105
115
125
135
145
155
165
175

enq
cr
nak
gs
%

5

=
E
M
U

1
e
m
u
}

006
016
026
036
046
056
066
076
106
116
126
136
146
156
166
176

ack
so
syn
rs
&

.
6

>
F
N
V
A

f
n
v
-

007
017
027
037
047
057
067
077
107
117
127
137
147
157
167
177

bel
si
etb
us
./
7
?
G
0
W
-

g
0

w
del

Hexadecimal
00
08
10
18
20
28
30
38
40
48
50
58
60
68
70
78

nul
bs
dIe
can
sp
(
0
8
@

H
P
X
-.
h
P
x

01
09
11
19
21
29
31
39
41
49
51
59
61
69
71
79

May 16, 1988

soh
ht
del
em
!
)
1
9
A
I
Q
Y
a
i
q

y

etx
vt
dc3
esc
#
+
3
;
C
K
S
[
c
k
s
{

04
Oc
14
Ie
24
2c
34
3c
44
4e
54
5c
64
6c
74
7e

eot
np
de4
fs

$
,
4

<
D
L
T
\
d
1
t

I

05
Od
15
1d
25
2d
35
3d
45
4d
55
5d
65
6d
75
7d

enq
cr
nak
gs

%
5

=
E
M
U

1
e
m
u
}

06
Oe
16
Ie
26
2e
36
3e
46
4e
56
5e
66
6e
76
7e

ack
so
syn
rs

&
.
6
>
F
N
V
A

f
n
v
-

07 bel
Of si
17 etb
If us
27 .2f /
37 7
3f ?
47 G
4f 0
57 W
5f 67 g
6f 0
77w
7f del

Page 1

A:)Cll (M)

A:::;Cll (M)

The extended 8-bit ASCII character set is shown here, again with the
octal and hexadecimal value of each character. The mapchan(C) utility allows access to these characters. Display of these characters is
dependent on the capabilities of the hardware device. (A::I indicates
an unassigned character.)
Octal
200 ~
210 hts
220 dcs
230.
240 nbsp
250 ..
260 0
270 >
300 A
310 E
320 f)
330 0
340 a
350 e
360 d
370 !1l

201
211
221
231
241
251
261
271
301
311
321

•
htj
pul
•

A
E
N

331

iT

j

©

±
I

341 a
351 e
361 ii
371 li

202.
212 vts
222 pu2
232.
242 ¢
252 ~
262 2
272 Q
302 A
312 E
322 6
332 U
342 a
352 e
362 0
372 U

203
213
223
233
243
253
263
273
303
313
323
333
343
353
363
373

~

pld
sts
csi
£
«
3

»

A

E

6

U

a
e

6
G

204
214
224
234
244
254
264
274
304
314
324
334
344
354
364
374

ind
plu
cch
st
a
-,
'
~

A

I

6
D

a
1
0
ii

205
215
225
235
245
255
265
275
305
315
325
335
345
355
365
375

nel
ri
mw
osc

¥
shy
I..l
Yz

A
f
6

Y
re
f

6

Y

206
216
226
236
246
256
266
276
306
316
326

336
346
356
366
376

ssa
ss2
spa
pm

I

®
~
~

.tE

I
b
I>
re
1
6

P

207
217
227
237
247
257
267

esa
ss3
epa
ape
§

.

277 i,

307
317
327
337
347
357
367
377

Y
I
•
B
C;

1
•

Y

Hexadecimal
80 ~
88 hts
90 des
98.
aO nbsp
a8 ..
bO 0
b8 >
cO A
c8 E
dO f)
d8 0
eO a
e8 e

81 •
89 htj
91 pul
99.
al j
a9 ©
bi ±
b9 I
cl A
c9 E
dl N
d9 iT
el a
e9 e

82 ~
8a vts
92 pu2
9a.
a2 ¢
aa ~
b2 2
ba Q
c2 A
ca e
d2 6
da U
e2 a
ea e

fOd

f1 ii
f9li

f20

83 m
8b pid
93 sts
9b csi
a3 £
ab «
b3 3
bb »
c3 A
cb E
d3 6
db U
e3 a
eb e
f36

fa

fuO

f8 !1l

u

84
8c
94
9c
a4
ac

ind
plu
cch
st
a
-,

b4'

be
c4
cc
d4
dc
e4
ec
f4
fc

~

A
I

6
D
ii

1
0
ii

85
8d
95
9d
a5
ad
b5
bd
c5
cd
d5
dd
e5
ed
f5
fd

nel
ri
mw
osc
¥
shy
I..l
Yz

A
f
6

Y

a
f

6

Y

86 ssa
8e ss2
96 spa
ge pm
a6 I
ae ®
b6 ~
be ~
c6 .tE
ce I
d6 b
de I>
e6 re
ee 1
f6 6
fe p

87 esa
8f ss3
97 epa
9f apc
a7 §
af
b7 .
bf i,
c7 y
cf I
d7.
df B
e7 c;
ef 1
f7~

ff Y

Files

/usr/pub/ascii

May 16, 1988

Page 2

COFFCONV(M)

COFFCONV(M)

Name
coffconv - Convert 386 COFF files to XENIX format.

Syntax
coffconv [ -v] [ -0 outfile ] coff-file
Description

coffconv converts 386 Common Object Format Files (COFF) to the
appropriate Xenix file format. If the file specified is a relocatable
object module it is converted. to Microsoft OMF format. If it is an
executable binary it is ~onverted to x.out format.
If the file is a UNIX System V archive, it is converted to XENIX

archive format and each file in the archive is converted as appropriate.
Any files in the archive which are not in 386 COFF format are copied
to the new archive unchanged. coffconv also creates a XENIX format
_.SYMDEF symbol directory for the new archive.
Options are:
-v

Verbose mode. The name of each member of an archive is
displayed as it is converted.

-0

Output file name. If no output file name is specified the default
is x.out.

Notes
Only essential symbol table information is converted. Source line
numbers and additional symbol information for use by the symbolic
debugger sdb will be ignored.
Note that coffconv only converts 386 COFF files. It is not possible to
convert 286 COFF files.

Files
x.out

Default output file

See Also
86rel(F), a.out(F), ar(F)

May 16, 1988

Page 1

CONSOLE(M)

CONSOLE(M)

Name
console - System console device.
Description
The file Idev/console is the device used by the system administrator
for system maintenance (single-user) operations. It is the tty to which
the first default shell is attached.
The system console device can be either a terminal (a serial adapter
device, ttyla) or a sytem keyboard display adapter monitor (ttyOl).
Many programs, such as the XENIX kernel, redirect error messages to
Idev/console. Initially Idev/console is linked to Idev/systty.
Files
/dev/console
See Also
boot(HW), systty(M), tty(M)
Notes
Idev/console should not be enabled, instead either the the display
adapter (ttyOl) or the serial adapter device (ttyla) should be enabled.
A serial console cannot be attached to a multiport card or one that
uses special drivers; it must be on a standard COMI card.
In any console escape sequence, the caret character C) will have 32
(decimal) subtracted from the ASCII value and will be interpreted as
the right angle bracket or "greater than" key.

May 16, 1988

Page 1

DAEMON.MN (M)

DAEMON.MN (M)

Name
daemon.mn - Micnet mailer daemon

Syntax
/usr/lib/mail/daemon.mn [-ex]
Description
The mailer daemon performs the "backend" networking functions of
the mail , rcp, and remote commands by establishing and servicing the
serial communication link between computers in a Micnet network.
When invoked, the daemon creates multiple copies of itself, one copy
for each serial line used in the network. Each copy opens the serial
line, creates a startup message for the LOG file, and waits for a
response from the daemon at the other end. The startup message lists
the names of the machines to be connected, the serial line to be used,
and the current date and time. If the daemon receives a correct
response, it establishes the serial link and adds the message "first
handshake complete" to the LOG file. If there is no response, the daemon waits indefinitely.
If invoked with the -x switch, the daemon records each transmission in
the LOG file. A transmission entry shows the direction of the
transmission (tx for transmit, rx for receive), the number of bytes
transmitted, the elasped time for the transmission (in minutes and
seconds), and the time of day of the transmission (in hours, minutes,
and seconds). Each entry has the form:

direction byte_count elasped_time time_oj_day
The daemon also records the date and time every hour. The date and
time have the same format as described for the date command.
If invoked with the -e switch, the daemon records all transmission
errors in the LOG file. An error entry shows the cause of the error preceded by the name of the daemon subroutine which detected the error.
The mailer daemon is normally invoked by the start option of the
netutil command and is stopped by the stop option.
During the normal course of execution, the mailer daemon uses
several files in the /usr/spool/micnet/remote directory. These files
provide storage for LOG entries, commands issued by the remote(C)
command, and a list of processes under daemon control.

May 16,1988

Page 1

DAEMON.MN (M)

DAEMON.MN (M)

Files
/usr/lib/mail/daemon.mn
/usr/spool/micnet/remote/*!LOG
/usr/spool/micnet/remote/*/mn
/usr/spool/micnet/remote/local/ mn *
/usr/spool/micnet/remote/lock
/usr/spool/micnet/remote/pids

See Also
netutil(ADM)

May 16,1988

Page 2

ENVIRON(M)

ENVIRON(M)

Name
environ - The user environment.
Description
The user environment is a collection of information about a user, such
as his login directory, mailbox, and terminal type. The environment is
stored in special "environment variables," which can be assigned
character values, such as names of files, directories, and terminals.
These variables are automatically made available to programs and
commands invoked by the user. The commands can then use the
values to access the user's files and terminal.
The following is a short list of commonly used environment variables.
PATH

Defines the search path for the directories containing
commands. The system searches these directories
whenever a user types a command without giving a full
pathname. The search path is one or more directory
names separated by colons (:). Initially, PATH is set to
:/bin:/usr/bin.

HOME

Names the user's login directory. Initially, HOME is set
to the login directory given in the user's passwd file
entry.

EXINIT

Used to set vi options. For Bourne Shell users the syntax is:
EXINIT = 'set options'
For C-Shell users the syntax is:
setenv EXINIT 'set options'
For example, a C-Shell user might place the following
command in $HOMEI.cshrc:
setenv EXINIT'set wm=24'
This would automatically set vi's wrapmargin option to
24.

TERM

May 16,1988

Defines the type of terminal being used. This information is used by commands such as more(C) which rely
on information about the capabilities of the user's terminal. The variable may be set to any valid terminal
name (see terminals (M» directly or by using the
tset (C) command.

Page 1

ENVfflON(M)

ENVfflON(M)
Defines time zone information. This information is used
by date(C) to display the appropriate time. The variable may have any value of the form:

TZ

xxxnzzzs; start/time, end/time

where xxx is standard local time zone abbreviation (1-9
characters), n is the standard time zone difference from
GMT,
and
may
be
given
as
hh:mm:ss
(hours:minutes:seconds), zzz is the summertime local
time zone abbreviation of 1-9 characters (if any), s is
the summertime time zone difference from GMT, and
may be given as hh:mm:ss (hours:minutes:seconds),
start and end specify the day to begin and end summertime based on one of four rules, and time is the
time of day the change to or from summertime occurs.
The rules for specifying start and end are:

In
n
Wn.d
Mm.n.d

1 based Julian day n

obased Julian day n
nth day of week d

nth day of week d in month m

For example:
EST5 :00:00EDT4:00:00;M4.1.0/2:00:00,Ml 0.5 .0/2:00:00.
Refer to the tz (M) manual page for more on TZ.

HZ

Defines, with a numerical value, the number of clock
interrupts per second. The value of this variable is
dependent on the hardware, and configured in the file
etc/default/login. If HZ is not defined, programs which
depend on this hertz value, such as pro/(CP) and
times(S), will not run.

LANG

Defines the language locale a user wishes to use. This
variable can be queried by applications and utilities to
determine how to display information, what language
to use for messages, sorting order, and other language
dependent functions.

The environment can be changed by assigning a new value to a variable. For Bourne shell, sh(C), an assignment has the following format:
name=value
For example, the assignment:
TERM=h29

May 16, 1988

Page 2

ENVIRON(M)

ENVIRON(M)

sets the TERM variable to the value "h29". The new value can be
"exported" to each subsequent invocation of a shell by exporting the
variable with the export command (see sh(C)) or by using the env(C)
command.
C-shell users make assignments using the setenv command. For
example:
setenv TERM h29
For more information, see csh(C).
A user may also add variables to the environment, but must be sure
that the new names do not conflict with exported shell variables such
as MAIL, PS 1, PS2, and IPs. Placing assignments in the .profile file is
a useful way to change the environment automatically before a session
begins. C-shell users can place assignments in their .cshrc or .login
files.
Note that the environment is made available to all programs as a
string of arrays. Each string has the format:
name=value
where the name is the name of an exported variable and the value is
the variable's current value. For programs started with a exec (S) call,
the environment is available through the external pointer environ. For
other programs, individual variables in environment are available
through getenv (S) calls.

See Also
csh(C), env(C), exec(S), getenv(S), 10gin(M), profile(M), sh(C), tz(M)

May 16, 1988

Page 3

ERROR (M)

ERROR (M)

Name
error - Kernel error output device.
Description
System error messages are collected and made available to error logging daemons through the Idev/error device. Idev/error is a readonly device which returns one error per read and no EOF character.
letc/rc uses a utility to read messages from Idev/error and write them
to the system error log file lusr/adm/messages:
letc/logger /dev /error lusr/adm/messages &
Any process can read Idev/error or arrange to be signaled when errors
are queued in Idev/error. The following ioctl causes the error device
to signal the process with SIGUSRI when an error message is queued
in Idev/error.
#inc1ude 
#inc1ude 
int fd;
fd = open("/dev/error", O_RDONLY);
ioct1(fd, EMSG_SIG, SIGUSRl);
Before exiting, the process must return Idev/error to its normal state.
Do this with the following ioctl:
ioct1(fd,EMSG_NOSIG, 0);
Panic error messages are not logged in Idev/error.
Files
/dev/error
See Also
messages(M)

May 16, 1988

Page 1

GE1TY(M)

GE1TY(M)

Name
getty - Sets terminal type, modes, speed, and line discipline.
Syntax
/etc/getty [ -h ] [ -t timeout] line [ speed [ type [ linedisc ] ] ]
/etc/getty -c file
Description
getty is a program that is invoked by init(M). It is the second process
in the series, (init-getty-login-shell), that ultimately connects a user
with the XENIX system. Initially getty displays the login message
field for the entry it is using from /etc/gettydefs. getty reads the user's
login name and invokes the login (M) command with the user's name
as argument. While reading the name, getty attempts to adapt the system to the speed and type of terminal being used.
Line is the name of a tty line in /etc/ttys to which getty is to attach
itself. getty uses this string as the name of a file in the /dev directory
to open for reading and writing. The -t flag, plus timeout in seconds,
specifies that getty should exit if the open on the line succeeds and no
one enters anything in the specified number of seconds. The optional
second argument, speed, is a label to a speed and tty definition in the
file /etc/gettydefs. This definition tells getty what speed to initially
run, what the login message should look like, what the initial tty settings are, and what speed to try next should the user indicate that the
speed is inappropriate (by entering a BREAK character). The default
speed is 300 baud. The optional third argument, type, is a character
string describing to getty what type of terminal is connected to the line
in question. getty understands the type none-any CRT or normal terminal unknown to the system. This is the default.

For terminal type to have any meaning, the virtual terminal handlers
must be compiled into the operating system. They are available, but
not compiled in the default condition. The optional fourth argument,
linedisc , is a character string describing which line discipline to use in
communicating with the terminal. Again the hooks for line disciplines are available in the operating system but there is only one
presently available, the default line discipline, LDISCO.
When given no optional arguments, getty sets the speed of the interface to 300 baud, specifies that raw mode will be used (awaken on
every character), that echo will be suppressed, either parity allowed,
that new-line characters will be converted to carriage return-line feed,
and that tab expansion is performed on the standard output. It displays
the login message before reading the user's name a character at a time.
If a null character (or framing error) is received, it is assumed to be
the result of the user pushing the BREAK key. This will cause getty to

May 16, 1988

Page 1

GETTY(M)

GETTY(M)

attempt the next speed in the series. The series that getty tries is
determined by what it finds in /etc/gettydefs.
The user's name is terminated by a new-line or carriage-return character. The latter results in the system being set to treat carriage returns
appropriately (see ioctl (S».
The user's name is scanned to see if it contains any lower-case alphabetic characters. getty suggests that the user use all lower-case characters. If the user uses upper case characters, the system is told to map
any future upper-case characters into the corresponding lower-case
characters.
Finally, the login-program from /etc/gettydefs is called with the user's
name as an argument. Additional arguments may be entered after the
login name. These are passed to the login-program. The default
login-program, /etc/login, places them in the environment (see
login (M».
A check option is provided. When getty is invoked with the -c option
and file, it scans the file as if it were scanning /etc/gettydefs and
prints out the results to the standard output. If there are any unrecognized modes or improperly constructed entries, it reports these. If the
entries are correct, it displays the values of the various flags. See
ioctl (S) to interpret the values. Note that some values are added to the
flags automatically.
Notes
Changes have been made to support using the line for uucico, cu, and
ct; that is, the line can be used in both directions. The getty will allow
users to login, but if the line is free, uucico, CU, or ct can use it for
dialing out. The implementation depends on the fact that uucico, CU,
and ct create lock files when devices are used. When the "open()"
returns on a modem-control-line (or the first character is read on a
non-modern-control line), the status of the lock file indicates whether
the line is being used by uucico, CU, ct, or someone trying to login.
Note that in the non-modern-control case, several 
characters may be required before the login message is output. The
human users will be able to handle this slight inconvenience. uucico
trying to login will have to be told by using a login script similar to
the following:
"" \r\d\r\d\r\d\r in:--in: ...
where ... is whatever would normally be used for the login sequence.
getty only behaves in this special UUCP mode (waiting for a first
character, checking for a lock file) if the line is shared between dial-in
and dial-out (i.e., only if there is an entry for that line in
/usr/lib/uucp/Devices. If the UUCP package is not installed, then

May 16, 1988

Page 2

GETTY(M)

GETTY(M)

getty will not behave in this manner. If a line is shared between dialin and dial-out and there is a dialer on the line, then getty will reinitialize the line to dial-in prior to opening the the line by running
dialer -h, where dialer is the dialer program given in the Devices
entry (see dial(M», or by running /usrllib/uucp/uuchat with the reinitialization chat specified by an ampersand (&) entry in
/usrllib/uucp/Dialers. getty generates no error message if this reinitialization fails.

The -h flag is used when ct invokes getty itself; it instructs getty to
bypass this special UUCP function, since ct has already opened and
locked the line.
Files
/etc/gettydefs
/etc/ttys
/usr/lib/uucp!Devices
/usr/lib/uucp!Dialers
/usr/lib/uucp/LCK.. ttyXX
See Also
init(M), 10gin(M), ioctl(S), gettydefs(F), ttys(F), ct(C), dial(M), cu(C),
uucico(ADM).

May 16, 1988

Page 3

IMAGEN(M)

IMAGEN(M)

Name
imagen.sbs, imagen.pbs, imagen.spp, imagen. remote - IMAGEN
printer interface scripts.

Syntax
imagen.sbs request user title copies options files .. .
imagen.pbs request user title copies options files .. .
imagen.spp request user title copies options files .. .
imagen.remote request user title copies options files ...
Description
The imagen scripts are the XENIX System V spooler interface programs for IMAGEN printers. They accept the following types of files
for printing: troft(CT) input, troft output (e/A{f format), imPRESS
format, DVI format (generally produced by), and straight text. The
proper imagen interface script is normally installed using
Ipadmin (ADM).

imagen.sbs uses the "serial byte stream protocol" provided by isbs.
imagen.pbs uses the "parallel byte stream protocol' , provided by ipbs.
imagen.spp uses the serial "sequence packet protocol" provided by
ips (ADM).
imagen.remote sends the print job to a remote computer using either
uux(C) or remote (C). The exact command to use is defined in the file
/usr/spoolilpiremote, and the "printer" device defined by Ipadmin
(using the -v flag) should be /dev/null.
Recognized Ip(C) options are:
-oli
The input files are in imPRESS format but with no document
header.

-olp
The input files are text for line printing.
-olfi
The input files are in full imPRESS format with a document header.
-olt
The input files are troffinput.

May 16,1988

Page 1

IMAGEN(M)

IMAGEN(M)

-oldvi
The input files are DVI format ( output), to be filtered through
dviimp(CT).
-ole

The input files are trojfoutput (C/Arr format), to be filtered through
catimp (CT).

-otflag
Pass option flag to troJf.
-oeflag
Pass option flag to catimp.
-ovflag
Pass option flag to dviimp .
-oiflag
flag is an IMAGEN printer control setting:
1 Print one page per sheet of paper.
2 Print two pages per sheet of paper.

o

Print outlines around the page.

r

Print pages opposite (reverse) of usual order.

e Do not collate pages of multiple copies.
R Print rules on pages (one every two lines).

J Suppress printing the job header (banner) page.
m Do not print detailed error messages on the banner page.

j

Enables jam resistance measures. The default jam resistance
action is controlled by the setting of JAMPROOF in the file
/ete/default/imagen.

Not all control settings are meaningful for every IMAGEN printer
language.
-ob

No banner information about the local user or host should be generated.

-ohhost
The computer responsible for this job is host.

May 16, 1988

Page 2

IMAGEN(M)

IMAGEN(M)

-ouuser
The person responsible for this job is user.

All of the imagen interface scripts read /etc/default/imagen to obtain
various default settings. The values obtained, and the default values,
are:
JAMPROOF=no
Whether or not paper-jam resistance measures should be used. If
such steps are taken, printing is usually slowed down.
The values of the default settings can be changed to reflect the local
system configuration. If /etc/default/imagen does not exist or cannot
be read, the above default values are used.
Files
/usr/bin/itroff
trojffor an IMAGEN printer.
/usr/bin/catimp
Converts from trojfC/A{f output to imPRESS format.
/usr/bin/dviimp
Converts from DVI to imPRESS format.
/usr/lib/ips
(imagen.spp) IMAGEN serial sequence packet protocol.
/usr/lib/isbs
(imagen.sbs) IMAGEN serial byte stream protocol.
/usr/lib/ipbs
(imagen.pbs) IMAGEN parallel byte stream protocol.
/usr /spool/lp/ remote
(imagen. remote ) Mapping from local printer name to remote or
uux command. Each line is in the format:
printer: command
where printer is the name of the "local" IMAGEN printer, and
command is either a remote or uux invocation of lp on another
machine. The other machine must be configured so that a remote
lp is allowed, and the local command should specify whatever
options are necessary so that the input can be piped into it. Additional flags to lp are appended onto the end of command by
imagen. remote . A typical remote command would be:
printer: remote - machine Ip -dimagen

May 16, 1988

Page 3

IMAGEN(M)

IMAGEN(M)

and a typical uux command would be:

printer: uux - machine!lp -dimagen

See Also

catimp(CT), dviimp(CT), imprint(C),
ips(ADM), itroff(CT), remote(C), uux(C)

Ip(C),

Ipadmin(ADM),

Author
IMAGEN Corporation.

May 16, 1988

Page 4

INIT(M)

INll (M)

Name
init, inir - Process control initialization.

Syntax
letc/init
letc/inir
Description
The init program is invoked as the last step of the boot procedure and
as the first step in enabling terminals for user logins. init is one of
three programs (in it , getty (M), and login (M)) used to initialize a system for execution.
init creates a process for each terminal on which a user may log in. It
begins by opening the console device, Idev/console, for reading and
writing. It then invokes a shell which prompts for a password to start
the system in "maintenance mode". If at this prompt an EOF is read,
the system proceeds toward "multi-user mode". If the root pasword is
entered, a shell is started and attached to the console. When this shell
is terminated the system proceeds toward "multi-user mode".

If the system was automatically loaded at boot time, init will be
passed a -a flag when it is started. in it also passes this flag to the programs it runs so they may choose to behave differently under
autoboot(ADM) conditions.
The user may boot and the file system may be dirty. In this case, inir
prompts the user, asking whether to do an fsck (ADM) (See fsck
(ADM) for more information.)
The user may boot and the filesystem may be clean. In this case, init
reads commands from the letc/rc file. This is followed by the
"multi-user/rc" and the "getty/login" procedures as documented
below.
"multi-userlrc" procedure: Once the filesystem is clean, the shell terminates, and init performs several steps to begin normal operation. It
invokes a shell and reads the commands in the /etc/rc file. This command file performs housekeeping tasks such as removing temporary
files, mounting file systems, and starting daemons. Then it reads the
file letc/ttys and forks several times to create a process for each terminal device in the file. Each line in the letc/ttys lists the state of the
line (0 for closed, 1 for open), the line mode, and the serial line (see
ttys (F)). Each process opens the appropriate serial line for reading
and writing, assigning the file descriptors 0, 1, and 2 to the line and
establishing it as the standard input, output, and error files. If the
serial line is connected to a modem, the process delays opening the

May 16, 1988

Page 1

INIT(M)

INIT(M)

line until someone has dialed up and a carrier has been established on
the line.
"gettyllogin procedure: Once init has opened a line, it executes the
getty program, passing the line mode as an argument. The getty program reads the user's name and invokes login(M) to complete the
login process (see getty(M) for details). init waits until the user logs
out by typing ASCII end-of-file (Ctrl-D) or by hanging up. It responds
by waking up and removing the former user's login entry from the file
utmp, which records current users, and makes a new entry in the file
wtmp, which is a history of logins and logouts. Then the corresponding line is reopened and getty is reinvoked.
1/

init has special responses to the hangup, interrupt, and quit signals.
The hangup signal SIGHUP causes init to change the system from normal operation to maintenance mode. The interrupt signal SIGINT
causes init to read the ttys file again to open any new lines and close
lines that have been removed. The quit signal SIGQUIT causes init to
disallow any further logins. In general, these signals have a significant effect on the system and should not be used by a inexperienced
user. Instead, similar functions can be safely performed with the
enable (C), disable (C), and shutdown (ADM) commands.

Files
/dev/tty*
/etc/utmp
/usr/adm/wtmp
/etc/defaultfboot
/etc/ttys
/etc/rc
/etc/gettydefs
See Also
autoboot(ADM), telenit(ADM), disable(C), enable(C), 10gin(M),
kill(C) sh(C), shutdown(ADM), ttys(F) , getty(M), gettydefs(F) ,
inittab(F)
Diagnostics
If seven or more getty processes are started on the same line in five
minutes or less, init writes an error message to Idev/console and
refuses to start another getty on that line for at least 30 minutes. If
desired, init will try again immediately if a SIGINT is sent.

Notes
init can only be invoked by the kernel as process 1. It cannot be
invoked from the shell prompt.

May 16, 1988

Page 2

INIT(M)

INIT(M)

For users more familiar with the telenit approach to terminal administration, inittab is provided. For more information, see telenit(ADM)
and inittab(F).

May 16, 1988

Page 3

LD(M)

LD(M)

Name
ld - Invokes the link editor.
Syntax
Id [ options] filename ...

Description
ld is the XENIX link editor. It creates an executable program by combining one or more object files and copying the executable result to
the file a.out. The filename must name an object or library file.
These names must have the ".0" (for object) or ".a" (for archive
library) extensions. If more than one name is given, the names must
be separated by one or more spaces. If errors occur while linking, ld
displays an error message; the resulting a.out file is unexecutable.
ld concatenates the contents of the given object files in the order given
in the command line. Library files in the command line are examined
only if there are unresolved external references encountered from previous object files. Library files must be in ranlib (CP) format, that is,
the first member must be named __ .SYMDEF, which is a dictionary
for the library. The library is searched iteratively to satisfy as many
references as possible and only those routines that define unresolved
external references are concatenated. Object and library files are processed at the point they are encountered in the argument list, so the
order of files in the command line is important. In general, all object
files should be given before library files. ld sets the entry point of the
resulting program to the beginning of the first routine.

There are the following options:
-Anum
Creates a standalone program whose expected load address (in
hexadecimal) is num. This option sets the absolute flag in the
header of the a.out file. Such program files can only be executed as
standalone programs. Options -A and -F are mutually exclusive.
-Bnum
Sets the text selector bias to the specified hexadecimal number.

-c num
Alters the default target CPU in the x.out header. num can be 0, 1,
2, or 3 indicating 8086, 80186, 80286 and 80386 processors,
respectively. The default on 8086/80286 systems is O. The default
on 80386 systems is 3. Note that this option only alters the default;
if object modules containing code for a higher numbered processor
are linked, then that will take precedence over the default.

May 16, 1988

Page 1

LD(M)

LD(M)

-C

Causes the link editor to ignore the case of symbols.
-Dnum
Sets the data selector bias to the specified hexadecimal number.

-C5
Turns on a bit to invoke lusr/lib/coffconv with the linker, producing an x.out COFF-compatible binary.

-ex
Turns offbit set with -C5, which resides in the header of the object
file.
-F num
Sets the size of the program stack to num bytes where num is a
hexadecimal number. This option is ignored for 80386 programs
which have a variable sized stack. By default 8086 programs have
a variable stack located at the top of the first data segment, and
80286 programs have a fixed size 4096 byte stack. The -F option
is incompatible with the -A option
-i

Creates separate instruction and data spaces for small model programs. When the output file is executed, the program text and data
areas are allocated separate physical segments. The text portion
will be read-only and shared by all users executing the file.
-La
Sets advisory file locking. Advisory locking is used on files with
access modes that do not require mandatory locking.
-Lm
Sets mandatory file locking. Mandatory file locking is used on files
that cannot be opened by more than one user at the same time.
-m name
Creates a link map file named name that includes public symbols.
-Ms
Creates a small model program and checks for errors, such as fixup
overflow. This option is reserved for object files compiled or
assembled using the small model configuration. This is the default
model if no -M option is given.
-Mm
Creates middle model program and checks for errors. This option
is reserved for object files compiled or assembled using the middle
model configuration. This option implies -i.

May 16, 1988

Page 2

LD(M)

LD(M)

-MI
Creates a large model program and checks for errors. The option is
reserved for object files compiled using the large model
configuration. This option implies -i .
-Mx
Specifies the memory model. x can have the following values:
s
small
m
middle
I
large
h
huge
e
mixed
-nnum
Truncates symbols to the length specified by num.

-N num
Sets the page size to hex-num (which should be a multiple of 512) the default is 1024 for 80386 programs. 8086/80186/80286 programs do not normally have page-aligned x.out files and the default
for these is O.
-0

name
Sets the executable program filename to name instead of a.out.

-p
Disables packing of segments

-r Invokes the incremental linker, llib/ldr , with the arguments
passed to Id to produce a relocatable output file.

-R Ensures that the relocation table is of non-zero size. Important for
8086 compatibility.
-Rd num
Specify the data segment relocation offset (80386 only). num is
hexadecimal.

-Rt num
Specify the text segment relocation offset (80386 only) num is hexadecimal.

-s
Strips the symbol table.
-Snum
Sets the maximum number of segments to num. If no argument is
given, the default is 128.

-u symbol
Designates the specified symbol as undefined.

May 16, 1988

Page 3

LD(M)

LD(M)

-v num
Specifies the XENIX version number. Acceptable values for num
are 2, 3, or 5; 5 is the default.
ld should be invoked using the cc(CP) instead of invoking it directly.
Cc invokes ld as the last step of compilation, providing all the necessary C-Ianguage support routines. Invoking ld directly is not recom-

mended since failure to give command line arguments in the correct
order can result in errors.
Files

/bin/ld
See Also

ar(CP), cc(CP), Id(CP), masm(CP), ranlib(CP)
Notes

The user must make sure that the most recent library versions have
been processed with ranlib(CP) before linking. If this is not done, ld
cannot create executable programs using these libraries.

May 16,1988

Page 4

LOGIN(M)

LOGIN(M)

Name
login - Gives access to the system.
Description
The login command is used at the beginning of each terminal session
to identify the user and allow them access to the system. It cannot be
invoked except when a connection is first established, or after the previous user has logged out by sending an end-of-file ( Ctrl-D ) to his initial shell.
login prompts for user name, and if appropriate, a password. Echoing
is turned off (where possible) while the password is being entered, so
it will not appear on the written record of the session.

It is possible to assign an additional password to dial-in lines for additional security. This is discussed below in "Dial-in Passwords."
If the login sequence is not completed successfully within a certain
period of time (e.g., one minute), the user is returned to the "login:"
prompt or silently disconnected from a dial-in line.
After a successful login, accounting files (letclutmp and fetclwtmp) are
updated, the user is notified if they have mail, and the start-up shell
files (i.e., .profile for the Bourne shell or .login for the C-shell) if any,
are executed.
login checks /etc/default/login for ULIMIT (maximum file size in
512 byte blocks, default is 2,097,152), and for environment variables,
such as TZ (time zone), HZ (hertz), and ALTSHELL (allows other
than sh shell types). Other entries sometimes found in
/etc/default/login are IDLEWEEKS, CONSOLE, and PASSREQ.
IDLEWEEKS=n, where n is a number of weeks, works in conjunction
withpwadmin(ADM). If a password has expired, the user is prompted
to choose a new one. If it has expired beyond IDLEWEEKS, the user
is not allowed to log in, and must consult system administrator. The
CONSOLE=/dev/??? entry means that root can only log in on the
/dev listed. PASSREQ=YES, if set, forces the user to select a password if they do not have one.
login initializes the user and group IDs and the working directory,
then executes a command interpreter (usually sh(C)) according to
specifications found in the /etc/passwd file. Argument of the command interpreter is a dash (-) followed by the last component

°

May 16, 1988

Page 1

LOGIN(M)

of the

LOGIN(M)

interpreter's pathname.

The

basic

environment

(see

environ (M» is initialized to:

HOME= your-login-directory
PATH=:/bin:/usr/bin
SHELL=last fie ld of passwd entry
MAIL=/usr/spooIlmaiIlyour-login-name
TZ=timezone-specification

Initially, umask is set to octal 022 by login.
If a user's UID is 0 (i.e. if this is the superuser), the PATH variable is
set to SUPATH, if SUPATH is specified in fetcldefaultl login. If it is

not, PATH is set to the following:
PATH=:/bin :/usr/bin:/etc
It is not advisable for SUPATH to include the current directory symbol
(. ).
Dial-in Passwords
If desired, special dial-in passwords can be defined for selected tty

lines, requiring selected classes of users to input these passwords.
Logging information, including the last time of connection, can be
stored for later use.
Specific dial-in lines that require passwords are defined in the file
letc/dialups. The actual dialup passwords are kept in the file
letc/d _passwd. The password must be generated /etc/passwd an
transferred.
The first field ("user name") in /etc/d passwd is the name of a shell
program (for example, /bin/sh) used in-/etc/passwd. If the login shell
of the user attempting to log in (on a tty line listed in /etc/dialups) is
listed in letc/d passwd, then the user is prompted for the dial-in password stored in letcldyasswd. (A shell name of "*,, in /etc/d_passwd
specifies the default dialup password.)
A sample letc/d _passwd file might be:
*::Default dialup password
lusr/lib/uucp/uucico: :UUCP dialup password (none)
/bin/rsh::Restricted shell user dialup password

To enable time-of-Iogin recording (and reporting of the time of last
login at each login), create the log file /usr/adm/lastlog. This file
should be owned by Ibin and group bin; the permissions can be restricted to 600 if desired. If this file exists and the user is not currently
logged in, the finger(C) utility will report the time of last login.

May 16,1988

Page 2

LOGIN(M)

LOGIN(M)

Files
/etc/utmp

Information on current logins

/etc/wtmp

History of logins since last multiuser

/usr/spoo l/mail/name

Mailbox for user name

/etc/motd

Message of the day

/etc/default/login

Default values for environment
variables

/etc/passwd

Password file

/etc/profile

System profile

$HOME/. profile

Personal profile

See Also
environ(M), getty(ADM), machine(M), mail(C), newgrp(C),
passwd(C), passwd(F), profile(M), su(C), sh(C), ulimit(S), umask(C),
who(C).

Diagnostics
Login incorrect
The user name or the password is incorrect.
No shell, cannot open passwordfile, no directory:
Your account has not been properly set up.
Your password has expired. Choose a new one.
Password aging is implemented and yours has expired.

Notes
Only the superuser may execute login from a shell.
As explained in machine(M), when setting ULIMIT in the
fete/default/login file on file systems with 1024 byte blocks (see
machine(M», be sure to specify even numbers, as the ULIMIT variable accepts a number of 512-byte blocks. The default is 2,097,152
blocks, or 1 gigabyte. Use this variable to increase or decrease the
maximum allowable file size.

May 16, 1988

Page 3

MAPCHAN(M)

MAPCHAN(M)

Name
mapchan - Configure tty device mapping.
Syntax
mapchan [-ans] [ -f mapfile ] [ channels ... ]
mapchan [ [ -0] [ -d ] ] [ channel]
Description

mapchan configures the mapping of information input and output of
XENIX. The mapchan utility is intended for users of applications that
employ languages other than English (character sets other than 7-bit
ASCII).
mapchan translates codes sent by peripheral devices, such as terminals, to the internal character set used by the XENIX system. mapchan
can also map codes in the internal character set to other codes, for output to peripheral devices (such as terminals, printers, console screen,
etc.). Note that PC keyboard configuration is accomplished through
the mapkey (M) utility.
mapchan has several uses: to map a channel (-a or -s); to unmap a
channel (-n and optionally -a); or to display the map on a channel
(optionally -0, -d, channels).
mapchan with no options displays the map on the user's channel. The
map displayed is suitable as input for mapchan.
The options are:
-a

when used alone, sets all channels given in the default file
(/etc/default/mapchan) with the specified map. When used
with -n, it refers to all channels given in the default file. Superuser maps or unmaps all channels, other users map only channels they own. -a can not be used with -d, -0, or -so

-d

causes the mapping table currently in use on the given device,
channel, to be displayed in decimal instead of the default hexadecimal. An ASCII version is displayed on standard output. This
output is suitable as an input file to mapchan for another channel. Mapped values are displayed. Identical pairs are not output. -d can not be used with -a, -f, -n, -0, or -so

-f

causes the current channel or list of channels to be mapped with
mapfile. -f can not be used with -d, -n, -S, or -0.

May 16, 1988

Page 1

MAPCHAN(M)

MAPCHAN(M)

-n

causes null mapping to be performed. All codes are input and
output as received. Mapping is turned off for the user's channel
or for other channels, if given. -a used with -n will tum mapping off on all channels given in the default file. This is the
default mapping for all channels unless otherwise configured. n can not be used with -d, -f, -0, or -so

-0

causes the mapping table currently in use on the given device,
channel, to be displayed in octal instead of the default hexadecimal. An ASCII version is displayed on standard output. This
output is suitable as an input file to map chan for another port.
Mapped values are displayed. Identical pairs are not output. -0
can not be used with -a, -d, -f, -n, or -so

-s

sets the user's current channel with the mapflle given in the
default file. -s can not be used with any other option.

The user must own the channel in order to map it. The super-user can
map any channel. Read or write permission is required to display the
map on a channel.
Each tty device channel (display adapter and video monitor on computer, parallel port, serial port, etc.) can have a different map. When
XENIX boots, mapping is offfor all channels.

mapchan is usually invoked in the /etc/rc file. This file is executed
when the system enters multi-user mode and sets up the default mapping for the system. Users can invoke mapchan when they log in by
including a mapchan command line in their .profile or .login file. In
addition, users can remap their channel at any time by invoking mapchan from the command line. channels not listed in the default file are
not automatically mapped. channels are not changed on logout. Whatever mapping was in place for the last user remains in effect for the
next user, unless they modify their .profile or .login file.
For example, the default file /etc/default/mapchan can contain:
tty02
tty1a
tty2a
lp

ibm
wy60.ger
ibm

The default directory containing map/ties is /usrllib/mapchan. The
default directory containing channel files is /dev. Full pathnames may
be used for channels or mapfiles . If a channel has no entry, or the
entry field is blank, no mapping is enabled on that channel. Additional channels added to the system, (for example, adding a serial or
parallel port) are not automatically entered in the mapchan default
file. If mapping is required, the system administrator must make the
entries.

May 16,1988

Page 2

MAPCHAN(M)

MAPCHAN(M)

The fonnat of the mapfiles is documented in the mapchan(F) manual
page.
Using a Mapped channel

The input infonnation is assumed to be 7- or 8-bit codes sent by the
peripheral device. The device may make use of "dead" or "compose" keys to produce the codes. If the device does not have dead or
compose keys, these keys can be simulated using mapchan.
One to one mapped characters are displayed when the key is pressed,
and the mapped value is passed to the kernel.
Certain keys are designated as dead keys in the mapfile. Dead key
sequences are two keystrokes that produce a single mapped value that
is passed to the kernel. The dead key is usually a diacritical character,
the second key is usually the letter being modified. For example, the
sequence / e could be mapped to the ASCII value OxE9, and display as

e.

One key is designated as the compose key in the mapfile. Compose
key sequences are composed of three keystrokes that produce a single
mapped value that is passed to the kernel. The compose key is usually
a seldom used character or ctrl-letter combination. The second key is
usually the letter being modified. The third key may be another character being combined, or a diacritical character. For example, if '@' is
the compose key, the sequence @ c 0 could be mapped to the ASCII
value OxA9, and display as ©.
Characters are not echoed to the screen during a dead or compose
sequence. The mapped character is echoed and passed to the kernel
once the sequence is correctly completed.
Characters are always put through the input map, even when part of
dead or compose sequences. The character is then checked for the
internal value. The value may also be mapped on output. This should
be kept in mind when preparing map files.
The following conditions will cause an error during input:
non-recognized (not defined in the mapfile) dead or compose sequence
restarting a compose sequence before completion by pressing the
compose key in the middle of a dead or compose sequence. This is an
error, but a new compose sequence is initiated.
If the mapfile contains the keyword beep, a bell sounds when either of
the above conditions occurs. In either case, the characters are not
echoed to the screen, or passed to the kernel.

May 16,1988

Page 3

MAPCHAN(M)

MAPCHAN(M)

In order to allow for character sequences sent to control the tenninal
(move the cursor, and so on) rather than to print characters on the
screen, mapchan allows character sequences to be specified as special
sequences which are not passed through the nonnal mapping procedure. Two sections may be specified, one for each of the input (keyboard) and output (screen) controls.

Character Sets
The internal character set used by XENIX is defined by the mapfiles
used. By default, this is the ISO 8859/1 character set which is also
known as the dpANS X3.4.2 and ISO(fC97/SC2. It supports most of
the Latin alphabet and can represent most European languages.
Several partial map files are provided as examples. They must be
modified for use with specific peripheral devices. Consult your
hardware manual for the codes needed to display the desired characters. Two map files are provided for use with the console device:
lusr/lib/mapchan/ibm for systems with a standard PC character set
ROM, and lusr/lib/mapchan/iso for systems with an optional ISO
8859/1 character set ROM.
Care should be taken that the stty(C) settings are correct for 8-bit terminals. The letc/gettydefs file may require modification to allow logging in with the correct settings.
7-bit U.S. ASCII (ANSI X3.4) should be used if no mapping is enabled
on the channel.

Files
/etc/default/mapchan
/usr/lib/mapchan/*

See Also
ascii(M), keyboard(HW), Ip(C), Ipadmin(ADM), mapchan(F),
mapkey(M), parallel(HW), screen(HW), serial(HW), setkey(M),
trchan(M), tty(M)

Notes
Some non-U.S. keyboards and display devices do not support characters commonly used by XENIX command shells and the C programming language. It is not recommended that these devices be used for
system administration tasks.

May 16, 1988

Page 4

MAPCHAN(M)

MAPCHAN(M)

Printers can be mapped, output only, and can either be sent 8-bit codes
or one-to-many character strings using map chan . Line printer spooler
interface scripts can be used (setuid root) to change the output map on
the printer when different maps are required (as in changing print
wheels to display a different character set). See /p(C) and
/padmin(ADM) for information on installing and administering interface scripts.
Not all terminals or printers can display all the characters that can be
represented using this utility. Refer to the device's hardware manual
for information on the capabilities of the peripheral device.
Warnings

Use of mapfiles that specify a different "internal" character set perchannel, or a set other than the 8-bit ISO 8859 set supplied by default
can cause strange side effects. It is especially important to retain the
7-bit ASCII portion of the character set (see ascii (M)). XENIX utilities and many applications assume these values.
Media transported between machines with different internal code set
mappings may not be portable as no mapping is performed on block
devices, such as tape and floppy drives. However, trchan with an
appropriate mapfile can be used to "translate" from one internal character set to another.
Do not set ISTRIP (see stfy (C)) when using mapchan. This option
causes the eighth bit to be stripped before mapping occurs.

May 16, 1988

Page 5

MAPKEY(M)

MAPKEY(M)

Name
mapkey, mapscm, mapstr, convkey - Configure monitor screen mapping.

Syntax
mapkey [ -dox ][ datafile ]
mapscrn [ -d ][ datafile ]
mapstr [ -d ] [ datafile ]
convkey [ in [ out] ]
Description
mapscrn configures the output mapping of the monitor screen on
which it is invoked. mapkey and mapstr configure the mapping of the
keyboard and string keys (eg. function keys) of the monitor (and multiscreens if present). mapkey can only be run by the super-user.
mapstr functions on a per-screen basis. Mapping strings on one screen
does not affect any other screen.
If a file name is given on the argument line the respective mapping
table is configured from the contents of the input file. If no file is

given, the default files in lusr/lib/keyboard and lusr/lib/console is
used. The -d option causes the mapping table to be read from the kernel instead of written and an ASCII version to be displayed on the
standard output. The format of the output is suitable for input files to
mapscrn, mapkey, or mapstr . Non-super-users can run mapkey and
mapstr when the -d option is given.
With the -0 or -x options, mapkey displays the mapping table in octal
or hexadecimal.
convkey translates an old-style mapkey file into the current format. If
in or out are missing, they default to stdin or stdout.

Files
/usr/lib/keyboard/*
/usr/lib/console/*

Notes
There is no way to specify that the map utilities read their configuration tables from standard input.

May 16, 1988

Page 1

MAPKEY(M)

MAPKb'y (M)

See Also
keyboard(HW), screen(HW), setkey(C)

May 16, 1988

Page 2

MESSAGES (M)

MESSAGES (M)

Name
messages - Description of system console messages.

Description
This section describes the various system messages which may appear
on the system console. All messages are displayed in the following
fonnat:
label:severity:comment

The segments break down as follows:
label

Name of the driver or routine where the error occurred.
severity

The level of error severity, consisting of four levels:
PANIC

These fatal messages indicate hardware
problems or kernel inconsistencies that
are too severe for continued operation.
After displaying a PANIC message, the
system stops. Rebooting is required.

ERROR

Resource use has been affected. Some
corrective action is needed.

WARNING

An error indication that should be monitored (example, free file space is low)
but requires no immediate action.

INFO

Some infonnation about the system is
provided.

comment

A field containing infonnation about the problem at hand.
action

The course of action to remedy the situation.
The system services error messages are generated by the shell and do
not follow the above convention.

System Message Meanings
The following classifications are meant to be a key for you to use to
detennine the actions to take to correct an error situation. Each kernel
message will have one of the following three classifications listed

May 16, 1988

Page 1

MESSAGES (M)

MESSAGES (M)

with it. The classifications are:
System inconsistency
A contradictory situation exists in the kernel.
Abnormal
A probably legitimate but extreme situation exists.
Hardware
Indicates a hardware problem.
System inconsistency messages indicate problems usually traceable to
hardware malfunction, such as memory failure. These messages
rarely occur since associated hardware problems are generally
detected before such an inconsistency can occur.
Abnormal messages represent kernel operation problems, such as the
overflow of critical tables. It takes extreme situations to bring these
problems about, so they should never occur in normal system use.
However, in some cases you can modify the kernel parameters that are
causing the error message. Use the configure(C) utility to make the
necessary changes.
Hardware messages normally specify the device, dev, that caused the
error. Each message gives a device specification of the form nnlmm
where nn is the major number of the device, and mm is its minor
number. The command pipeline

Is -I /dev

I grep

nn

I grep

mm

may be used to list the name of the device associated with the given
major and minor numbers.
System Messages
** Normal System Shutdown **
This message appears when the system has been shutdown properly. It indicates that the machine may now be rebooted or
powered down.
kemel:PANIC:** ABNORMAL System Shutdown **
This message appears when errors occur during system shutdown. It is usually accompanied by other system messages.
System inconsistency, fatal.
kemel:WARNING:bad block on dev nn/mm
A nonexistent disk block was found on, or is being inserted in,
the structure's free list. System inconsistency.

May 16, 1988

Page 2

MESSAGES (M)

MESSAGES (M)

kernel:WARNING:bad count on dev nn/mm
A structural inconsistency in the superblock of a file systen •.
The system attempts a repair, but this message will probably be
followed by more complaints about this file system. System
inconsistency.
kernel:WARNING:Bad free count on dev nn/mm
A structural inconsistency in the superblock of a file system.
The system attempts a repair, but this message will probably be
followed by more complaints about this file system. System
inconsistency.
kernel:ERROR:error on dev name (nn/mm)
This is the way that most device driver diagnostic messages
start. The message will indicate the specific driver and complaint. The name is a word identifying the device.
kernel:ERROR:iaddress > 2"24
This indicates an attempted reference to an illegal block
number, one so large that it could only occur on a file system
larger than 8 billion bytes. Abnormal.
kernel: WARNING:lnode table overflow
Each open file requires an inode entry to be kept in memory.
When this table overflows, the specific request (usually open(S)
or createS»~ is refused. Although not fatal to the system, this
event may damage the operation of various spoolers, daemons,
the mailer, and other important utilities. Abnormal results and
missing data files are a common result. Use configure(C) to
raise the number of inodes. Abnormal.
kernel:WARNING:interrupt from unknown device, vec=num
The CPU received an interrupt via a supposedly unused vector.
This message is followed by "panic:unknown interrupt." Typically, this event comes about when a hardware failure miscomputes the vector of a valid interrupt. Hardware.
kernel:WARNING:stray interrupt on vector num
The CPU received an interrupt via a supposedly unused vector.
Hardware.

May 16,1988

Page 3

MESSAGES (M)

MESSAGES (M)

kernel:WARNING:no file
There are too many open files. The system has run out of entries
in its "open file" table. The warnings given for the message
"inode table overflow" apply here. Use configure(C) to raise
the total number of available files. Note that the number of open
files per process is not configurable. Abnormal.
kernel:WARNING:no space on dev nn/mm
This message means that the specified file system has run out of
free blocks. Although not normally as serious, the warnings discussed for "inode table overflow" apply:often user programs
are written casually and ignore the error code returned when
they tried to write to the disk; this results in missing data and
"holes" in data files. The system administrator should keep
close watch on the amount of free disk space and take steps to
avoid this situation. Abnormal.
kernel:WARNING:Out of inodes on dev nn/mm
The indicated file system has run out of free inodes. The number
of inodes available on a file system is determined when the file
system is created (using mkfs(C». The default number is quite
generous; this message should be very rare. The only recourse
is to remove some worthless files from that file system, or dump
the entire system to a backup device, run mkfs(C) with more
inodes specified, and restore the files from backup. Abnormal.
kernel:WARNING:out of text
When programs linked with the ld -i or -0 switch are run on a
286 based machine, a table entry is made so that only one copy
of the pure text will be in memory even if there are multiple
copies of the program running. This message appears when this
table is full. The system refuses to run the program which
caused the overflow. Note that there is only one entry in this
table for each different pure text program. Multiple copies of
one program will not require multiple table entries. Each
, 'sticky" program (see chmod (C» requires a permanent entry in
this table; nonsticky pure text programs require an entry only
when there is at least one copy being executed. Use
configure(ADM) to raise the number of text segments. Abnormal.
kernel:P ANIC:bad 287 int
Attempted execution of a real mode 287 instruction on a 286
based machine. System inconsistency, fatal.
kernel:P ANIC:blkdev
An internal disk I/O request, already verified as valid, is
discovered to be referring to a nonexistent disk. System inconsistency, fatal.

May 16, 1988

Page 4

MESSAGES (M)

MESSAGES (M)

kernel:P ANIC:devtab
An internal disk I/O request, already verified as valid, is
discovered to be refering to a nonexistent disk. System inconsistency, fatal.
kernel:P ANIC:iinit
The super-block of the root file system could not be read. This
message occurs only at boot time. Hardware,fatal.
kernel:P ANIC:swap 10 error
A fatal I/O error occurred while reading or writing the swap
area. System inconsistency, fatal.
kernel:P ANIC:memory failure - parity error
A hardware memory failure trap has been taken. System inconsistency, fatal.
kernel:P ANIC:no fs
A mounted file system's entry has disappeared from the system
mount table. System inconsistency, fatal.
kernel:P ANIC:no imt
A mounted file system has disappeared from the mount table.
System inconsistency, fatal.
kernel:P ANIC:no procs
Each user is limited in the amount of simultaneous processes he
can have; an attempt to create a new process when none is
available or when the user's limit is exceeded and refused. That
is an occasional event and produces no console messages; this
panic occurs when the kernel has certi fied that a free process
table entry is available and can't find one when it goes to get it.
System inconsistency, fatal.
kernel:P ANIC:Out of swap
There is insufficient space on the swap disk to hold a task. The
system refuses to create tasks when it feels there is insufficient
disk space, but it is possible to create situations to circumvent
this mechanism. Note that this condition generates a PANIC on
286 based machines and a WARNING on 386 based machines.
Abnormal.
kernel:P ANIC:general protection trap
General protection trap taken in kernel. System inconsistency,
fatal.
kernel:P ANIC:segment not present
An attempt has been made to access an invalid segment. It may
also indicate the segment-not-present trap has been taken in the
kernel. System inconsistency, fatal.

May 16, 1988

Page 5

MESSAGES (M)

MESSAGES (M)

kernel:P ANIC:Timeout table overflow
The timeout table is full. Timeout requests are generated by
device drivers, there should usually be room for one entry per
system serial line plus ten more for other usages. Use
configure(C) to raise the number of timeout table entries.
kernel:P ANIC:Trap in system
The CPU has generated an illegal instruction trap while executing kernel or device driver code. This message is preceded with
an information dump describing the trap. System inconsistency,
fatal.
kernel:P ANIC:Invalid TSS
Internal tables have become corrupted. System inconsistency,
fatal.
kernel:WARNING:bootstring invalid, ignored
A bad bootstring was entered at the Boot prompt.
kernel: ERROR: bad syntax - string
A bad bootstring was entered at the Boot prompt.
kernel:P ANIC:bad mapping in copyio
Copyio was called with a strange request. Usually a bad driver.
kernel: WARNING:HARDWARE FAILURE:386 incorrectly multiplies 32-bit numbers
The cpu is displaying the 32-bit multiply bug.
kernel:P ANIC:*** POWER CYCLE TO REBOOT ***
This message follows the above HARDWARE FAILURE 32 bit
error message.
kernel:INFO: 10 bits of I/O address decoding
The hardware is only decoding 10 bits of i/o addresses. This
amount is sufficient in most cases. This condition is only an
issue if you are strapping i/o devices with a base address above
400 (hex).
kernel: WARNING:A31 CPU bug workaround not possible for this
machine
A31 was specified on the boot line, but cannot be applied to the
current system.
kernel:INFO:A31 CPU bug workaround in effect
A31 was specified on the boot line and the software workaround
is currently in effect.
kernel:PANIC:bad boot string An invalid boot string was entered at
the Boot prompt.

May 16, 1988

Page 6

MESSAGES (M)

MESSAGES (M)

kernel:P ANIC:** WYSE/SCO XENIX only operates on WYSE PC
systems **
A kernel was serialized for WYSE hardware only and is being
booted on a non-WYSE machine.
kernel:P ANIC:out of both memory & swap
No more memory pages or swap pages are free.
kernel:P ANIC:not enough contiguous memory
The kernel memory allocation routines require more physically
contiguous memory. Either decrease the size of some kernel
parameters (like disk buffers) or add more physical memory.
kernel: W ARNING:filesystem page read failed
An error occurred trying to read a page from the disk. This is
not fatal, but usually indicates hardware problems.
kernel:P ANIC:free inode isn't
There is internal inode table corruption within the kernel.
kernel:ERROR:Map overflow (num), shutdown and reboot, mp>mpent
There are internal kernel map inconsistencies. Reboot your system.
kernel:P ANIC:write_sbO:cannot cvts3superbO yet
This message is found in the 386 kernel only. A write of a non
SYS III or SYS V filesystem superblock is being attempted.
This action should be impossible due to earlier checks.
kernel:WARNING:Can't allocate message buffer
This message indicates a lack of memory. Processes should be
killed to make more room. Another option is to add more physical memory.
kernel:P ANIC:Large model 386 ssig
Internal kernel error in processing large model 386 signals.
Trap type
This message precedes a "kernel:P ANIC:" message. The type
is the trap number given by the processor. The message is followed by a dump of registers. System inconsistency, fatal.
fpsave:PANIC:no fp_task
No floating point context to save, internal kernel error.
mdep.386/fp.c:WARNING:No floating point emulator found in string,
No letclemulator was present in the root filesystem. The System
Administrator should install one and reboot.

May 16,1988

Page 7

fp_OVERRUN:PANIC:coprocessor overrun - with no 287/387
Internal coprocessor error. fatal.
fp_COPROC:PANIC:, coprocessor error - with no 287/387
Inconsistent kernel internal state.
fp_COPROC:PANIC:coprocessor error - switched away from fp_task
Internal kernel mismanagement of floating point processes.
fp_DNA:PANIC:
A device trap happened while emulating floating point instructions.
iinit:P ANIC:cannot copy in superblock
An error happened during the root filesystem superblock loading.
srmountPANIC:cannot cvtv7superbO yet
A root filesystem superblock was not recognized as a SYS III or
SYS V superblock. V7 superblocks cannot currently be converted on the 386 kernel.
mapphys:PANIC:sptmap overflow
No system page table pages are available. This is an internal
error in the kernel, usually caused by a faulty device driver.
physio:PANIC:bad state A device driver made an invalid request to
physio.
badint:PANIC:bad interrupt handler Invalid interrupt request, usually
fault hardware.
setup:PANIC:sptmap overflow This message indicates possible kernel
image corruption or lack of physical memory.
setup:PANIC:u-area not page aligned This indicates possible kernel
image corruption.
setup:PANIC:u-area address does not match SPTADDR
Indicates possible kernel image corruption.
cmn_err:PANIC:DOUBLE PANIC The kernel panicked while trying
to panic. You must power cycle at this point to reboot the
machine.
cmn_err:PANIC:unknown level in cmn_err (level=num, msg=string),
The kernel's cmn_errO routine was called with an invalid argument.

May 16, 1988

Page 8

MESSAGES (M)

MESSAGES (M)

Kernel Paging Messages
The following messages indicate system inconsistencies in the kernel
paging code. These inconsistencies can be caused by hardware or
software problems. Reboot your system and note the circumstances if
you see one of these messages:
mfalloc:P ANIC:page not free
mfalloc:P ANIC:page not free at exit
mffree:P ANIC:page already free
mffree:P ANIC:page is locked
dfalloc:P ANIC:frame not free at exit
xlcheck:P ANIC:xlink serial mismatch
impcode:P ANIC:called to load impure 386
impcode:P ANIC:more than 1 data segment?
preload:PANIC:, invalid page (num, num)
kernel:P ANIC:bad page type for protection fault
kernel:P ANIC:protection fault on read access
kernel:P ANIC:not present fault on shared data
kernel:P ANIC:added strange page table - num, index
pgfind:PANIC:not in cache
pghash:PANIC:not in cache
pginval:P ANIC:list broken
pginval:P ANIC:not in cache
mftomp:PANIC:bad frameno num
mptomf:PANIC: bad mp num
swapadd:PANIC:no space for dpfi
dftodp:PANIC:bad frameno num
dptodf:PANIC:bad dp num

May 16,1988

Page 9

MESSAGES (M)

MESSAGES (M)

dptodf:PANIC:bad dp num
pgread:PANIC:no xlink
pgfree:PANIC:invalid page marked present
pgfree:P ANIC:freeing intransit page
pgpid: W ARNING:setting disk pid
kemel:P ANIC:page table under page table?
kemel:P ANIC:swapping intransit page
dftomf:P ANIC:non-swap page table entry changed
dftomf:PANIC:swap disk frame rcnt(num)
>dp_rcnt,dp

!= 1, dp=num, dp-

dftomf:PANIC:page type mismatch - mptype num dptype num mp num
dp num, mp->mp_type, dp->dp_type, mp, dp
dftomf2:PANIC:, swap memory frame rcnt(num) != 1, mp=num,
dftomf3:PANIC:swap mem frame rcnt(num) != 1, mp=num, mp>mp_rcnt, mp
mftodfl:PANIC:swap mem frame rcnt(num) != 1, mp=num, mp>mp_rcnt, mp
mftodf:P ANIC:memory frame marked in transit
mftodf:PANIC:page type mismatch - dptype num mptype num dp num
mpnum

mftodf2:PANIC:swap disk frame rcnt(num) != 1, dp=num
mftodf3:PANIC:swap disk frame rcnt(num)
>dp_rcnt, dp

!= 1, dp=num, dp-

fftomf:PANIC:page type(num) not TE_FILSYS, mp
>mp_type, mp

=

num,mp-

mfcvt:P ANIC:zero ref count
ptdup:PANIC:TE_SWAP page rcnt(num) > 1,
ptdup:PANIC:xlinked page has reference
ptdup2:PANIC:TE_SWAP page rcnt > 1

May 16, 1988

Page 10

MESSAGES (M)

MESSAGES (M)

ptdup:P ANIC:xlinked page has reference
ptdup:PANIC:locked page not present
ptdup:PANIC:intransit page
pgcheck:P ANIC:page type mismatch:ptp num type num xtype
num,ptp,type,xtype
The above listed messages indicate system inconsistencies in the kernel paging code. These inconsistencies can be caused both by
hardware or software problems. Reboot your system.
cputok:PANIC:
cpktou:P ANIC:
sdfrcm:PANIC:sdp->sd_inode not found
The above 3 errors indicate internal shared data errors within the kernel.
v86sighdlint: W ARNING:lost signal
v86setint:P ANIC:xtss pte not present
The above 2 errors indicate internal VPIX processing errors within the
kernel.
namei:P ANIC:null cache ino
namei:P ANIC:duplicating cache
The above 2 messages indicate internal file management errors in the
kernel.

System Services Messages
The following messages are displayed by the shell when a system call
fails.
Not owner:
Typically, this error indicates an attempt to modify a file in some
way forbidden except to its owner or super-user. It is also returned
for attempts by ordinary users to do things allowed only to the
super-user.
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.

May 16, 1988

Page 11

MESSAGES (M)

MESSAGES (M)

No such process:
No process can be found corresponding to that specified by pid in
kill or ptrace .
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.
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.
No such device or address:
I/O on a special file refers to a subdevice which does not exist, or
beyond the limits of the device. It may also occur when, for example, a tape drive is not on-line or no disk pack is loaded on a drive.
Arg list too long:
An argument list longer than 5,120 bytes is presented to a member
of the exec family.
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 a.out(F».
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).
No child processes:
A wait was executed by a process that had no existing or
unwaited-for child processes.
No more processes:
Afork failed because the system's process table is full or the user
is not allowed to create any more processes.
Not enough space:
During an exec, or sbrk, a program asks 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 fork.
Permission denied:
An attempt was made to access a file in a way forbidden by the
protection system.

May 16, 1988

Page 12

lY1LLlLl.t1VLLl

~lVl)

lY1LLlLl.t1VLLl

~1V1)

Bad address:
The system encountered a hardware fault in attempting to use an
argument of a system call.
Block device required:
A nonblock file was mentioned where a block device was required,
e.g., in mount.
Device busy:
An attempt 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). It will also occur if an attempt is made to enable accounting when it is already enabled.
File exists:
An existing file was mentioned in an inappropriate context, e.g.,
link.
Cross-device link:
A link to a file on another device was attempted.
No such device:
An attempt was made to apply an inappropriate system call to a
device; e.g., read a write-only device.
Not a directory:
A nondirectory was specified where a directory is required, for
example, in a path prefix or as an argument to chdir(S).
Is a directory:
An attempt to write on a directory.
Invalid argument:
An invalid argument (e.g., dismounting a nonmounted device;
mentioning an undefined signal in signal or kill; reading or writing
a file for which lseek has generated a negative pointer). Also set
by the math functions described in the (S) entries of this manual.
File table overflow:
The system's table of open files is full and temporarily no more
opens can be accepted.
Too many open files:
No process may have more than 60 file descriptors open at a time.
Not a character device
Text file busy:
An attempt to execute a pure-procedure program which is
currently open for writing (or reading). Also an attempt to open
for writing a pure-procedure program that is being executed.

May 16, 1988

Page 13

MESSAGES (M)

MESSAGES (M)

File too large:
The size of a file exceeded the maximum file size (1,082,201,088
bytes) or ULIMIT; see ulimit(S).
No space left on device:
During a write to an ordinary file, there is no free space left on the
device.
Illegal seek:
An lseek was issued to a pipe.
Read-only file system:
An attempt to modify a file or directory was made on a device
mounted read-only.
Too many links:
An attempt to make more than the maximum number of links
(1000) to a file.
Broken pipe:
A 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.
Arg out of domain of func:
The argument of a function in the math package is out of the
domain of the function.
Result too large:
The value of a function in the math package is not representable
within machine precision.
File system needs cleaning:
An attempt was made to mount(S) a file system whose super-block
is not flagged clean.
Would deadlock:
A process' attempt to lock a file region would cause a deadlock
between processes vying for control of that region.
Not a name file:
A creatsem (S), opensem(S), waitsem(S), or sigsem(S) was issued
using an invalid semaphore identifier.
Not available:
An opensem(S), waitsem(S) or sigsem(S) was issued to a semaphore that has not been initialized by a call to creatsem (S). A sigsem was issued to a semaphore out of sequence; i.e., before the
process has issued the corresponding waitsem to the semaphore.
An nbwaitsem was issued to a semaphore guarding a resource that
is currently in use by another process. The semaphore on which a
process was waiting has been left in an inconsistent state when the

May 16,1988

Page 14

MESSAGES (M)

MESSAGES (M)

process controlling the semaphore exits without relinquishing control properly; i.e., without issuing a waitsem on the semaphore.
A name file:
A name file (semaphore, shared data, etc.) was specified when not
expected.
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 msgop(S)].
An attempt was made to receive a message of a type that does not
exist on the specified message queue; see msgop(S).
Identifier removed:
This error is returned to a process that resumes execution due to
the removal of an identifier from the file system's
name space; see msgetl (S), semetl (S), and shmetl (S).
No record locks available:
Infentl(S) the setting or removing of record locks on a file cannot
be accomplished because there are no more record entries left on
the system.
Channel number out of range
Level 2 not synchronized
Level 3 halted
Level 3 reset
Link number out of range
Protocol driver not attached
No CSI structure available
Level 2 halted
Deadlock situation detected/avoided
A deadlock situation was detected and avoided. This error pertains
to file and record locking.
No record locks available
Bad exchange descriptor
Bad request descriptor
Message tables full

May 16, 1988

Page 15

. I. .....

~--..I..

. . --- , ......... /

Anode table overflow
Bad request code
Invalid slot
File locking deadlock
Bad font file format
Not a stream device
A putmsg(S) or getmsg(S) system call was attempted on a file
descriptor that is not a STREAMS device.
No data available
Timer expired
The timer set for a STREAMS ioctl(S) call has expired. The cause
of this error is device specific and could indicate either a hardware
or software failure, or perhaps a timeout value that is too short for
the specific operation. The status of the ioctl(S) operation is
indeterminate.
Out of stream resources
During a STREAMS open(S), either no STREAMS queues or no
STREAMS head data structures were available.
Machine is not on the network
This error is Remote File Sharing (RFS) specific. It occurs when
users try to advertise, unadvertise, mount, or unmount remote
resources while the machine has not done the proper startup to
connect to the network.
Package not installed
This error occurs when users attempt to use a system call from a
package which has not been installed.
Object is remote
This error is RFS specific. It occurs when users try to advertise a
resource which is not on the local machine, or try to
mount/unmount a device (or pathname) that is on a remote
machine.
Link has been severed
This error is RFS specific. It occurs when the link (virtual circuit)
connecting to a remote machine is gone.
Advertise error
This error is RFS specific. It occurs when users try to advertise a
resource which has been advertised already, or try to stop the RFS
while there are resources still advertised, or try to force unmount a
resource when it is still advertised.

May 16, 1988

Page 16

MESSAGES (M)

MESSAGES (M)

Srmount error
This error is RFS specific. It occurs when users try to stop RFS
while there are resources still mounted by remote machines.
Communication error on send
This error is RFS specific. It occurs when trying to send messages
to remote machines but no virtual circuit can be found.
Protocol error
Some protocol error occurred. This error is device specific, but is
generally not related to a hardware failure.
Multihop attempted
This error is RFS specific. It occurs when users try to access
remote resources which are not directly accessible.
Not a data message
During a read(S), getmsg(S), or ioctl(S) CRECVFD system call to a
STREAMS device, something has come to the head of the queue
that can't be processed. That something depends on the system
call:
read(S) - control information or a passed file descriptor.
getmsg(S) - passed file descriptor.
ioctl(S) - control or data information.
Narne not unique on network
File descriptor in bad state
Remote address changed
Cannot access a needed shared library
Trying to exec(S) an a.out that requires a shared library (to be
linked in) and the shared library doesn't exist or the user doesn't
have permission to use it.
Accessing a corrupted shared library
Trying to exec(S) an a.out that requires a shared library (to be
linked in) and exec(S) could not load the shared library. The shared
library is probably corrupted.
Trying to exec(S) an a.out that requires a shared library (to be linked
in) and there was erroneous data in the .lib section of the a.out. The
.lib section tells exec(S) what shared libraries are needed. The
a.out is probably corrupted.
Attempting to link in more shared libraries than system limit
Trying to exec(S) an a.out that requires more shared libraries (to be
linked in) than is allowed on the current configuration of the system. See the System Administrator's Guide.

May 16, 1988

Page 17

MESSAGES (M)

MESSAGES (M)

Cannot exec a shared library directly
Trying to exec(S) a shared library directly. This is not allowed.
Driver Messages
The following messages are different from kernel messages in that
they are generated by the device drivers for the various hardware supported under XENIX. The source of the message can be determined by
checking the label field of the message.
Console Driver Messages
console: W ARNING:Kernel messages lost on non-text screen
(also check /usr/adm/messages)
Kernel messages were lost while the console was in graphics
mode and did not appear. Check the last lines of
/usr/adm/messages to find the messages.
console: W ARNING:Too many keyboard groups
There are more video devices attached to your system than your
kernel is designed to support.
Irwin Driver Messages

IRWIN:ERROR:Tape bad block table was not successfully read.
When the tape device is open the bad block table is read into
memory. This messages indicates that the read did not work
correctly.
IRWIN:ERROR:Tape is not formatted.
The tape must be formatted before use.
IRWIN:ERROR:Tape is write protected.
The write protect tab must be removed for use.
IRWIN:ERROR:Cannot write to DCI000 cartridge.
Only Irwin model 110 or 210 drives can write to DCI000 cartridges.
IRWIN:ERROR:Not enough memory for mini-cartridge; retrying ...
The Irwin is waiting for enough user memory to become available to use the device.
IRWIN:ERROR:Not enough memory for mini-cartridge; open failed.
The Irwin did not get enough memory to be able to use the device after several retries.

May 16, 1988

Page 18

MESSAGES (M)

MESSAGES (M)

IRWIN:ERROR:Tape write error.
A write attempt was unsuccessful for an unknown reason.
IRWIN:ERROR:Tape verify error.
A verify attempt was unsuccessful for an unknown reason.
IRWIN:ERROR:Tape read error.
A read attempt was unsuccessful for an unknown reason.
IRWIN:ERROR:Tape uncorrectable ECC error.
An uncorrectable ECC memory error has occurred, check your
hardware for defective chips.
IRWIN:ERROR:Cannot format DCI000 cartridge.
Only Irwin model 110 or 210 drives can write to DCI000 cartridges.
IRWIN :ERROR:Bad state:num
Unknown state in the interrupt routine.
IRWIN:ERROR:DMA boundary error - start address:num ending
address:num

Device tried to transfer data from a buffer that crosses a 64k
boundary.

Cartridge Driver Messages
CT:ERROR:Tape controller (type=name) not found
The controller specified in in the file lusrlsysliolctcon[.asm was
not found.
CT:ERROR:Cartrldge tape is write protected
You must remove the write protect tab from the cartridge before
use.
CT:ERROR:system too busy for efficient tape use
There is not enough user memory available to allow the device
to work.
CT: WARNING: attempted to free invalid buffer
The driver attempted free a buffer that was not active. The buffer
must be activated before use.

SCSI Driver Messages
scsi:ERROR:No controller response :num
Requested controller is not present on SCSI bus num. Check
your system setup and connections.

May 16,1988

Page 19

MESSAGES (M)

MESSAGES (M)

scsi:ERROR:CTLR num LUN num not attached
Requested unit not present on controller. Check your system
setup.
scsi:ERROR:CTLR num LUN num:invalid type ,
Requested unit is not a disk or tape. Disk and tape and printer
are currently the only supported SCSI devices.
scsi:ERROR:CTLR num LUN num:device not ready, ctlr, x);
Requested device is busy.
scsi:ERROR:adstrategy:device/type error Oxtype/Oxtype
Internal error - open device is not disk, tape or printer.
scsi:ERROR:adioctl:ADMODESENSE rc num host num unit num
ioctl sense command did not complete as expected.
scsi:WARNING:adioctl:ADEXECUTE rc num host num unit num
ioctl execute command did not complete as expected.
scsi:INFO:adioctl:num reassigned
ioctl bad block mapping completed (done in pairs)
scsi: W ARNING:adsetparam:ADMODESENSE rc num host num unit
num
Mode sense command did not complete as expected.
scsi:ERROR:adgetcdb:unsupported command num
Internal error - unexpected command.
scsi: W ARNING:adintr:adapter
intr=num
SCSI reset detected.

num SR_DETECTED status=num,

scsi:WARNING:Unexpected MBI status num
Unexpected condition after interrupt.
scsi: WARNING:ad_sndcmd:unexpected port status
Unable to send command to adapter.

= num

scsi:ERROR:adpresentAdapter num internal failure:num
Adapter returned bad status on initialization.
scsi:ERROR:on disk dev=num/num ha=num id=num
block=num sector=num, cylinder/head = num/num
Disk I/O failure.

lun=num

scsi:ERROR:on tape ha=num id=num lun=num hst num ust num
AHA-1540 cmd :num [num ... J
AHA-1540 sense :num [num ... J
Tape I/O failure; followed by one of these messages:

May 16, 1988

Page 20

IV1.c..)..)fiLT.c..)

~lVl)

end of tape
tape is write protected
wrong record length
Disk Driver Messages
disk:ERROR:Diskinfo table overflow
Too many disk drives in use - reconfigure kernel to increase the
available number of disks.
disk:ERROR:Invalid partition sector on hard disk
Master boot block on disk is unrecognizable. Run fsck(C).
Floppy Driver Messages
floppy: WARNING:CMOS indicates no diskette drives installed
Configuration memory invalid - run your DOS SETUP disk.
floppy: WARNING:CMOS indicates diskette drive num not present
Configuration memory invalid - run your DOS SETUP disk.
floppy:ERROR:fdnum being formatted
The floppy drive is in use.
floppy:ERROR:disk is write protected
The disk cannot be written because it is protected.
floppy:ERROR:on dev (num/num), block=num cmd=num status=num
Floppy I/O failure. possibly followed by the message:
insert disk or close floppy door
if appropriate.
floppy: WARNING:cmd result error
I/O error on the floppy drive.
VPIX Messages

VPIX:command completed unexpectedly
Process terminated prematurely.
OMTI Driver Messages
omti:ERROR:cannot allocate a GDT descriptor
Internal error - kernel dscralloc routine failed.
omti:ERROR:unit=num controller not configured
Internal error - driver open failed to identify disk type.

May 16, 1988

Page 21

MESSAGES (M)

MESSAGES (M)

omti:WARNING:already busy
Internal error - omtistart called for a busy drive.
omti:ERROR:unknown command(num), bp->b_cmd
Internal error - omtistart encountered an unrecognized command.
omti:ERROR:command setup failed
Controller failed to accept command.
omti:WARNING:non-omti interrupt (num), omti_status
Controller did not signal an interrupt when an interrupt was
received.
omti:WARNING:unexpected omti interrupt (num), omti_status
Internal error - no pending command when interrupt received.
omti:WARNING:still busy
Controller still busy after generating an interrupt.
omti:ERROR:during omti_sense
Interrupt received during an OMTI sense command.
omti:ERROR:initialization failure
Error indicated during an initialization.
omti:ERROR:sense command setup failed
Controller failed to accept setup command.
omti:ERROR:minor=num, block=num, errtype=num, code=num,
unit=num [sector=num, cylinder!head=num/num,] 
Disk I/O failure.  is one of:

No error or no sense information,
No Index,
No Seek/Command Complete,
Write/Drive Fault,
Drive Not SelectedlNot Ready,
No Track zero or Cylinder zero found,
Multiple Drives Selected,
Seek/Command in progress,
Cartridge Changed
IDCRC,
Uncorrectable Data ECC,
ID Address Mark Not Found,
Data Address Mark Not Found,
Sector Not Found,
Seek Error,
Sequence/DMA,
Write Protected,
Correctable ECC,
Bad Track Encountered,

May 16, 1988

Page 22

MESSAGES (M)

MESSAGES (M)

Illegal Interleave Factor,
Unknown Error,
Ilegal Access To An Alternated Track/Unable to Read the Alternate
Track Address,
Alternate of Bad Track Already Assigned,
No Alternate Track Found,
Illegal Alternate Track Address
Invalid Command,
Illegal Disk Address,
Illegal Function for Drive Type,
Volume Overflow
RAM error,
EPROM Checksum/Internal Diagnostic error
Error with unknown type or code
omti:ERROR:controller already in select state
Internal error - controller busy when sending command.
omti:ERROR:cannot enter command phase
Controller failed to accept select command.
omti:ERROR:C_D bit stuck off
Controller failed to indicate readiness for command.
omti:ERROR:OMTI_BUSY bit still stuck on
Controller failed to obey reset command.
omti:INFO:unloading all requests
Preparing for manual reset because programmed reset did not
work.
omti: WARNING:colliding polling routines ...
Internal error - multiple instances of omtipoll.
omti:ERROR:timed out
Expected interrupt did not arrive.
omti:ERROR:please use sfmt to modify disk parameters
Attempt to write disk characteristics directly with DIOWDISK
ioctl.

Serial Driver Messages
serial:ERROR:Garbage or loose cable on dev num, port shut down
Too many interrupts were received together. Check your connections.

Winchester Driver Messages

May 16, 1988

Page 23

wd:ERROR:on fixed disk dev=num/num block=nU11l cmd=num
status=num sector=num, cylinder/head = num/num
Disk I/O failure.

Event Driver Messages
eventERROR:event channel full
There are no more devices available in the event queue.
eventERROR:event table full
All of the system's event queues are opened.

Keyboard Driver Messages
kb:ERROR:keyboard is in an unknown mode
The keyboard has been set in an invalid mode through an ioctlO.
The only valid keyboard modes are XT (0) and AT(1).

Notes
Not all messages appear on all machines. Some messages are processor dependent.

May 16, 1988

Page 24

MSCREEN(M)

MSCREEN(M)

Name
mscreen - Serial multiscreens utility
Syntax
mscreen [ -s ] [ -n number ] [ -t ]
Description
mscreen allows a serial terminal to have multiple login screens similar
to the multiscreen(M) console.

Note: For full mscreen support the terminal must have the ability to
switch internal screen pages on command and it must retain a separate
cursor position for each screen page.
The options are used as follows:
-s

Silent mode. This flag suppresses the startup messages,
and on "dumb" terminals it suppresses the screen switch
messages

-n

Selects the number of serial multiscreens desired up to the
maximum defined for the terminal type.

-t

Disables the transparent tty checking. mscreen normally
exits silently if the terminal device name starts with the
characters "ttyp". Device names beginning with "ttyp"
are used as slave devices for mscreen. The correct names
for the master tty devices begin with "ptyp".

mscreen can be used on both "smart" and "dumb" terminals.
Although it is optimized to take advantage of smart terminals with
screen memory, mscreen also works on dumb terminals, although the
screen images are not saved during screen changes. mscreen also supports terminals with two (or more) serial ports that are connected to
different computers.
mscreen is designed to be invoked from the .profile or .login files. Use
mscreen in place of the SHELL variable so that serial multi screens
can be automatic at login time. The "stop" and "quit" keys allow
you to logout from all screens with a single keystroke.

Configuration
mscreen determines the terminal type of the terminal it is invoked
from by examining the environment variable TERM. mscreen looks
in /etc/mscreencap or in the filename contained in the environment

May 16, 1988

Page 1

MSCREEN(M)

MSCREEN(M)

variable SPTTERMCAP to get the capabilities for the terminal type.
The pseudo terminals assigned to the user are automatically determined at startup by mscreen. Manual assignment of ttys can be
accomplished by creating a file in the user's home directory called
.mscreenrc.

mscreencap format
mscreencap contains an entry for each terminal type supported. An
entry may have several names if the support for several terminal types
are the same. Within an entry are the key mappings for each potential
pseudo terminal. Each pseudo terminal has a help key string, an input
string (the sequence generated by the key that selects this screen), and
an optional output string (the sequence to send to the terminal that
will cause a page switch). The input and output strings are in a
term cap like format: (the backslash and caret are special lead in
(escape) characters)
'vtnn

an octal number, one to three digits are allowed

\n

newline

\r

carriage return

\t

tab

\b

backspace

\f

form feed

\E

escape (hex 1b octal 33).

\

enter backslash as a data character

\"
\"X

enter caret as a data character
ctrl-X where X can be: @ABCDEFGHIJKLMNOPQESTUVWXYZ[r_ effectively the caret
can generate hex 01 through hex 1f.

If a terminal type has no output strings then it is assumed to be a dumb
terminal that does not have multiple internal memory pages.

There are five special entries that allow the user to define keys to support the other functions of mscreen. They are the help key (which
prints a list of all of the keys that are currently available and their
functions), the who key (prints the name of the current screen), the
stop key (terminates mscreen and returns a good (zero) shell return
code), and quit key (terminates mscreen and returns a bad (non-zero)
shell return code and the dummy entry that is used for terminals with
multiple ports.
The format is:
#this is a comment and may only appear between entries

May 16,1988

Page 2

MSCREEN(M)

MSCREEN(M)

entrynamelalias llalias 1.. .laliasn:
:specialname,helpname,inputstring,pageselectstring:
:specialname,helpname,inputstring,pageselectstring:
entrynamelalias 1Ialias 1... Ialiasn:
:specialname,helpname,inputstring,pageselectstring:
:specialname,helpname,inputstring,pageselectstring:

The specialname is empty for real screen entries. See the provided
/etc/mscreencap for examples .
.mscreenrc format
a fixed set of ttys for use:
ttypO
ttypl
ttypn

Shell return codes and' auto login/logout
mscreen exits with a bad (non-zero) return code if there is an error or
when the "quit" key is pressed. The "stop" key causes mscreen to
exit with a good (zero) return code. This allows users to place mscreen
in the .login or .profile files. The .login or .profile files should set up an
automatic logout if the mscreen return code is good (zero). The following is a csh sample invocation of mscreen for a .login file:
mscreen -n 4
if ($status == 0) logout

The single key logout feature of mscreen works as if a nonnal logout
was entered on each pseudo-tenninal. A hangup signal is sent to all of
the processes on all the pseudo tenninals.
Multiple Port Option
mscreen provides a dummy entry type. It allows mscreen to be placed
in an inactive state while the user uses his tenninal to converse
through another (physical) io port to another computer. see the provided /etc/mscreentennmap for an example. To be used, you must
take the example and configure it for your needs.

mscreen Driver
The mscreen driver is already installed in the XENIX kernel with eight
pseudo tenninals available for use. You must enable a pseudo tenninals to use it. See the link-kit instructions for relinking the kernel to

May 16, 1988

Page 3

MSCREEN(M)

MSCREEN(M)

have more available pseudo terminals.

Notes
mscreen has a VTIM timeout of 1/5 second for input strings.
mscreen has a limit of twenty multiscreens per user.
You should not switch screen pages in mscreen when output is occuring because if an escape sequence is cut in half it may leave the terminal in an indeterminate state and distort the screen image.
Terminals that save the cursor location for each screen often do not
save states such as insert mode, inverse video, and others. For example, you should not change screens if you are in insert mode in vi, and
you should not change screens during an inverse video output
sequence.
For inactive screens (screens other than the current one) mscreen
saves the last 2048 characters of data (2K). Data older than this is
lost. This limit occasionally results in errors for programs that require
a memory of more data than this. The user-defined screen redraw key
restores the screen to normal appearance.
mscreen depends on the pseudo terminal device names starting with
ttyp for the slave devices and ptyp for the master devices. The number
of trailing character in the device name is not significant.

See Also
multiscreen(M), enable(C)

May 16,1988

Page 4

MULT/SCREEN (M)

MULT/SCREEN (M)

Name
multiscreen - Multiple screens (device files)
Syntax
alt-Fn
alt-ctrl-Fn
alt-shift-Fn
alt-ctrl-shift-Fn
Description
With the multiscreen feature, a user can access up to twelve different
, 'screens, " each corresponding to a separate device file. Each screen
can be viewed one at a time through the primary monitor video
display.
The number of screens on a system depends upon the amount of
memory in the computer. The system displays the number of enabled
screens during the boot process.
Access
To see the next consecutive screen, enter:
Ctrl-PrtSc
To move to any screen from any other screen, enter:
alt-Fn or alt-ctrl-Fn or alt-shift-Fn
alt-Fn or alt-ctrl-Fn (screens 1-12)
alt-shift-Fn or alt-ctrl-shift-Fn (screens 11-16, 7-12)
where n is the number of one of the "F" function keys on the primary
monitor keyboard. For example:
alt-F2
selects tty02, and all output in that device's screen buffer is displayed
on the monitor screen.
The second form (using the SHIFT key) permits access to screens 11
and 12 on keyboards that have only ten function keys. It is also possible to configure the kernel for up to 16 screens, but 12 is the default.
The function key combinations used to display the various screens are
defined in the keyboard mapping file. The /usr/lib/keyboard/keys or
other mapkey(ADM) file can be modified to allow different key combinations to change multiscreens. Use the mapkey utility to create a

May 16, 1988

Page 1

MULTISCREEN (M)

MULTISCREEN (M)

new keyboard map.
Files
/dev/tty[Ol-12]

multiscreen devices
(number available depends on system
memory)

See Also
mapkey(ADM), keyboard(HW), screen(HW), serial(HW), stty(C)
Notes
Any system error messages are normally output on the console device
file (/dev/console). When an error message is output, the video
display reverts to the console device file, and the message is displayed
on the screen. The console device is the only teletype device open
during the system boot sequence and when in single user, or system
maintenance mode.
Limitations to the number of multiscreens available on a system does
not affect the number of serial lines or devices available. See
serial (M) for information on available serial devices.
Note that the keystrokes given here are the default for XENIX, but
your keyboard may be different. If so, see keyboard(M) for the
appropriate substitutes. Also, any key can be programmed to generate
the screen switching sequences by using the mapkey utility.

May 16, 1988

Page 2

PROFILE(M)

PROFILE (M)

Name
profile - Sets up an environment at login time.
Description
The optional file, .profile, permits automatic execution of commands
whenever a user logs in. The file is generally used to personalize a
user's work environment by setting exported environment variables
and terminal mode (see environ(C».
When a user logs in, the user's login shell looks for .profile in the
login directory. If found, the shell executes the commands in the file
before beginning the session. The commands in the file must have the
same format as if they were entered at the keyboard. Any line beginning with the number sign (#) is considered a comment and is ignored.
The following is an example of a typical file:
# Tell me when new mail comes in
MAIL=/usr/mail/myname
# Add my /bin directory to the shell search sequence
PATH=$PATH:$HOME/bin
# Make some environment variables global
export MAIL PATH TERM
# Set file creation mask
umask22

Note that the file /etc/profile is a system-wide profile that, if it exists,
is executed for every user before the user's .profile is executed.
Files
$HOME/.profile
/etc/profile
See Also
env(C), 10gin(M), mail(C), sh(C), stty(C), su(C), environ(M)

May 16, 1988

Page 1

SXT(M)

SXT(M)
Name
sxt - Pseudo-device driver
Description

Sxt is a pseudo-device driver that interposes a discipline between the
standard tty line disciplines and a real device driver. The standard disciplines manipulate virtual tty structures (channels) declared by the
sxt driver. Sxt acts as a discipline manipulating a real tty structure
declared by a real device driver. The sxt driver is currently only used
by the shl(C) command.

Virtual ttys are named Idev/sxt??? and are allocated in groups of up
to eight. To allocate a group, a program should exclusively open a file
with a name of the form Idev/sxt??O (channel 0) and then execute a
SXTIOCLINK ioetl call to initiate the mUltiplexing.
Only one channel, the controlling channel, can receive input from the
keyboard at a time; others attempting to read will be blocked.
There are two groups of ioetl (S) commands supported by sxt. The
first group contains the standard ioetl commands described in
termio (M), with the addition of the following:
TIOCEXCL Set exclusive use mode: no further opens are permit-

ted until the file has been closed.
TIOCNXCL Reset exclusive use mode: further opens are once

again permitted.
The second group are directives to sxt itself. Some of these may only
be executed on channel O.
SXTIOCLINK

Allocate a channel group and multiplex the
virtual ttys onto the real tty. The argument is
the number of channels to allocate. This command may only be executed on channel O.
Possible errors include:
EINVAL

The argument is out of range.

ENOTTY The command was not issued from a

real tty.

May 16, 1988

ENXIO

linesw is not configured with sxt.

EBUSY

An SXTIOCLINK command has
already been issued for this real tty.

Page 1

SXT(M)

SXT(M)
ENOMEM

There is no system memory available for allocating the virtual tty
structures.
EBADF
SXTIOCSWTCH

Channel 0 was not opened before
this call.

Set the controlling channel. Possible errors
include:
EINVAL An invalid channel number was
given.
EPERM

The command was not executed
from channel O.

SXTIOCWF

Cause a channel to wait until it is the controlling channel. This command will return the
error, EINVAL, if an invalid channel number is
given.

SXTIOCUBLK

Turn off the loblk control flag in the virtual tty
of the indicated channel. The error EINVAL
will be returned if an invalid number or channel 0 is given.

SXTIOCSTAT

Get the status (blocked on input or output) of
each channel and store in the sxtblock structure
referenced by the argument. The error
EFAULT will be returned if the structure cannot be written.

SXTIOCTRACE

Enable tracing. Tracing information is written
to the console. This command has no effect if
tracing is not configured.

SXTIOCNOTRACE Disable tracing. This command has no effect if

tracing is not configured.

FILES
/dev/sxt??[O-7]
/usr/include/ sys/sxt.h

virtual tty devices
driver specific definitions

SEE ALSO
shl(C), stty(C), ioctl(S), open(S), termio(M)

May 16,1988

Page 2

SYS1TY(M)

SYS1TY(M)

Name
systty - System maintenance device.

Description
The file /dev/systty is the device on which system error messages are
displayed. The actual physical device accessed via /dev/systty is
selected during boot, and is typically the device used to control the
bootup procedure. The default physical device /dev/systty is determined by boot(HW) when the system is brought up.
Initially /dev/console is linked to /dev/systty.

Files
/dev/systty

See Also
boot(HW), console(M)

May 16, 1988

Page 1

TERMCAP (M)

TERMCAP (M)

Name
tenncap - Tenninal capability data base.
Description
The file /etc/termcap is a data base describing tennirws. This data
base is used by commands such as vi(C), vsh(C), Lyrix ,Multiplantm
and sub-routine packages such as curses (S). Tenninals are described
in termcap by giving a set of capabilities and by describing how
operations are perfonned. Padding requirements and initialization
sequences are included in termcap.
Entries in termcap consist of a number of fields separated by colons
': '. The first entry for each tenninal gives the names that are known
for the tenninal, separated by vertical bars ( I ). For compatibility
with older systems the first name is always 2 characters long. The
second name given is the most common abbreviation for the tenninal
and the name used by vi (C) and exeC). The last name given should be
a long name fully identifying the tenninal. Only the last name can
contain blanks for readability.
Capabilities (including XENIX Extensions)
The following is a list of the capabilities that can be defined for a
given tenninal. In this list, (P) indicates padding can be specified, and
(P*) indicates that padding can be based on the number of lines
affected. The capability type and padding fields are described in
detail in the following section "Types of Capabilities. "
The codes beginning with uppercase letters (except for CC) indicate
XENIX extensions. They are included in addition to the standard
entries and are used by one or more application programs. As with the
standard entries, not all modes are supported by all applications or terminals. Some of these entries refer to specific tenninal output capabilities (such as GS for "graphics start"). Others describe character
sequences sent by keys that appear on a keyboard (such as PU for
PageUp key). There are also entries that are used to attribute special
meanings to other keys (or combinations of keys) for use in a particular software program. Some of the XENIX extension capabilities have
a similar function to standard capabilities. They are used to redefine
specific keys (such as using function keys as arrow keys). The extension capabilities are included in the /etc/termcap file, as they are
required for some XENIX utilities (such as vsh(C». The more commonly used extension capabilities are described in more detail in the
section "XENIX Extensions."

May 16, 1988

Page 1

TERMCAP (M)

Name Type
ae
str
al
str
am
bool
as
str
bc
str
bs
bool
bt
str
bw
bool
CC

str

cd
ce
CF
ch

str
str
str
str

CL
c1
cm
co
CO
cr
cs
cv
CW
da
DA
db
dB
dC
dc
dF
dl
dm
dN
do
dT
ed
ei

str
str
str
num
str
str
str
str
str
bool
bool
bool
num
num
str
num
str
str
num
str
num
str
str

EN
eo
ff
G1
G2

str
bool
str
str
str

May 16,1988

TERMCAP(M)

Pad? Description
(P) End alternate character set
(P*) Add new blank line
Terminal has automatic margins
(P) Start alternate character set
Backspace if not "H
Terminal can backspace with "H
(P) Back tab
Backspace wraps from column 0
to last column
Command character in prototype
if terminal settable
(P*) Clear to end of display
(P) Clear to end of line
Cursor off
(P) Like cm but horizontal motion only,
line stays same
Sent by CHAR LEFT key
(P*) Clear screen
(P) Cursor motion
Number of columns in a line
Cursor on
(P*) Carriage return, (default "M)
(P) Change scrolling region (vt100),-like cm
(P) Like ch but vertical only.
Sent by CHANGE WINDOW key
Display may be retained above
Delete attribute string
Display may be retained below
Number of millisec of bs delay needed
Number of millisec of cr delay needed
(P*) Delete character
Number of millisec of ff delay needed
(P*) Delete line
Delete mode (enter)
Number of millisec of ol delay needed
Down one line
Number of millisec of tab delay needed
End delete mode
End insert mode; give" :ei=: .if ic
Sent by END key
Can erase overstrikes with a blank
(P*) Hardcopy terminal page eject (default "L)
Upper-right (1st quadrant) comer character
Upper-left (2nd quadrant) comer character

Page 2

TERMCAP (M)

TERMCAP (M)

Name Type Pad? Description
str
Lower-left (3rd quadrant) comer character
str
Lower-right (4th quadrant) comer character
str
. Center graphics character (similar to "+")
str
Down-tick character
str
Graphics mode end
num
Number of chars taken by GS and GE
str
Horizontal bar character
str
Left-tick character
str
Right-tick character
str
Graphics mode start
str
Up-tick character
str
Vertical bar character
bool
Hardcopy terminal
str
Half-line down (forward 1/2 linefeed)
str
Sent by HOME key (if not kh)
str
Home cursor (if no cm)
str
Half-line up (reverse 1/2linefeed)
str
Hazeltine; can't print -'s
str
(P) Insert character
str
Narne of file containing is
str
Insert mode (enter); give ':im=' ific
bool
Insert mode distinguishes nulls on display
(P*) Insert pad after character inserted
str
str
Terminal initialization string
str
Sent by 'other' function keys 0-9
str
Sent by backspace key
str
Sent by terminal down arrow key
Out of 'keypad transmit' mode
str
str
Sent by home key
str
Sent by terminal left arrow key
num
Number of 'other' keys
str
Termcap entries for other non-function keys
str
Sent by terminal right arrow key
str
Put terminal in 'keypad transmit' mode
str
Sent by terminal up arrow key
str
Labels on 'other' function keys
str
Sent by line delete key
str
Sent by line feed key
num
Number of lines on screen or page
str
Last line, first column (if no cm)
str
Arrow key map, used by vi version 2 only
bool
Safe to move while in insert mode
str
Memory lock on above cursor
str
Multiplan initialization string
str
Multiplan reset string
bool
Will scroll in stand-out mode
str
Memory unlock (tum off memory lock)

G3
G4
GC
GD
GE
GG
GH
GL
GR
GS
GU
GV
hc
hd
HM
ho
hu
hz
ic
if
im
in
ip
is
kO-k9
kb
kd
ke
kh
kl
kn
ko
kr
ks
ku
10-19
LD
LF
li
11
rna
mi
ml
MP
MR
ms
mu

May 16, 1988

Page 3

TERMCAP(M)

TERMCAP (M)

Name Type Pad? Description
nc
boo1
No correctly working carriage return
(DM2500,H2000)
nd
str
Non-destructive space (cursor right)
nl
str (P*) Newline character (default \n)
boo1
Tenninal is a CRT but doesn't scroll
ns
Sent by NEXT UNLOCKED CELL key
NU str
bool
Tenninal overstrikes
os
str
pc
Pad character (rather than null)
str
PD
Sent by PAGE DOWN key
PN
str
Start local printing
str
PS
End local printing
bool
pt
Has hardware tabs
(may need to be set with is)
str
Sent by PAGE UP key
PU
str
RC
Sent by RECALC key
str
Sent by TOGGLE REFERENCE key
RF
str
Sent by RETURN key
RT
str
End stand out mode
se
str (P) Scroll forwards
sf
Number of blank chars left by so or se
num
sg
str
Begin stand out mode
so
(P) Scroll reverse (backwards)
str
sr
(P) Tab (other than "lor with padding)
str
ta
str
Entry of similar tenninal - must be last
tc
str
String to end programs that use cm
te
String to begin programs that use cm
ti
str
Underscore one char and move past it
uc
str
str
End underscore mode
ue
ug
num
Number of blank chars left by us or ue
bool
ul
Tenninal underlines even though
it doesn't overstrike
Upline (cursor up)
str
up
str
Sent by up-arrow key (alternate to ku)
UP
str
Start underscore mode
us
Visible bell (may not move cursor)
str
vb
ve
str
Sequence to end open/visual mode
str
Sequence to start open/visual mode
vs
Sent by WORD LEFT key
WL str
Sent by WORD RIGHT key
WR str
bool
xb
Beehive (f1=escape, f2=ctrl C)
bool
A newline is ignored after a wrap
xn
(Concept)
bool
Return acts like ce \r \n
xr
(Delta Data)
Standard out not erased by writing over it
xs
bool
(HP 264?)
bool
Tabs are destructive, magic so char
xt
(Teleray 1061)

May 16, 1988

Page 4

TERMCAP(M)

TERMCAP (M)

A Sample Entry
The following entry describes the Concept-IOO, and is among the
more complex entries in the termcap file. (This particular Concept
entry is outdated, and is used as an example only.)
c 1 I c 100 I concept 100:is=\EU\Et\E7\E5\E8\El\ENH\EK\E\200\Eo&\200:\
:al=3*\E"R:am:bs:cd=I6*\E"C:ce=I6\E"S:cl=2*"L:\
:cm=\Ea%+ %+ :co#SO:dc=I6\E"A:dl=3*\E"B:\
:ei=\E\200:eo:im=\E"P:in:ip= 16*: li#24 :mi:nd=\E=:\
:se=\Ed\Ee:so=\ED\EE:ta=S\t:ul:up=\E;:vb=\Ek\EK:xn:
Entries may continue over to multiple lines by giving a backslash (\)
as the last character of a line. Empty fields can be included for readability between the last field on a line and the first field on the next.
Capabilities in termcap are of three types: Boolean capabilities,
which indicate that the terminal has some particular feature, numeric
capabilities giving the size of the terminal or the size of particular
delays, and string capabilities, which give a sequence that can be used
.to perform particular terminal operations.
Types of Capabilities
All capabilities have two letter codes. For instance, the fact that the
Concept has 'automatic margins' (i.e., an automatic return and
linefeed when the end of a line is reached) is indicated by the capability am. The description of the Concept includes am. Numeric capabilities are followed by the character '#' and then the value. Thus co,
which indicates the number of columns the terminal has, gives the
value 'SO' for the Concept.
Finally, string valued capabilities, such as ce (clear to end of line
sequence) are given by the two character code, an '=', and then a
string ending at the next following ':'. A delay in milliseconds may
appear after the '=' in such a capability, and padding characters are
supplied by the editor after the rest of the string is sent to provide this
delay. The delay can be either a integer, e.g., '20', or an integer followed by an '*', i.e. '3*'. A '*' indicates that the padding required is
proportional to the number of lines affected by the operation, and the
amount given is the per-affected-unit padding required. When a '*' is
specified, it is sometimes useful to give a delay of the form '3.5' to
specify a delay per unit to tenths of milliseconds.
A number of escape sequences are provided in the string valued capabilities for easy encoding of characters there. A \E maps to an ESCAPE
character, "x maps to a control-x for any appropriate x, and the
sequences \0 \r \t \b \f give a newline, return, tab, backspace and
formfeed. Finally, characters may be given as three octal digits after a
\, and the characters " and \ may be given as \" and \\. If it is necessary
to place a colon (:) in a capability, it must be escaped in octal as \072.
If it is necessary to place a null character in a string capability, it must
be encoded as \200. The routines that deal with termcap use C strings,

May 16, 1988

Page 5

TERMCAP(M)

TERMCAP (M)

and strip the high bits of the output very late so that a \200 comes out
as a \000 would.

Preparing Descriptions
The most effective way to prepare a terminal description is by imitating the description of a similar terminal in termcap and to build up a
description gradually, using partial descriptions with ex to check that
they are correct. Be aware that a very unusual terminal may expose
deficiencies in the ability of the termcap file to describe it. To test a
new terminal description, you can set the environment variable
TERM CAP to a pathname of a file containing the description you are
working on and the editor will look there rather than in /etc/termeap.
TERMCAP can also be set to the termcap entry itself to avoid reading
the file when starting up the editor.

Basic capabilities
The number of columns on each line for the terminal is given by the
eo numeric capability. If the terminal is a CRT, the number of lines on
the screen is given by the Ii capability. If the terminal wraps around to
the beginning of the next line when it reaches the right margin, it
should have the am capability. If the terminal can clear its screen,
this is given by the cl string capability. If the terminal can backspace,
it should have the bs capability, unless a backspace is accomplished
by a character other than "H in which case you should give this character as the be string capability. If it overstrikes (rather than clearing a
position when a character is struck over), it should have the os capability.

A very important point here is that the local cursor motions encoded in
termcap are undefined at the left and top edges of a CRT terminal. The
editor will never attempt to backspace around the left edge, nor will it
attempt to go up locally off the top. The editor assumes that feeding
off the bottom of the screen will cause the screen to scroll up, and the
am capability tells whether the cursor sticks at the right edge of the
screen. If the terminal has switch selectable automatic margins, the
termcap file usually assumes that this is on (i.e., am).
These capabilities suffice to describe hardcopy and 'glass-tty' terminals. Thus the model 33 teletype is described as
t31331 tty33:co#72:os
while the Lear Siegler ADM-3 is described as:
cll adm3131lsi adm3:am:bs:cl="Z:li#24:co#80

May 16, 1988

Page 6

ll;!;J(MCAr'

~M)

l/:!.,KMCAr

~M)

Cursor addressing

Cursor addressing in the terminal is described by a em string capability. This capability uses printj(S) like escapes (such as % x) in it.
These substitute to encodings of the current line or column position,
while other characters are passed through unchanged. If the em string
is thought of as being a function, its arguments are the line and then
the column to which motion is desired, and the % encodings have the
following meanings:
%d
%2
%3

%.
%+x
%>xy
%r
%i

%%
%n
%B
%D

replaced by line/column position, 0 origin
like %2d - 2 digit field
like %3d - 3 digit field
like printj(S) %c
adds x to value, then %.
if value > x adds y, no output
reverses order of line and column, no output
increments line/column position (for 1 origin)
gives a single %
exclusive or row and column with 0140
(DM2500)
BCD (16*(x/l0» + (x%10), no output
Reverse coding (x-2*(x%16», no output
(Delta Data).

Consider the HP2645, which, to get to row 3 and column 12, needs to
be sent \E&aI2c03Y padded for 6 milliseconds. Note that the order of
the rows and columns is inverted here, and that the row and column
are printed as two digits.
Thus its em capability is
'cm=6\E&%r%2c%2Y'. The Microterm ACT-IV needs the current row
and column sent preceded by a "T, with the row and column simply
encoded in binary, 'cm="T%.%.'. Terminals that use '%.' need to be
able to backspace the cursor (bs or be), and to move the cursor up one
line on the screen (up introduced below). This is necessary because it
is not always safe to transmit \t, \n "D and \r, as the system may
change or discard them.
A final example is the LSI ADM-3a, which uses row and column offset
by a blank character, thus 'cm=\E=%+ %+ '.

Cursor motions
If the terminal can move the cursor one position to the right, leaving
the character at the current position unchanged, this sequence should
be given as nd (non-destructive space). If it can move the cursor up a
line on the screen in the same column, it should be given as up. If the
terminal has no cursor addressing capability, but can home the cursor
(to very upper left comer of screen), this can be given as ho; similarly,
a fast way of getting to the lower left hand comer can be given as II;
this may involve going up with up from the home position, but the
editor will never do this itself (unless II does) because it makes no

May 16, 1988

Page?

TERMCAP (M)

TERMCAP (M)

assumption about the effect of moving up from the home position.
Area clears

If the tenninal can clear from the current position to the end of the
line, leaving the cursor where it is, the sequence should be given as ceo
If the tenninal can clear from the current position to the end of the
display, the sequence should be given as cd. The editor only uses cd
from the first column of a line.
Insert/delete line

If the tenninal can open a new blank line before the line where the
cursor is, the sequence should be given as al. Note that this is done
only from the first position of a line. The cursor must then appear on
the newly blank line. If the tenninal can delete the line on which the
cursor rests, the sequence shOUld be given as dl. This is done only
from the first position on the line to be deleted. If the tenninal can
scroll the screen backwards, the sequence can be given as sb, but al
can suffice. If the tenninal can retain display memory above, the da
capability should be given, and if display memory can be retained
below, then db should be given. These let the editor know that deleting a line on the screen may bring non-blank lines up from below or
that scrolling back with sb may bring down non-blank lines.
Insert/delete character

There are two basic kinds of intelligent tenninals with respect to the
insert/delete character that can be described using termcap. The most
common insert/delete character operations affect only the characters
on the current line and shift characters off the end of the line. Other
tenninals, such as the Concept 100 and the Perkin Elmer Owl, make a
distinction between typed and untyped blanks on the screen, shifting
upon an insert or delete only to an untyped blank on the screen which
is either eliminated, or expanded to two untyped blanks. You can find
out which kind of tenninal you have by clearing the screen and entering text separated by cursor motions. Enter 'abc def', using local
cursor motions (not spaces) between the 'abc' and the 'def'. Then
position the cursor before the 'abc' and put the terminal in insert
mode. If entering characters causes the rest of the line to shift rigidly
and characters to fall off the end, your tenninal does not distinguish
between blanks and untyped positions. If the 'abc' shifts over to the
'def' which then move together around the end of the current line and
onto the next as you insert, you have the second type of tenninal, and
should give the capability in, which stands for 'insert null'. No known
tenninals have an insert mode, not falling into one of these two
classes.
The editor can handle both tenninals that have an insert mode and terminals that send a simple sequence to open a blank position on the
current line. Specify im as the sequence to get into insert mode, or
give it an empty value if your tenninal uses a sequence to insert a

May 16, 1988

Page 8

lbRMCAr (M)

lbl<'MC'Ar (M)

blank position. Specify ei as the -sequence to leave insert mode
(specify this with an empty value if you also gave im an empty value).
Now specify ic as any sequence needed to be sent just before sending
the character to be inserted. Most terminals with a true insert mode
will not support ic, terminals that send a sequence to open a screen
position should give it here. (Insert mode is preferable to the sequence
to open a position on the screen if your terminal has both.) If post
insert padding is needed, give this as a number of milliseconds in ip (a
string option). Any other sequence that may need to be sent after an
insert of a single character may also be given in ip.
It is occasionally necessary to move around while in insert mode to
delete characters on the same line (e.g., if there is a tab after the insertion position). If your terminal allows motion while in insert mode,
you can give the capability mi to speed up inserting in this case. Omitting mi will affect only speed. Some terminals (notably Datamedia' s)
must not have mi because of the way their insert mode works.
Finally, you can specify delete mode by giving dm and ed to enter and
exit delete mode, and dc to delete a single character while in delete
mode.
Highlighting, underlining, and visible bells
If your terminal has sequences to enter and exit standout mode, these
can be given as so and se respectively. If there are several flavors of

standout mode (such as reverse video, blinking, or underlining - half
bright is not usually an acceptable 'standout' mode unless the terminal
is in reverse video mode constantly), the preferred mode is reverse
video by itself. It is acceptable, if the code to change into or out of
standout mode leaves one, or even two blank spaces on the screen, as
the TVI 912 and Teleray 1061 do. Although it may confuse some programs slightly, it cannot be helped.
Codes to begin underlining and end underlining can be given as us,
and ue respectively. If the terminal has a code to underline the current
character and move the cursor one space to the right, such as the
Microterm Mime, the sequence can be given as uc. (If the underline
code does not move the cursor to the right, specify the code followed
by a nondestructive space.)
If the terminal has a way of flashing the screen to indicate an error

quietly (a bell replacement), the sequence can be given as vb; it must
not move the cursor. If the terminal should be placed in a different
mode during open and visual modes of ex, the sequence can be given
as vs and ve, sent at the start and end of these modes respectively.
These can be used to change from a underline to a block cursor and
back.
If the terminal needs to be in a special mode when running a program

that addresses the cursor, the codes to enter and exit this mode can be
given as ti and teo This arises, for example, from terminals like the

May 16, 1988

Page 9

TERMCAP (M)

TERMCAP(M)

Concept with more than one page of memory. If the terminal has only
memory relative cursor addressing and not screen relative cursor
addressing, a one screen-sized window must be fixed into the terminal
for cursor addressing to work properly.
If your terminal correctly generates underlined characters (with no
special codes needed), even though it does not overstrike, you should
give the capability ul. If ov~rstrikes are erasable with a blank, this
should be indicated by specifying eo.
Keypad

If the terminal has a keypad that transmits codes when the keys ate
pressed, this information can be given. Note that it is not possible to
handle terminals where the keypad only works in local (this applies,
for example, to the unshifted HP 2621 keys). If the keypad can be set
to transmit or not to transmit, enter these codes as ks and ke. Otherwise, the keypad is assumed always to transmit. The codes sent by the
left arrow, right arrow, up arrow, down arrow, and home keys can be
given as kl, kr, ku, kd, and kh. If there are function keys such as fO,
fl, ... , f9, the codes they send can be given as kO, kl, •.., k9. If these
keys have labels other than the default fO through f9, the labels can be
given as 10, 11, •••, 19. If there are other keys that transmit the same
code as the terminal expects for the corresponding function, such as
clear screen, the termcap 2 letter codes can be given in the ko capability, for example, ':ko=cl,ll,sf,sb:', which says that the terminal has
clear, home down, scroll down, and scroll up keys that transmit the
same thing as the cl, 11, sf, and sb entries.

The rna entry is also used to indicate arrow keys on terminals which
have single character arrow keys. It is obsolete, but still in use in version 2 of vi, which must be run on some minicomputers due to
memory limitations. This field is redundant with kl, kr, ku, kd, and
kh. It consists of groups of two characters. In each group, the first
character is what an arrow key sends, the second character is the
corresponding vi command. These commands are h for kl, j for kd, k
for ku, I for kr, and H for kh. For example, the Mime would be
:rna="Kj"Zk"Xl: indicating arrow keys left CH), down CK), up CZ),
and right CX). (There is no home key on the Mime.)
Miscellaneous

If the terminal requires other than a null (zero) character as a pad, this
can be given as pc.
If tabs on the terminal require padding, or if the terminal uses a character other than "I to tab, the sequence can be given as tao

Terminals that do not allow ,-, characters to be displayed (such as
Hazeltines), should indicate hz. Datamedia terminals that echo
carriage-retum-linefeed for carriage return, and then ignore a following linefeed, should indicate nco Early Concept terminals, that ignore

May 16,1988

Page 10

TERMCAP (M)

TERMCAP (M)

a linefeed immediately after an am wrap, should indicate XD. If an
erase-eol is required to get rid of standout (instead of merely writing
on top of it), xs should be given. Teleray terminals, where tabs tum all
characters moved over to blanks, should indicate xt. Other specific
terminal problems may be corrected by adding more capabilities of
the form xx.
If the leading character for commands to the terminal (normally the

escape character) can be set by the software, specify the command
character(s) with the capability CC.
Other capabilities include is, an initialization string for the terminal,
and if, the name of a file containing long initialization strings. These
strings are expected to properly clear and then set the tabs on the terminal, if the terminal has settable tabs. If both are given, is is
displayed before if. This is useful where if is lusr/lib/tabsetl std , but
is clears the tabs first.
Similar Terminals
If there are two very similar terminals, one can be defined as being
just like the other with certain exceptions. The string capability, te,
can be given with the name of the similar terminal. This capability
must be last and the combined length of the two entries must not
exceed 1024. Since term lib routines search the entry from left to right,
and since the te capability is replaced by the corresponding entry, the
capabilities given at the left override the ones in the similar terminal.
A capability can be cancelled with xx@ where xx is the capability.
For example:

hn 12621nl:ks@:ke@:tc=2621:

This defines a 2621nl that does not have the ks or ke capabilities, and
does not tum on the function key labels when in visual mode. This is
useful for different modes for a terminal, or for different user preferences.
XENIX Extensions
Capabilities This table lists the (previously listed) XENIX extensions
to the termcap capabilities. It shows which codes generate information
input from the keyboard to the program reading the keyboard and
which codes generate information output from the program to the
screen.

May 16, 1988

Page 11

1 }:!;f(M LAl:' ~ Nl)

Name
CF
CL
CO
CW
DA
EN
G1
G2
G3
G4
GC
GD
GE
GG
GH
GL
GR
GS
GU
GV
HM
MP
MR
NU
PD
PU
RC
RF
RT
UP
WL
WR

1 CI\lYll.-rl.r "IV.L)

InputlOutputDescription
str
Cursor off
str
Sent by CHAR LEFT key
str
Cursor on
str
Sent by CHANGE WINDOW key
bool
Delete attribute string
str
Sent by END key
str
Upper-right (1st quadrant) comer character
str
Upper-left (2nd quadrant) comer character
str
Lower-left (3rd quadrant) comer character
Lo~er-right (4th quadrant) comer character
str
str
Center graphics character (similar to +)
str
Down-tick character
str
Graphics mode end
num
Number of chars taken by GS and GE
str
Horizontal bar character
str
Left-tick character
str
Right-tick character
str
Graphics mode start
str
Up-tick character
str
Vertical bar character
str
Sent by HOME key (if not kh)
str
Multiplan initialization string
str
Multiplan reset string
str
Sent by NEXT UNLOCKED CELL key
str
Sent by PAGE DOWN key
str
Sent by PAGE UP key
str
Sent by RECALC key
str
Sent by TOGGLE REFERENCE key
str
Sent by RETURN key
str
Sent by up-arrow key (alternate to ku)
str
Sent by WORD LEFT key
str
Sent by WORD RIGHT key

Cursor motion Some application programs make use of special editing
codes. CR and CL move the cursor one character right and left
respectively. WR and WL move the cursor one word right and left
respectively. CW changes windows, when they are used in the program.
Some application programs tum off the cursor. This is accomplished
using CF for cursor off and CO to tum it back on.
Graphic mode. If the terminal has graphics capabilities, this mode
can be turned on and off with the GS and GE codes. Some terminals
generate graphics characters from all keys when in graphics mode
(such as the Visual SO). The other G codes specify particular graphics
characters accessed by escape sequences. These characters are available on some terminals as alternate graphics character sets (not as a
bit-map graphic mode). The vt100 has access to this kind of alternate
graphics character set, but not to a bit-map graphic mode.

May 16, 1988

Page 12

TERMCAP(M)

TERMCAP (M)

Files

/etc/tenncap

File containing tenninal descriptions

See Also

exeC), curses(S), tenncap(S), tset(C), vi(C), more(C), screen(HW)
Credit

This utility was developed at the University of California at Berkeley
and is used with pennission.
Notes

exeC) allows only 256 characters for string capabilities, and the routines in termcap(S) do not check for overflow of this buffer. The total
length of a single entry (excluding only escaped newlines) may not
exceed 1024.
The rna,

VS,

and ve entries are specific to the vi (C) program.

Not all programs support all entries. There are entries that are not
supported by any program.
XENIX tenncap extensions are explained in detail in the software

application documentation.
Refer to the screen (HW) manual page, for a description of the character sequences used by the monitor device on your specific XENIX System.

May 16, 1988

Page 13

lliJ<.M1NALS (M)

lliJ<.M1NALS (M)

Name
terminals - List of supported terminals.
Description
The following list, derived from the file /etc/termcap, shows the terminal name (suitable for use as a TERM shell variable), and a short
descsription of the terminal. The advice in termcap (M) will assist
users in creating termcap entries for terminals not currently supported.
Name

Terminal

33
37
43
300
1200
1620
1640
2392
2392an
2392ne
2621
2621k45
2621nl
2621nt
2621wl
2622
262x
2640
2640b
3045
3151
3161
3163
3164
4025
4025-17
4025-17ws
4025ex
5425
5425-w
7900
8001
912b
925

model 33 teletype
model 37 teletype
model 43 teletype
terminet 300
terminet 1200
diablo 1620
diablo 1640
239x series
hp 239x in ansi mode
239x series
hp 2621
hp 2621 with 45 keyboard
hp 2621 with no labels
hp 2621 w/no tabs
hp 2621 with labels
hp 2622
hp 262x series
hp 2640a
hp 264x series
datamedia 3045a
ibm3151
ibm3161
ibm3163
ibm3164
Tektronix 4024/4025/4027
Tek 4025 17 line window
tek 4025 17 line window in workspace
Tek 4025
AT&T Teletype 5425
AT&T Teletype 5425 with 132 columns
NCR 7900-1
ISC8001
new Televideo
newer Televideo

May 16, 1988

Page 1

TERMINALS (M)

925so
Ma2
TWO

a980
aa
aaa
aaa30
aaadb
aaa48db
act5s
adds
adds25
admll
adm12
adm2
adm3
adm3a
adm3a+
adm3al9.2
adm3aso
adm5
adm31
adm42
aj830
altos3
altos4
altos5
amp219
am219w
amp232
ampex
ansi
ansi-nam
arpanet
atarist
b26
bh3m
big2621
cl00
cl004p
cl00rv
c100rv4p
cl00rv4pna
cl00rv4ppp
cl00rvs
cl00s
c3102
carlock

May 16, 1988

TERMINALS (M)

newer Televideo with attribute byte workaround
Ampex Model 232 with 132 lines
Altos Computer Systems II
adds consul 980
Ann Arbor
Ann Arbor Ambassador/48 lines
Ann Arbor Ambassador 30/destructive backspace
Ann Arbor Ambassador 48/destructive backspace
Ann Arbor Ambassador 48/destructive backspace
skinnyact5
adds viewpoint
adds regent 25 with local printing
lsi admll
lsi adm12
lsi adm2
lsi adm3
lsi adm3a
lsi adm3a+
lsi adm3a at 19.2 baud
lsi adm3a with {} for standout
lsi adm5
Lear Siegler ADM31
lsi adm42
Anderson Jacobson
Altos III
Altos IV
Altos V
Ampex with Automargins
Ampex with 132 columns
Ampex Model 232
Ampex dialogue
XENIX standard crt
Ansi standard crt without automargin
network
Atari ST vt52
Burroughs ansi monitor with 29 lines
Beehive IIIm
48-line 2621
Concept 100
cl00 w/4 pages
c 100 rev video
c100 w/4 pages
c 100 with no arrows
c100 with printer port
slow reverse Concept 100
slow Concept 100
Cromemco 3102
k1c

Page 2

TERMINALS (M)

cci
cdc456
cdc456tst
cdi
cie467
cit80
cit80nam
compucolor
d132
datapoint
delta
dg
digilog
dm1520
dm1521
dm2500
dm3025
dmterm
dosansi
dtlOO
dtl00w
dt200
dt80
dt80132
dtc300s
du
dumb
dwl
dw2
ep40
ep48
espHAZ
ethernet
exidy
fos
fox
free 100
freell0
ftl024
gt40
gt42
h1500
h1510
h1520
h1552
h1552rv
h2000
h19

May 16,1988

l1i,RM1NALS (M)

cci 4574
cdc
dc456tst
cdi1203
C.Itoh 467, 414 Graphics terminal
C.Itoh 80
C.Itoh 80 without automargins
Compucolor II
Datagraphix 132a
Datapoint 3360
Delta data 5000
Data general 6053
Digilog 333
Datamedia 1520
Datamedia 1521
Datamedia 2500
Datamedia 3025a
Tandy Deskmate terminal
ANSI.SYS standard crt
Tandy DT-100 terminal
Tandy DT-100 terminal
Tandy DT-200
Datamedia dt80/l
Datamedia dt80/l in 132 char mode
dtc 300s
dialup
unknown
Decwriter I
Decwriter II
Execuport 4000
Execuport 4080
Esprit 6310 in Hazeltine emulation mode
network
Exidy sorcerer as dm2500
Fortune system
Perkin elmer 1100
Freedom 100
Freedom 110
Forward Technology graphics controller
Dec gt40
Dec gt42
Hazeltine 1500
Hazeltine 1510
Hazeltine 1520
Hazeltine 1552
Hazeltine 1552 reverse video
Hazeltine 2000
Heathkit h19 wi function keypad

Page 3

TERMINALS (M)

h19a
h19nk
hp
hp2626
hp2648
hpansi
hpex
hpsub
il00
ibm3101
intext
ipc
kl0
kt7ix
lisa
ml00
macterm
macterm-nam
md1110
microb
microterm
microterm5
mime
mime2a
mime2as
mime3a
mime3ax
mimefb
mimehb
mt70
nabu
netx
nucterm
oadm31
omron
ot80
owl
pe550
pixel
plasma
pt1500
pt210
qume5
qvtlOI
qvtlOl+
qvtlOl+so
qvtlOlb
qvtl02

May 16, 1988

TERMINALS (M)

Heathkit h19 ansi mode
Heathkit w/numeric keypad (not function keys)
hp 264x series
hp 2626
HP 2648a graphics terminal
Hewlett Packard 700/44 in HP-PCterm mode
hp extended capabilites
hp terminals -- capability subset
General Terminal 100A (formerly Infoton 100)
IBM 3101-10
ISC modified owl 1200
Intel IPC
Kaypro 10
Kimtron kt-7
Apple Lisa XENIX terminal display (white on black)
Radio Shack model 100
Apple Macintosh terminal emulator in vtl 00 mode
MacTerm in vt100 mode with automargin NOT set
Cybemex mdl-110
Micro bee series
Microterm act iv
Microterm act v
Microterm mime 1
Microterm mime2a (emulating an enhanced vt52)
Microterm mime2a (emulating an enhanced soroc iq120)
mime 1 emulating 3a
mime1 emulating enhanced 3a
full bright mime 1
half bright mime 1
Morrowmt70
Nabu terminal
netronics
NUC homebrew
old adm31
Omron 8025AG
Onyx ot80
Perkin elmer 1200
Perkin elmer 550
Pixel terminal
plasma panel
Convergent Technologies PT
Tandy TRS-80 PT-210 printing terminal
Qume Sprint 5
Qume vtlOl
Qume vtl 01 Plus vers c
Qume vtlOl + with protected mode/standout
Qume vt101 with cursor set to blinking underline
Qume vtl02

Page 4

TERMINALS (M)

qvtl03
qvt108
qvtl09
qvtl19
qvt119+
qvt201
qvt202
qvt203
regent
regent20
regent25
regent25a
regent40
regent60
regent60na
regentlOO
rx303
sb1
sb2
sexidy
sk8620
soroc
sun
superbeeic
switch
swtp
tl061
t106lf
t3700
t3800
td200
tek
tek4013
tek4014
tek4014sm
tek4015
tek4015sm
tek4023
teletec
terak
ti
ti745
ti924
ti924-8
ti926
ti931
trs100
trs16

May 16,1988

TERMINALS (M)

Qume vt103
Qume vt108
Qume vtl09
Qume vtl19
Qume vtl19 Plus vers c
Qume vt201
Qume vt202
Qume vt203 PLUS
adds regent series
adds regent 20
adds regent 25
adds regent 25a
adds regent 40
adds regent 60
regent 60 w/no arrow keys
adds regent 100
Rexon 303 terminal
Beehive superbee
fixed superbee
Exidy smart
Seiko 8620
Soroc 120
Sun Microsystems Workstation monitor
superbee with insert char
intelligent switch
Southwest Technical Products ct82
Teleray 1061
Teleray 1061 with fast PROMs
dumb Teleray 3700
Teleray 3800 series
Tandy 200
Tektronix 4012
Tektronix 4013
Tektronix 4014
Tektronix 4014 in small font
Tektronix 4015
Tektronix 4015 in small font
Tektronix 4023
Teletec Datascreen
Terak emulating Datamedia 1520
Texas Instruments silent 700
Texas Instruments silent 745
Texas Instruments 924 VDT 7 bit
Texas Instruments 924 VDT 8 bit
Texas Instruments 926 VDr
Texas Instruments 931 VDT
Tandy TRS-80 Model 100
Tandy trs-80 model 16 console

Page 5

.1 D.l\1Y.lllVfl.l.JiJ

trs600
tvi910
tvi910+
tvi912
tvi924
tvi950
tvi950-2p
tvi950-4p
tvi950-ap
tvi950b
tvi950ns
tvi9220
tvi9220w
v50
v55
vi50
vi55
vi200
vi200f
vi200ic
vi200rvic
vi200rv
vis613
vt50
vt50h
vt52
vt52so
vt100
vt100-nam
vt100n
vt100s
vt100w
vtl02
vt131
vtl32
vt220
vtz
w2110A
ws584
ws584fr
ws584gr
ws584nr
ws584sp
ws584sw
ws584uk
ws584us
ws685
wy30

May 16,1988

\1Y~)

Tandy Model 600
old Televideo 910
Televideo 910 PLUS
old Televideo
Televideo924
Televideo950
Televideo950 w/2 pages
Televideo950 w/4 pages
Televideo950 w/aIt pages
bare Televideo950 no is
Televideo950 wino standout
Televideo 9220 w/status line @ bottom
Televideo 9220 132 col w/status line @ bottom
Visual 50 emulation of DEC vt52
Visual 55 emulation of DEC vt52 (called V55)
Visual 50 in ADDS viewpoint emulation
Visual 55 using ADDS emulation
Visual 200 with function keys
Visual 200 no function keys
Visual 200 using insert char
Visual 200 reverse video using insert char
Visual 200 reverse video
Visual 613
DEC vt50
DEC vt50h
DEC vt52
DEC vt52 with brackets added for standout use
DEC vt100
DEC vt100 without automargins
DEC vt100 wino init
DEC vt100 132 cols 14 lines
DEC vt100 132 cols
DEC vtl02
DEC vt131
DEC vt132
DEC vt220 generic
Zilog vtz 2/10
Wang 211 0 Asynch Data Entry Terminal - 80 column
Olivetti WS584
Olivetti WS584 with French keyboard
Olivetti WS584 with German keyboard
Olivetti WS584 with Norwegian/Danish keyboard
Olivetti WS584 with Spanish keyboard
Olivetti WS584 with Swedish/Finnish keyboard
Olivetti WS584 with U.K. keyboard
Olivetti WS584 with U.S.A. keyboard
Olivetti WS685
Wyse 30

Page 6

TERMINALS (M)

TERMINALS (M)

wy50
wy50n
wy50vb
wy50w
wy60
wy60w
wy75
wy75ap
wy75w
wy75x
wy85
wy85w
wy100
wy350
wy350w
wy50l
x1720
xitex
z29
zen30
zen40
zen50
zephyr
zephymam

Wyse 50
Wyse 50 - 80 column screen, no automargin
Wyse 50 with visible bell
Wyse 50 with 132 columns
Wyse 60 with 80 column/24 line screen in wy60 mode
Wyse 60 with 132 column/24 line screen in wy60 mode
Wyse 75 with 80 column line
Wyse 75 with Applications and Cursor keypad modes
Wyse 75 in 132 column mode
Wyse 75 with 132 column lines in vi editor mode
Wyse 85 in 80 column mode', vtl 00 emulation
Wyse 85 in 132 column mode, vt100 emulation
Wyse 100
Wyse 350 80 column color tenninal emulating wy50
Wyse 350 132 column color tenninal emulating wy50
Wyse 60 with 80 column/43 line screen in WY50+ mode
Xerox 1720
Xitex sct-100
Zenith z29
zentec 30
zentec 40
zentec 50
zentec zephyr220 in vt100 mode
zentec zephyr220 in vt100 mode w/out automargins

Files
/etc/tenncap

See Also
tset(C), environ(M), tenncap(M)

May 16,1988

Page 7

TERMINFO(M)

TERMINFO(M)
Name
tenninfo - Tenninal capability data base
Syntax
/usr/lib/tenninfo/* /*
Description

terminfo is a data base describing terminals, used, e.g., by terminfo(S).
Tenninals are described in terminfo by a set of capabilities that they
have, and by describing how operations are perfonned. Padding
requirements and initialization sequences are included in terminfo.

Entries in terminfo consist of a number of fields separated by commas
, ,'. White space after each ',' is ignored. The first entry for each terminal gives the various names that are known for the tenninal. Each of
these entries is separated by 'I '. The first name given is the most common abbreviation for the terminal, (referred to as the "root name' ')
the last name given should be a long name fully identifying the terminal, and all others are understood as synonyms for the terminal name.
All names but the last should be in lower case and contain no blanks;
the last name can contain upper case and blanks for readability.
Tenninal names (except for the last entry) should be chosen using the
following conventions. The particular piece of hardware making up
the terminal should have a root name chosen, for example, "hp2621".
This name should not contain hyphens, except that synonyms may be
chosen that do not conflict with other names. Modes that the
hardware can be in, or user preferences, should be indicated by
appending a hyphen and an indicator of the mode. Thus, a vt-100 in
132 column mode would be vt100-w. The following suffixes should
be used where possible:
Suffix
-w
-am
-nam
-n

-na
-np

-rv

~eaning

Wide mode (more than 80 columns)
With auto margins (usually default)
Without automatic margins
Number of lines on the screen
No arrow keys (leave them in local)
Number of pages of memory
Reverse video

Example
vt100-w
vt100-am
vt100-nam
aaa-60
c100-na
c100-4p
ciOO-rv

In the following table, the "variable" is the name by which the programmer (using the terminfo library) accesses the capability. The

"capname" is the short name used in the text of the database, and is
used by a person updating the database. The "i.code" is the two letter
internal code used in the compiled database, and always corresponds
to the termcap(M) capability name.

May 16,1988

Page 1

TERMINFO(M)

TERMINFO(M)

Capability names have no hard length limit, but an informal limit of 5
characters has been adopted to keep them short. Whenever possible,
names are chosen to be the same as or similar to the ANSI X3.64-1979
standard. Semantics are also intended to match those of the specific a tion.
(P)

indicates that padding may be specified
(G)

indicates that the string is passed through tparm with parms as
given (#i).
(*)

indicates that padding may be based on the number of lines
affected
(#.)
1

indicates the i

th

parameter.

(t) Not present in all versions of termcap.

Variable
Booleans:

Capname

I.
Code

auto_left_margin,

bw

bw

auto_righcmargin,
ceol_standout~litch,

am
xsb
xhp

am
xb
xs

eacnewline~litch,

xenl

xn

erase_overstrike,
generic_type,

eo
gn

eo
gn

hard_copy,
has_meta_key,

hc
km

hc
km

has_status_Iine,
memory_above,

hs
in
da

hs
in
da

memory_below,

db

db

move_insert_mode,
move_standoucmode,
ovecstrike,
status_Iine_esc_ok,

mir
msgr
os
eslok

mi
ms
os
es

beehive~litch,

insercnull~litch,

May 16, 1988

Description
cub I wraps from column 0 to last
column
Tenninal has automatic margins
Beehive (f1=escape, f2=ctrl C)
Standout not erased by overwriting
(hp)
Newline ignored after 80 cols
(Concept)
Can erase overstrikes with a blank
Generic line type (e.g., dialup,
switch).
Hardcopy tenninal
Has a meta key (shift, sets parity
bit)
Has extra "status line"
Insert mode distinguishes nulls
Display may be retained above
the screen
Display may be retained below
the screen
Safe to move while in insert mode
Safe to move in standout modes
Tenninal overstrikes
Escape can be used on the status
line

Page 2

TERMINFO(M)

TERMINFO(M)
teleray~litch,

xt

xt

tilde~litch,

transparencunderline,
xon_xoff,

hz
ul
xon

hz
ul
xo

Numbers:
columns,
iniCtabs,
lines,
lines_oCmemory,

cols
it
lines
1m

co
it
Ii
1m

magic300kie~litch,

xmc

sg

padding_baud_rate,

pb

pb

virtual_terminal,

vt

vt

width_status_line,

wsl

ws

Strings:
back_tab,
bell,
carriage_return,
change_scroICregion,

cbt
bel
cr
csr

bt
bl
cr
cs

clear_alI_tabs,
clear_screen,
clceol,
clr_eos,
column_address,
command3haracter,

tbc
clear
el
ed
hpa
cmdch

ct
cl
ce
cd
ch
CC

cursor_address,

cup

cm

cursocdown,
cursochome,
cursocinvisible,
cursocleft,
cursocmem_address,
cursor_normal,

cudl
home
civis
cubl
mrcup
cnonn

do
ho
vi
Ie
CMt
ve

cursocright,

cufl

nd

cursocto_ll,
cursor_up,

11
cuul

11
up

May 16, 1988

Tabs ruin, magic so char
(Teleray 1061)
Hazeltine; can not print -'s
Underline character overstrikes
Tenninal uses XON/XOFF
handshaking

Number of columns in a line
Tabs initially every # spaces
Number of lines on screen or page
Lines of memory if > lines.
omeans varies
Number of blank chars left by
smsoor rmso
Lowest baud where crlnl padding
is needed
Virtual terminal number (UNIX
system)
No. columns in status line

Back tab (P)
Audible signal (bell) (P)
Carriage return (P*)
Change to lines # 1 through #2
(vt-lOO) (PO)
Clear all tab stops (P)
Clear screen and home cursor (P*)
Clear to end of line (P)
Clear to end of display (P*)
Set cursor column (PO)
Tenn. settable cmd char in
prototype
Screen reI. cursor motion row #1
col #2 (PO)
Down one line
Home cursor (ifno cup)
Make cursor invisible
Move cursor left one space
Memory relative cursor addressing
Make cursor appear normal
(undo vs/vi)
Non-destructive space (cursor
right)
Last line, first column (if no cup)
Upline (cursor up)

Page 3

TERMINFO(M)

TERMINFO(M)

cursocvisible,
delete_character,
delete_line,
dis_status_Iine,
down_haICline,

cvvis
dchl
dll
dsl
hd

vs
dc
dl
ds
hd

entecalccharseCmode,
entecblink_mode,
entecbold_mode,
entecca_mode,

smacs
blink
bold
smcup

as
mb
md
ti

entecdelete_mode,
entecdim_mode,
entecinsert_mode,
entecprotected_mode,
enter_reverse_mode,
entecsecure_mode,

smdc
dim
smir
prot
rev
invis

entecstandouCmode,
entecunderline_mode,
erase_chars
exiCalCcharsecmode,
exicattribute_mode,
exicca_mode,

smso
smul
ech
rmacs
sgrO
rmcup

so
us
ec
ae
me
te

exiCdelete_mode,
exicinsert_mode,
exicstandouCmode,
exicunderline_mode,
flash_screen,
form_feed,
from_status_Iine,
iniclstring,
inic2string,
inic3string,
inicfile,
insert_character,
insert_line,
insert_padding,

rmdc
rmir
rmso
rmul
flash
ff
fsl
isl
is2
is3
if
ichl
ill
ip

ed
ei
se
ue
vb
ff
fs
il
i2
i3
if
ic
al
ip

key_backspace,
key_catab,
key_clear,
key_ctab,
key_dc,
key_dl,
key_down,
key_eic,

kbs
ktbc
kclr
kctab
kdchl
kdll
kcudl
krrnir

kb
ka
kCt
kt
kDt
kLt
kd
kMt

May 16, 1988

dm
rnh

im
mp
mr
mk

Make cursor very visible
Delete character (P*)
Delete line (P*)
Disable status line
Half-line down (forward 1/2
linefeed)
Start alternate character set (P)
Tum on blinking
Tum on bold (extra bright) mode
String to begin programs that use
cup
Delete mode (enter)
Tum on half-bright mode
Insert mode (enter);
Tum on protected mode
Tum on reverse video mode
Tum on blank mode (chars
invisible)
Begin stand out mode
Start underscore mode
Erase #1 characters (PG)
End alternate character set (P)
Tum off all attributes
String to end programs that use
cup
End delete mode
End insert mode
End stand out mode
End underscore mode
Visible bell (may not move cursor)
Hardcopy terminal page eject (P*)
Return from status line
Terminal initialization string
Terminal initialization string
Terminal initialization string
Name of file containing is
Insert character (P)
Add new blank line (P*)
Insert pad after character inserted
(p*)
Sent by backspace key
Sent by clear-aU-tabs key
Sent by clear screen or erase key
Sent by clear-tab key
Sent by delete character key
Sent by delete line key
Sent by terminal down arrow key
Sent by rmir or smir in insert
mode

Page 4

TERMINFO(M)

TERMINFO(M)

key_eol,
key_eos,

kel
ked

kEt
kSt

key_fO.
key_fl.
key_flO.
key_f2,
key_f3,
key_f4,
key_f5.
key_f6.
key_fl,
key_f8,
key_f9,
key_home,
key_ic,

kfO
kfl
kflO
kf2
kf3
kf4
kf5
kf6
kf7
kf8
kf9
khome
kichl

kO
kl
k
k2
k3
k4
k5
k6
k7
k8
k9
kh
kI

key_il,
key_left,
key_ll,
key_npage,
key_ppage,
key_right,
key_sf,
key_sr,
key_stab,
key_up,
keypad_local,
keypad_xmit,

kill
kcubl
kIl
knp
kpp
kcufl
kind
kri
khts
kcuul
rmkx
smkx

kAt
kl
kHt
kNt
kPt
kr
kFt
kRt
kTt
ku
ke
ks

lab_fO,
lab_fl,
lab_flO,

IfO
Ifl
IflO

10

lab_f2,
lab_f3,
lab_f4,
lab_f5,
lab_f6,
lab_fl,
lab_fS,
lab_f9,
meta_on,
meta_off,
newline,

If2
If3
If4
If5
1f6
Ifl
If8
If9
smm
rmm
nel

12

pad_char,
parm_dch,

pad
dch

pc
DCt

May 16, 1988

11
la

13
14
15
16
17
18
19
mm
mo
nw

Sent by c1ear-to-end-of-line key
Sent by c1ear-to-end-of-screen
key
Sent by function key fo
Sent by function key fl
Sent by function key fl 0
Sent by function key f2
Sent by function key f3
Sent by function key f4
Sent by function key f5
Sent by function key f6
Sent by function key fl
Sent by function key f8
Sent by function key f9
Sent by home key
Sent by ins char/enter ins mode
key
Sent by insert line
Sent by terminal left arrow key
Sent by home-down key
Sent by next-page key
Sent by previous-page key
Sent by terminal right arrow key
Sent by scroll-forward/down key
Sent by scroll-backward/up key
Sent by set-tab key
Sent by terminal up arrow key
Out of "keypad transmit" mode
Put terminal in "keypad transmit"
mode
Labels on function key fo if not fo
Labels on function key fl if not fl
Labels on function key fl 0 if not
flO
Labels on function key f2 if not f2
Labels on function key f3 if not f3
Labels on function key f4 if not f4
Labels on function key f5 if not f5
Labels on function key f6 if not f6
Labels on function key fl if not fl
Labels on function key f8 if not f8
Labels on function key f9 if not f9
Tum on "meta mode" (8th bit)
Tum off "meta mode"
Newline (behaves like cr followed
by If)
Pad character (rather than null)
Delete #1 chars (PG*)

Page 5

TERMINFO(M)

TERMINFO(M)

pann_delete_line,
pann_down_cursor,
pann_ich,
pann_index,
pann_insert_line,
pann_lefccursor,
pann_righccursor,

dl
cud
ich
indn
il
cub
cuf

DLt
DOt
ICt
SFt
ALt
LEt
Rlt

pann_rindex,
pann_up_cursor,
pkey_key,

rin
cuu
pfkey

SRt
UPt
pk

pkey_local,

pfloc

pI

pkey_xmit,

pfx

px

princscreen,
prtr_off,
prtcon,
repeaCchar,
reseCI string,

mcO
mc4
mc5
rep
rsl

ps
pf
po
rp
r1

resec2string,

rs2

r2

reseC3string,

rs3

r3

resecfile,
restore_cursor,
row _address,

rf

rf

rc
vpa

rc
cv

save_cursor,
scroll_forward,
scroll_reverse,
secattributes,
sectab,

sc
ind
ri
sgr
hts

sc
sf
sr
sa
st

secwindow,

wind

wi

tab,

ht

ta

to_status_line,
underline3har,

tsl
uc

ts
uc

up_haICline,
inicprog,
key_aI,
key_a3,

hu
iprog
kal
ka3

hu
iP
KIt
K3t

May 16, 1988

Delete #1 lines (PG*)
Move cursor down #1 lines (PG*)
Insert #1 blank chars (PG*)
Scroll forward #1 lines (PG)
Add #1 new blank lines (PG*)
Move cursor left #1 spaces (PG)
Move cursor right #1 spaces
(PG*)
Scroll backward #1 lines (PG)
Move cursor up #1 lines (PG*)
Prog funct key #1 to type
string #2
Prog funct key #1 to execute
string #2
Prog funct key #1 to xmit
string #2
Print contents of the screen
Tum off the printer
Tum on the printer
Repeat char #1 #2 times. (PG*)
Reset tenninal completely to sane
modes
Reset terminal completely to sane
modes
Reset tenninal completely to sane
modes
Name of file containing reset string
Restore cursor to position of last sc
Vertical position absolute
(set row) (PG)
Save cursor position (P)
Scroll text up (P)
Scroll text down (P)
Define the video attributes (PG9)
Set a tab in all rows, current
column
Current window is lines #1-#2
cols #3-#4
Tab to next 8 space hardware tab
stop
Go to status line, column #1
Underscore one char and move
past it
Half-line up (reverse 1/2 linefeed)
Path name of program for init
Upper left of keypad
Upper right of keypad

Page 6

TERMINFO(M)
key_b2,
key_c1,
key_c3,
prtcnon,

TERMINFO(M)
kb2
kc1
kc3
mc5p

K2t
K4t
K5t
pOt

Center of keypad
Lower left of keypad
Lower right of keypad
Tum on the printer for #1 bytes

A Sample Entry
The following entry, which describes the Concept-lOO, is among the
more complex entries in the terminfo file.
conceptlOO I c100 I concept I c104 I clOO-4p I concept 100,
am, bel=~G, blank=\EH, blink=\EC, clear=~L$<2*>, cnorm=\Ew,
cols#80, cr=~M$<9>, cub1=~H, cud1=~J, cuf1=\E=,
cup=\Ea%p1%' '%+%c%p2%' '%+%c,
cuu1=\E;, cvvis=\EW, db, dchl=\E~A$<16*>, dim=\EE, d11=\E~B$<3*>,
ed=\E~C$<16*>, el=\E~U$<16>, eo, flash=\Ek$<20>\EK, ht=\t$<8>,
il1=\E~R$<3*>, in, ind=~J, .ind=~J$<9>, ip=$<16*>,
is2=\EU\Ef\E7\E5\E8\El\ENH\EK\E\200\Eo&\200\Eo\47\E,
kbs=~h, kcub1=\E>, kcudl=\E<, kcuf1=\E=, kcuu1=\E;,
kfl=\E5, kf2=\E6, kf3=\E7, khome=\E?,
lines#24, rnir, pb#9600, prot=\EI, rep=\Er%pl%c%P2%' '%+%c$<.2*>,
rev=\ED, rmcup=\Ev
$<6>\Ep\r\n, rrnir=\E\200, rmkx=\Ex,
rmso=\Ed\Ee, rmul=\Eg, rmul=\Eg, sgrO=\EN\200,
sITIcup=\EU\Ev 8p\Ep\r, srnir=\E~P, sffikx=\EX, srnso=\EE\ED,
SITIul=\EG, tabs, ul, vt#8, xenl,

Entries may continue onto multiple lines by placing white space at the
beginning of each line except the first. Comments lines begin with
"#". Capabilities in terminfo are of three types: Boolean capabilities
which indicate that the terminal has some particular feature, numeric
capabilities giving the size of the terminal or the size of particular
delays, and string capabilities, which give a sequence that can be used
to perform particular terminal operations.
Types of Capabilities
All capabilities have names. For instance, the fact that the Concept
has automatic margins (i.e., an automatic return and linefeed when the
end of a line is reached) is indicated by the capability am. Hence the
description of the Concept includes am. Numeric capabilities are followed by the character '#' and then the value. Thus cols, which indicates the number of columns the terminal has, gives the value '80' for
the Concept.
Finally, string valued capabilities, such as el (clear to end of line
sequence) are given by the two-character code, an '=', and then a
string ending at the next following ','. A delay in milliseconds may
appear anywhere in such a capability, enclosed in $< ..> brackets, as in
el=\EK$<3>, and padding characters are supplied by tputs to provide
this delay. The delay can be either a number, e.g., '20', or a number
followed by an '*', i.e., '3*'. A '*' indicates that the padding required
is proportional to the number of lines affected by the operation, and
the amount given is the per-affected-unit padding required. (In the
May 16, 1988

Page 7

TERMINFO(M)

TERMINFO(M)

case of insert character, the factor is still the number of lines affected.
This is always one unless the terminal has xenl and the software uses
it.) When a '*' is specified, it is sometimes useful to give a delay of
the form '3.5' to specify a delay per unit to tenths of milliseconds.
(Only one decimal place is allowed.)
A number of escape sequences are provided in the string valued capabilities for easy encoding of characters there. Both \E and \e map to
an ESCAPE character, "x maps to a control-x for any appropriate x,
and the sequences \n \l \r \t \b \f \s give a newline, linefeed, return,
tab, backspace, formfeed, and space. Other escapes include \" for", \\
for \ \ for comma, \: for :, and \0 for null. (\0 will produce \200,
which does not terminate a string but behaves as a null character on
most terminals.) Finally, characters may be given as three octal digits
after a \.
Sometimes individual capabilities must be commented out. To do
this, put a period before the capability name. For example, see the
second ind in the example above.
Preparing Descriptions
The most effective way to prepare a terminal description is to imitate
the description of a similar terminal in terminfo and to build up a
description gradually, using partial descriptions with vi to check that
they are correct. Be aware that a very unusual terminal may expose
deficiencies in the ability of the terminfo file to describe it or bugs in
vi. To test easily a new terminal description you can set the environment variable TERMINFO to a pathname of a directory containing the
compiled description you are working on and programs will look there
rather than in lusr/lib/terminfo. To get the padding for insert line
right (if the terminal manufacturer did not document it) a severe test is
to edit a copy of letc/passwd at 9600 baud, delete 16 or so lines from
the middle of the screen, then hit the 'u' key several times quickly. If
the terminal display is scrambled, more padding is usually needed. A
similar test can be used for insert character.
Basic Capabilities
The cols numeric capability describes the number of columns on each
line for the terminal. If the terminal is a CRT, then the number of lines
on the screen is given by the lines capability. If the terminal wraps
around to the beginning of the next line when it reaches the right margin, then it should have the am capability. If the terminal can clear its
screen, leaving the cursor in the home position, then this is given by
the clear string capability. If the terminal overstrikes (rather than
clearing a position when a character is struck over) then it should have
the os capability. If the terminal is a printing terminal, with no soft
copy unit, give it both hc and os. (os applies to storage scope terminals' such as TEKTRONIX 4010 series, as well as hard copy and APL
terminals.) If there is a code to move the cursor to the left edge of the
current row, give this as cr. (Normally this will be carriage return,
control M.) If there is a code to produce an audible signal (bell, beep,
May 16, 1988

Page 8

TERMINFO(M)

TERMINFO(M)

etc) define this as bel.

If there is a code to move the cursor one position to the left (such as
backspace) that capability should be defined as cubl. Similarly,
codes to move to the right, up, and down should be defined as cun,
cuul, and cudl. These local cursor motions should not alter the text
they pass over, for example, you would not normally use 'cun='
because the space would erase the character moved over.
A very important point here is that the local cursor motions encoded in
terminfo are undefined at the left and top edges of a CRT terminal.
Programs should never attempt to backspace around the left edge,
unless bw is given, and never attempt to go up locally off the top. In
order to scroll text up, a program will go to the bottom left comer of
the screen and send the ind (index) string.

To scroll text down, a program goes to the top left comer of the screen
and sends the ri (reverse index) string. The strings ind and ri are
undefined when not on their respective comers of the screen.
Parameterized versions of the scrolling sequences are indn and rin,
which have the same semantics as ind and ri except that they take one
parameter, and scroll that many lines. They are also undefined except
at the appropriate edge of the screen.
The am capability tells whether the cursor sticks at the right edge of
the screen when text is output, but this does not necessarily apply to a
cun from the last column. The only local motion which is defined
from the left edge is when bw is given, in which case a cubl from the
left edge will move to the right edge of the previous row. If bw is not
given, the effect is undefined. This is useful for drawing a box around
the edge of the screen, for example. If the terminal has switch selectable automatic margins, the terminfo file usually assumes that this is
on; i.e., am. If the terminal has a command which moves to the first
column of the next line, that command can be given as nel (newline).
It does not matter if the command clears the remainder of the current
line, so if the terminal has no cr and If it may still be possible to craft
a working nel out of one or both of them.
These capabilities suffice to describe hardcopy and glass-tty terminals.
Thus the model 33. teletype is described as:
33 I tty33 I tty I model 33 teletype,
bel=-G, eols#72, er=-M, eudl=-J, he, ind=-J, os,

while the Lear Siegler ADM-3 is described as:
adm3 I 3 I lsi adm3,
am, bel=-G, clear=-Z, eols#80, er=-M, cubl=-H, eudl=-J,
ind=-J, lines#24,

May 16, 1988

Page 9

TERMINFO(M)

TERMINFO(M)

Parameterized Strings

Cursor addressing and other strings requiring parameters in the terminal are described by a parameterized string capability, with printj(S)
like escapes %x in it. For example, to address the cursor, the cup
capability is given, using two parameters: the row and column to
address to. (Rows and columns are numbered from zero and refer to
the physical screen visible to the user, not to any unseen memory.) If
the terminal has memory relative cursor addressing, that can be indicated by mrcup.
The parameter mechanism uses a stack and special % codes to manipulate it. Typically a sequence will push one of the parameters onto
the stack and then print it in some format. Often more complex operations are necessary.
The % encodings have the following meanings:
%%
%d
%2d
%3d
%02d
%03d
%c
%s

outputs '%'
print popO as in printf
print popO like %2d
print popO like %3d
as in printf
print popO gives %c
print popO gives %s

%p[1-9]
%P[a-z]
%g[a-z]
%'c'
%{nn}

push ith parm
set variable [a-z] to popO
get variable [a-z] and push it
char constant c
integer constant nn

%+ %- %* %/%m
arithmetic (%m is mod): push(popO op popO)
%& %1 %"
bit operations: push(popO op popO)
%= %> %< logical operations: push(popO op popO)
%! %unary operations push(op popO)
%i
add 1 to first two parms (for ANSI terminals)
%? expr %t thenpart %e elsepart %;
if-then-else, %e elsepart is optional.
else-if's are possible ala Algol 68:
%? c %t b %e c %t b %e c %t b %e c %t b %e %;
I
4
I
2
3
4
2
3

c are conditions, b are bodies.
i
i

Binary operations are in postfix form with the operands in the usual
order. That is, to get x-5 one would use l%gx%{5}%-".
Consider the HP2645, which, to get to row 3 and column 12, needs to
be sent \E&aI2c03Y padded for 6 milliseconds. Note that the order of
the rows and columns is inverted here, and that the row and column
May 16, 1988

Page 10

TERMINFO(M)
are printed as two digits. Thus
cup=\E&%p2%2dc%pl %2dY$<6>.

TERMINFO(M)
its

cup

capability

is

The Microterm ACT-IV needs the current row and column sent preceded by a "T, with the row and column simply encoded in binary,
cup="T%pl %c%p2%c. Terminals that use %c need to be able to
backspace the cursor (cubl), and to move the cursor up one line on the
screen (cuul). This is necessary because it is not always safe to
transmit \0 "D and \r, as the system may change or discard them. (The
library routines dealing with terminfo set tty modes so that tabs are
never expanded, so \t is safe to send. This turns out to be essential for
the Ann Arbor 4080.)
A final example is the LSI ADM-3a, which uses row and column offset
by a blank character, thus cup=\E=%pl %' '%+%c%p2%' '%+%c.
After sending '\E=', this pushes the first parameter, pushes the ASCII
value for a space (32), adds them (pushing the sum on the stack in
place of the two previous values) and outputs that value as a character.
Then the same is done for the second parameter. More complex arithmetic is possible using the stack.
If the terminal has row or column absolute cursor addressing, these

can be given as single parameter capabilities hpa (horizontal position
absolute) and vpa (vertical position absolute). Sometimes these are
shorter than the more general two parameter sequence (as with the
HP2645) and can be used in preference to cup. If there are parameterized local motions (e.g., move n spaces to the right) these can be given
as cud, cub, cuf, and cuu with a single parameter indicating how
many spaces to move. These are primarily useful if the terminal does
not have cup, such as the TEKTRONIX 4025.
Cursor Motions
If the terminal has a fast way to home the cursor (to very upper left

comer of screen) then this can be given as home; similarly a fast way
of getting to the lower left-hand corner can be given as II; this may
involve going up with cuul from the home position, but a program
should never do this itself (unless II does) because it can make no
assumption about the effect of moving up from the home position.
Note that the home position is the same as addressing to (0,0): to the
top left corner of the screen, not of memory. (Thus, the \EH sequence
on HP terminals cannot be used for home.)
Area Clears
If the terminal can clear from the current position to the end of the
line, leaving the cursor where it is, this should be given as el. If the

terminal can clear from the current position to the end of the display,
then this should be given as ed. ed is only defined from the first
column of a line. (Thus, it can be simulated by a request to delete a
large number of lines, if a true ed is not available.)

May 16, 1988

Page 11

TERMINFO(M)

TERMINFO(M)

Insert/delete line
If the terminal can open a new blank line before the line where the
cursor is positioned, this should be given as ill; this is done only from
the first position of a line. The cursor must then appear on the newly
blank line. If the terminal can delete the line on which the cursor is
positioned, then this should be given as dll; this is done only from the
first position on the line to be deleted. Versions of ill and dll that
take a single parameter and insert or delete that many lines can be
given as il and dl. If the terminal has a settable scrolling region (like
the vt-l00) the command that sets this can be described with the csr
capability, which takes two parameters: the top and bottom lines of
the scrolling region. The cursor position is, however, undefined after
using this command. It is possible to get the effect of insert or delete
line using this command - the sc and rc (save and restore cursor) commands are also useful. Inserting lines at the top or bottom of the
screen can also be done using ri or ind on many terminals without a
true insert/delete line, and is often faster even on terminals with those
features.

If the terminal has the ability to define a window as part of memory,
which all commands affect, it should be given as the parameterized
string wind. The four parameters are the starting and ending lines in
memory and the starting and ending columns in memory, in that order.
If the terminal can retain display memory above, then the da capability should be given; if display memory can be retained below, then db
should be given. These indicate that deleting a line or scrolling may
bring non-blank lines up from below or that scrolling back with ri may
bring down non-blank lines.

Insert/Delete Character
There are two basic kinds of intelligent terminals with respect to
insert/delete character that can be described using terminfa. The most
common insert/delete character operations affect only the characters
on the current line and shift characters off the end of the line rigidly.
Other terminals, such as the Concept 100 and the Perkin Elmer Owl,
make a distinction between typed and untyped blanks on the screen,
shifting upon an insert or delete only to an untyped blank on the
screen which is either eliminated, or expanded to two untyped blanks.
You can determine the kind of terminal you have by clearing the
screen and then typing text separated by cursor motions. Type
abc def using local cursor motions (not spaces) between the abc and
the def. Then position the cursor before the abc and put the terminal
in insert mode. If typing characters causes the rest of the line to shift
rigidly and characters to fall off the end, then your terminal does not
distinguish between blanks and untyped positions. If the "abc" shifts
over to the def which then move together around the end of the current
line and onto the next as you insert, you have the second type of terminal' and should give the capability in, which stands for insert null.
While these are two logically separate attributes (one line vs. multiline insert mode, and special treatment of untyped spaces) we have
May 16, 1988

Page 12

TERMINFO (M)

TERMINFO(M)

seen no tenninals whose insert mode cannot be described with the single attribute.
terminfo can describe both tenninals that have an insert mode, and terminals that send a simple sequence to ppen a blank position on the
current line. To get into insert mode use the smir sequence. To leave
insert mode use the rmir sequence. Now give as iehl any sequence
needed to be sent just before sending the character to be inserted.
Most tenninals with a true insert mode will not give iehl; tenninals
that send a sequence to open a screen position should give it here. (If
your tenninal has both, insert mode is usually preferable to iehl. Do
not give both unless the tenninal actually requires both to be used in
combination.) If post insert padding is needed, give this as a number
of milliseconds in ip (a string option). Any other sequence which may
need to be sent after an insert of a single character may also be given
in ip. If your tenninal needs both to be placed into an 'insert mode'
and a special code to precede each inserted character, then both
smir/rmir and iehl can be given, and both will be used. The ieh
capability, with one parameter, n, will repeat the effects of iehl n
times.
It is occasionally necessary to move around while in insert mode to

delete characters on the same line (e.g., if there is a tab after the insertion position). If your tenninal allows motion while in insert mode
you can give the capability mir to speed up inserting in this case.
Omitting mir will affect only speed. Some tenninals (notably
Datamedia's) must not have mir because of the way their insert mode
works.
Finally, you can specify dehl to delete a single character, deh with
one parameter, n, to delete n characters, and delete mode by giving
smde and rmde to enter and exit delete mode (any mode the tenninal
needs to be placed in for dehl to work).
A command to erase n characters (equivalent to outputting n blanks
without moving the cursor) can be given as eeh with one parameter.
Highlighting, Underlining, and Visible Bells
If your tenninal has one or more kinds of display attributes, these can
be represented in a number of different ways. You should choose one
display fonn as standout mode, representing a good, high contrast,
easy-on-the-eyes, fonnat for highlighting error messages and other
attention getters. (If you have a choice, reverse video plus half-bright
is good, or reverse video alone.) The sequences to enter and exit standout mode are given as smso and rmso, respectively. If the code to
change into or out of standout mode leaves one or even two blank
spaces on the screen, as the TVI 912 and Teleray 1061 do, then xme
should be given to tell how many spaces are left.
Codes to begin underlining and end underlining can be given as smul
and rmul respectively. If the tenninal has a code to underline the
current character and move the cursor one space to the right, such as
May 16,1988

Page 13

TERMINFO(M)

TERMINFO(M)

the Microterm Mime, this can be given as uc.
Other capabilities to enter various highlighting modes include blink
(blinking) bold (bold or extra bright) dim (dim or half-bright) invis
(blanking or invisible text) prot (protected) rev (reverse video) sgrO
(tum off all attribute modes) smacs (enter alternate character set
mode) and rmacs (exit alternate character set mode). Thrning on any
of these modes singly mayor may not tum off other modes.
If there is a sequence to set arbitrary combinations of modes, this
should be given as sgr (set attributes), taking 9 parameters. Each
parameter is either 0 or 1, as the corresponding attribute is on or off.
The 9 parameters are, in order: standout, underline, reverse, blink,
dim, bold, blank, protect, alternate character set. Not all modes need
be supported by sgr, only those for which corresponding separate attribute commands exist.

Terminals with the "magic cookie" glitch (xmc) deposit special
"cookies" when they receive mode-setting sequences, which affect
the display algorithm rather than having extra bits for each character.
Some terminals, such as the HP 2621, automatically leave standout
mode when they move to a new line or the cursor is addressed. Programs using standout mode should exit standout mode before moving
the cursor or sending a newline, unless the msgr capability, asserting
that it is safe to move in standout mode, is present.
If the terminal has a way of flashing the screen to indicate an error
quietly (a bell replacement) then this can be given as flash; it must not
move the cursor.
If the cursor needs to be made more visible than normal when it is not
on the bottom line (to make, for example, a non-blinking underline
into an easier to find block or blinking underline) give this sequence as
cvvis. If there is a way to make the cursor completely invisible, give
that as civis. The capability cnorm should be given which undoes the
effects of both of these modes.
If the terminal needs to be in a special mode when running a program
that uses these capabilities, the codes to enter and exit this mode can
be given as smcup and rmcup.
This arises, for example, from terminals like the Concept with more
than one page of memory. If the terminal has only memory relative
cursor addressing and not screen relative cursor addressing, a one
screen-sized window must be fixed into the terminal for cursor
addressing to work properly. This is also used for the TEKTRONIX
4025, where smcup sets the command character to be the one used by
termin/o.

If your terminal correctly generates underlined characters (with no
special codes needed) even though it does not overstrike, then you
should give the capability ul. If overstrikes' are erasable with a blank,
then this should be indicated by giving eo.

May 16, 1988

Page 14

TERMINFO(M)

TERMINFO( M)

Keypad
If the tenninal has a keypad that transmits codes when the keys are
pressed, this infonnation can be given. Note that it is not possible to
handle terminals where the keypad only works in local (this applies,
for example, to the unshifted lIP 2621 keys). If the keypad can be set
to transmit or not transmit, give these codes as smkx and rmkx. Otherwise the keypad is assumed to always transmit. The codes sent by
the left arrow, right arrow, up arrow, down arrow, and home keys can
be given as kenbl, kenfl, kennl, kendI, and khome respectively. If
there are function keys such as fO, fl, ... , flO, the codes they send can
be given as kfO, kfl, ... , kflO. If these keys have labels other than the
default fO through flO, the labels can be given as lfO, Ifl, ..., IflO. The
codes transmitted by certain other special keys can be given: kll
(home down), kbs (backspace), ktbe (clear all tabs), ketab (clear the
tab stop in this column), kclr (clear screen or erase key), kdehl
(delete character), kdll (delete line), krmir (exit insert mode), kel
(clear to end of line), ked (clear to end of screen), kiehl (insert character or enter insert mode), kill (insert line), knp (next page), kpp
(previous page), kind (scroll forward/down), kri (scroll backward/up),
khts (set a tab stop in this column). In addition, if the keypad has a 3
by 3 array of keys including the four arrow keys, the other five keys
can be given as kal, ka3, kb2, kel, and kc3. These keys are useful
when the effects of a 3 by 3 directional pad are needed.
Tabs and Initialization
If the tenninal has hardware tabs, the command to advance to the next
tab stop can be given as ht (usually control I). A "backtab" command
that moves leftward to the next tab stop can be given as ebt. By convention, if the teletype modes indicate that tabs are being expanded by
the computer rather than being sent to the tenninal, programs should
not use ht or ebt even if they are present, since the user may not have
the tab stops properly set. If the tenninal has hardware tabs which are
initially set every n spaces when the tenninal is powered up, the
numeric parameter it is given, showing the number of spaces the tabsare set to. This is nonnally used by the tset(C) command to determine
whether to set the mode for hardware tab expansion, and whether to
set the tab stops. If the tenninal has tab stops that can be saved in
nonvolatile memory, the tenninfo description can assume that they are
properly set.

Other capabilities include isl, is2, and is3, initialization strings for the
tenninal, iprog, the path name of a program to be run to initialize the
tenninal, and if, the name of a file containing long initialization
strings. These strings are expected to set the terminal into modes consistent with the rest"nf the tenninfo description. They are normally
sent to the tenninal, by the tset program, each time the user logs in.
They will be printed in the following order: isl; is2; setting tabs using
tbe and hts; if; running the program iprog; and finally is3. Most initialization is done with is2. Special tenninal modes can be set up
without duplicating strings by putting the common sequences in is2
and special cases in isl and is3. A pair of sequences that does a
May 16, 1988

Page 15

TERMINFO(M)

TERMINFO(M)

harder reset from a totally unknown state can be analogously given as
rsl, rs2, rf, and rs3, analogous to is2 and if. Commands are normally
placed in rs2 and rf only if they produce annoying effects on the
screen and are not necessary when logging in. For example, the command to set the vt-100 into 80-column mode would normally be part
of is2, but it causes an annoying glitch of the screen and is· not normally needed since the terminal is usually already in 80 column mode.
If there are commands to set and clear tab stops, they can be given as

tbc (clear all tab stops) and hts (set a tab stop in the current column of
every row). If a more complex sequence is needed to set the tabs than
can be described by this, the sequence can be placed in is2 or if.
Delays
Certain capabilities control padding in the teletype driver. These are
primarily needed by hard copy terminals, and are used by the tset program to set teletype modes appropriately. Delays embedded in the
capabilities cr, ind, cubl, if, and tab will cause the appropriate delay
bits to be set in the teletype driver. If pb (padding baud rate) is given,
these values can be ignored at baud rates below the value of pb.
Miscellaneous
If the terminal requires other than a null (zero) character as a pad, then

this can be given as pad. Only the first character of the pad string is
used.
If the terminal has an extra "status line" that is not normally used by
software, this fact can be indicated. If the status line is viewed as an

extra line below the bottom line, into which one can cursor address
normally (such as the Heathkit h19's 25th line, or the 24th line of a
vt-100 which is set to a 23-line scrolling region), the capability hs
should be given. Special strings to go to the beginning of the status
line and to return from the status line can be given as tsl and fsl. (fsl
must leave the cursor position in the same place it was before tsl. If
necessary, the sc and rc strings can be included in tsl and fsl to get
this effect.) The parameter tsl takes one parameter, which is the
column number of the status line the cursor is to be moved to. If
escape sequences and other special commands, such as tab, work
while in the status line, the flag eslok can be given. A string which
turns off the status line (or otherwise erases its contents) should be
given as dsl. If the terminal has commands to save and restore the
position of the cursor, give them as sc and rc. The status line is normally assumed to be the same width as the rest of the screen, e.g.,
cols. If the status line is a different width (possibly because the terminal does not allow an entire line to be loaded) the width, in columns,
can be indicated with the numeric parameter wsl.
If the terminal can move up or down half a line, this can be indicated

with hu (half-line up) and hd (half-line down). This M; primarily useful for superscripts and subscripts on hardcopy terminals. If a hardcopy terminal can eject to the next page (form feed), give this as if
May 16, 1988

Page 16

TERMINFO(M)

TERMINFO(M)

(usually control L).
If there is a command to repeat a given character a given number of
times (to save time transmitting a large number of identical characters) this can be indicated with the parameterized string rep. The first
parameter is the character to be repeated and the second is the number
of times to repeat it. Thus, tparm(repeacchar, 'x', 10) is the same as
'xxxxxxxxxx' .
If the terminal has a settable command character, such as the TEKTRONIX 4025, this can be indicated with emdeh. A prototype command character is chosen which is used in all capabilities. This character is given in the emdeh capability to identify it. The following
convention is supported on some XENIX systems: The environment is
to be searched for a CC variable, and if found, all occurrences of the
prototype character are replaced with the character in the environment
variable.
Terminal descriptions that do not represent a specific kind of known
terminal, such as switch, dialup, patch, and network, should include
the gn (generic) capability so that programs can complain that they do
not know how to talk to the terminal.
If the terminal uses XON/XOFF handshaking for flow control, give
xon. Padding information should still be included so that routines can
make better decisions about costs, but actual pad characters will not
be transmitted.
If the terminal has a "meta key" which acts as a shift key, setting the
8th bit of any character transmitted, this fact can be indicated with
km. Otherwise, software will assume that the 8th bit is parity and it
will usually be cleared. If strings exist to turn this "meta mode?' on
and off, they can be given as smm and rmm.
If the terminal has more lines of memory than will fit on the screen at
once, the number of lines of memory can be indicated with 1m. A
value of Im#O indicates that the number of lines is not fixed, but that
there is still more memory than fits on the screen.
If the terminal is one of those supported by the UNIX virtual terminal
protocol, the terminal number can be given as vt.
Media copy strings that control an auxiliary printer connected to the
terminal can be given as meO: print the contents of the screen, me4:
tum off the printer, and meS: tum on the printer. When the printer is
on, all text sent to the terminal will be sent to the printer. It is
undefined whether the text is also displayed on the terminal screen
when the printer is on. A variation meSp takes one parameter, and
leaves the printer on for as many characters as the value of the parameter' then turns the printer off. The parameter should not exceed 255.
All text, including me4, is transparently passed to the printer while an
meSp is in effect.

May 16, 1988

Page 17

TERMINFO( M)

TERMINFO(M)

Strings to program function keys can be given as ptkey, pfioc, and
pfx. Each of these strings takes two parameters: the function key
number to program (from 0 to 10) and the string to program it with.
Function key numbers out of this range may program undefined keys
in a tenninal dependent manner. The difference between the capabilities is that pfkey causes pressing the given key to be the same as the
user typing the given string; pfioc causes the string to be executed by
the terminal in local; and pfx causes the string to be transmitted to the
computer.
Glitches and Unusual Capabilities
Hazeltine terminals, which do not allow ,-, characters to be displayed
should indicate hz.
Terminals that ignore a line feed immediately after an am wrap, such
as the Concept and vt-100, should indicate xenl.
If el is required to get rid of standout (instead of merely writing normal text on top of it), xhp should be given.

Teleray terminals, where tabs tum all characters moved over to
blanks, should indicate xt (destructive tabs). This glitch is also taken
to mean that it is not possible to position the cursor on top of a "magic
cookie", that to erase standout mode it is instead necessary to use
delete and insert line.
The Beehive Superbee, which is unable to correctly transmit the
escape or control C characters, has xsb, indicating that the f1 key is
used for escape and f2 for control C. (Only certain Superbees have
this problem, depending on the ROM.)
Other specific terminal problems may be corrected by adding more
capabilities of the form xx.
Similar Terminals
If there are two very similar terminals, one can be defined as being
just like the other with certain exceptions. The string capability use
can be given with the name of the similar terminal. The capabilities
given before use override those in the terminal type invoked by use.
A capability can be cancelled by placing xx@ to the left of the capability definition, where xx is the capability. For example, the entry

2621-nl, smkx@, rmkx@, use=2621,
defines a 2621-nl that does not have the smkx or rmkx capabilities,
and hence does not tum on the function key labels when in visual
mode. This is useful for different modes for a terminal, or for different
user preferences.

May 16, 1988

Page 18

TERMINFO(M)

TERMINFO(M)

Files
/usr/lib/tenninfo/? /*
files containing tenninal descriptions compiled by tic(C)

See Also
tenninfo(S), tenninfo(F), tic(C)

Notes
Neither vi, tset, nor any other XENIX command presently uses terminJoo It is intended that a full integration of termcap and terminJo
will be provided in a future version of XENIX.

May 16, 1988

Page 19

TERMIO (M)

TERMIO (M)

Name
tennio - General tenninal interface.
Description
All asynchronous communications ports use the same general interface, no matter what hardware is involved. The remainder of this section discusses the common features of this interface.
When a tenninal file is opened, it nonnally causes the process to wait
until a connection is established. In practice, users' programs seldom
open these files; they are opened by getty (M) and become a user's
standard input, output, and error files. The very first terminal file
opened by the process group leader of a terminal file not already associated with a process group becomes the "control terminal" for that
process group. The control terminal plays a special role in handling
quit and interrupt signals, as discussed below. The control terminal is
inherited by a child process during afork(S). A process can break this
association by changing its process group using setpgrp(S).
A terminal associated with one of these files ordinarily operates in
full-duplex mode. Characters can be entered at any time, even while
output is occurring, and are only lost when the system's character
input buffers become completely full, which is rare, or when the user
has accumulated the maximum allowed number of input characters
that have not yet been read by some program. Currently, this limit is
256 characters. When the input limit is reached, all the saved characters are- thrown away without notice.
Nonnally, terminal input is processed in units of lines. A line is delimited by a newline (ASCII LF) character, an end-of-file (ASCII EOT)
character, or an end-of-line character. This means that a program
attempting to read will be suspended until an entire line has been
entered. Also, no matter how many characters are requested in the
read call, one line will be returned at most. It is not, however, necessary to read a whole line at once; any number of characters may be
requested in a read, even one, without losing information.
Erase and kill processing is normally done during input. By default, a
Ctrl-H or BACKSPACE erases the last character typed, except that it
will not erase beyond the beginning of the line. By default, a Ctrl-U

kills (deletes) the entire input line, and optionally outputs a newline
character. Both these characters operate on a key-stroke basis,
independent of any backspacing or tabbing that may have been done.
Both the erase and kill characters may be entered literally by preceding them with the escape character (\). In this case, the escape character is not read. The erase and kill characters may be changed (see
stty(C».

May 16, 1988

Page 1

TERMIO (M)

TERMIO (M)

Certain characters have special functions on input. These functions
and their default character values are summarized as follows:
INTR

(Rubout or ASCII DEL) Generates an interrupt signal which
is sent to all processes with the associated control terminal.
Normally, each such process is forced to terminate, but
arrangements may be made either to ignore the signal or to
receive a trap to an agreed-upon location; see signal (S).

QUIT

(Ctrl-\ or ASCII FS) Generates a quit signal. Its treatment is
identical to the interrupt signal except that, unless a receiving process has made other arrangements, it will not only be
terminated, but a core image file (called core) will be
created in the current working directory.

SWTCH (ASCII NUL) Is used by the job control facility, shl(C), to
change the current layer to the control layer.
ERASE (Ctrl-H) Erases the preceding character. It will not erase
beyond the start of a line, as delimited by a NL, EOF, or EOL
character.
KILL

(Ctrl-U) Deletes the entire line, as delimited by a NL, EOF, or
EOL character.

EOF

(Ctrl-D or ASCII EOT) May be used to generate an end-of-file
from a terminal. When received, all the characters waiting
to be read are immediately passed to the program, without
waiting for a newline, and the EOF is discarded. Thus, if
there are no characters waiting, which is to say the EOF
occurred at the beginning of a line, zero characters will be
passed back, which is the standard end-of-file indication.

NL

(ASCII LF) Is the normal line delimiter. It cannot be changed
or escaped.

EOL

(ASCII NUL) Is an additional line delimiter, like NL. It is not
normally used.

STOP

(Ctrl-S or ASCII DC3) Temporarily suspends output. It is useful with CRT terminals to prevent output from disappearing
before it can be read. While output is suspended, STOP characters are ignored and not read.

START (Ctrl-Q or ASCII DCI) Resumes output which has been
suspended by a STOP character. While output is not
suspended, START characters are ignored and not read. The
START/STOP characters cannot be changed or escaped.
The character values for INTR, QUIT, SWTCH, ERASE, KILL, EOF, and
EOL may be changed to suit individual tastes. The ERASE, KILL, and
EOF characters may be escaped by a preceding backslash (\) character,

May 16, 1988

Page 2

TERMIO (M)

TERMIO (M)

in which case no special function is carried out.
When the carrier signal from the dataset drops, a "hangup" signal is
sent to all processes that have this terminal as the control terminal.
Unless other arrangements have been made, this signal causes the
processes to terminate. If the hangup signal is ignored, any subsequent read returns with an end-of-file indication. Thus, programs that
read a terminal and test for an end-of-file can terminate appropriately
when hung up on.
When one or more characters are" written, they are transmitted to the
terminal as soon as the previously typed characters have been entered.
Input characters are echoed by putting them in the output queue as
they arrive. If a process produces characters more rapidly than they
can be typed, it will be suspended when its output queue exceeds a
given limit. When the queue has drained down to the given threshold,
the program is resumed.
Several ioctl (S) system calls apply to terminal files. The primary calls
use the following structure, defined in the file :
8
#define NCC
struct termio {
unsigned short
unsigned short
unsigned short
unsigned short
char
unsigned char

c_iflag; /* input modes */
c_oflag; /* output modes */
c_cflag; /* control modes */
c_Iflag; /* local modes */
c_Iine;
/* line discipline */
c_cc[NCC];/* control chars */

};

The special control characters are defined by the array c_cc. The relative positions and initial values for each function are as follows:

0
1
2

3
4
5
6
7

VINTR
VQUIT
VERASE
VKILL
VEOFNMIN
VEOLNTIME
Reserved
VSWTCH

DEL
FS
Ctrl-H
Ctrl-U
EOT
NUL

NUL

The c_(flag field describes the basic terminal input control:
IGNBRK
BRKINT
IGNPAR
PARMRK
INPCK
IS TRIP
INLCR

May 16, 1988

0000001
0000002
0000004
0000010
0000020
0000040
0000100

Ignores break condition
Signals interrupt on break
Ignores characters with parity errors
Marks parity errors
Enables input parity check
Strips character
Maps NL to CR on input

Page 3

TERMIO (M)
IGNCR
ICRNL
IUCLC
IXON
IXANY
IXOFF
CTSFLOW
RTSFLOW

TERMIO (M)

0000200
0000400
0001000
0002000
0004000
0010000
0020000
0040000

Ignores CR
Maps CR to NL on input
Maps uppercase to lowercase on input
Enables start/stop output control
Enables any character to restart output
Enables start/stop input control
Enables CTS protocol for a modem line
Enables RTS signaling for a modem line

If IGNBRK is set, the break condition (a character framing error with

data all zeros) is ignored, that is, not put on the input queue and therefore not read by any process. Otherwise, if BRKINT is set the break
condition will generate an interrupt signal and flush both the input and
output queues. If IGNPAR is set, characters with other framing and
parity errors are ignored.
If PARMRK is set, a character with a framing or parity error which is

not ignored is read as the 3-character sequence: 0377,0, X, where X
is the data of the character received in error. To avoid ambiguity in
this case, if ISTRIP is not set, a valid character of 0377 is read as 0377,
0377. If PARMRK is not set, a framing or parity error which is not
ignored is read as the character NUL (0).
If INPCK is set, input parity checking is enabled. If INPCK is not set,
input parity checking is disabled. This allows output parity generation
without input parity errors.
If ISTRIP is set, valid input characters are first stripped to 7-bits, other-

wise all 8-bits are processed.
IfINLCR is set, a received NL character is translated into a CR character. If IGNCR is set, a received CR character is ignored (not read).
Otherwise, if ICRNL is set, a received CR character is translated into a
NL character.
If IUCLC is set, a received uppercase alphabetic character is translated

into the corresponding lowercase character.
If IXON is set, start/stop output control is enabled. A received STOP
character will suspend output and a received START character will
restart output. All start/stop characters are ignored and not read. If
IXANY is set, any input character will restart output which has been

suspended.
If IXOFF is set, the system will transmit START characters when the
input queue is nearly empty and STOP characters when nearly full.
If CTSFLOW or RTSFLOW are set, IXON and IXANY should also be

set so that these two types of flow control do not interfere with each
other.

May 16,1988

Page 4

TERMIO (M)

TERMIO (M)

The initial input control value is all bits clear.
The c_ oflag field specifies the system treatment of output:
OPOST

0000001 Postprocesses output

OLCUC

0000002 Maps lowercase to uppercase on output

ONLCR

0000004 Maps NL to CR-NL on output

OCRNL

0000010 Maps CR to NL on output

ONOCR

0000020 No CR output at column 0

ONLRET

0000040 NL performs CR function

OFILL

0000100 Uses fill characters for delay

OFDEL

0000200 Fills is DEL, else NUL

NLDLY
NLO
NLI

0000400 Selects newline delays:

CRDLY'
CRO
CRI
CR2
CR3
TABDLY
TABO
TAB 1
TAB 2
TAB 3
BSDLY
BSO
BSI
VTDLY
VTO
VTl
FFDLY
FFO
FFI

o

0000400
0003000 Selects carriage return delays:

o

0001000
0002000
0003000
0014000 Selects horizontal tab delays:

o

0004000
0010000
0014000 Expands tabs to spaces
0020000 Selects backspace delays:

o

0020000
0040000 Selects vertical tab delays:

o

0040000
0100000 Selects form feed delays:

o

0100000

If OPOST is set, output characters are post-processed as indicated by
the remaining flags, otherwise characters are transmitted without
change.

If OLCUC is set, a lowercase alphabetic character is transmitted as the
corresponding uppercase character. This function is often used in conjunction with IUCLC.

May 16, 1988

Page 5

TERMIO (M)

TERMIO (M)

If ONLCR is set, the NL character is transmitted as the CR-NL character pair. If OCRNL is set, the CR character is transmitted as the NL
character. If ONOCR is set, no CR character is transmitted when at
column 0 (first position). If ONLRET is set, the NL character is
assumed to perform the carriage return function and the column
pointer is set to 0 and the delays specified for CR will be used. Otherwise, the NL character is assumed to perform the linefeed function;
the column pointer will remain unchanged. The column pointer is
also set to 0 if the CR character is actually transmitted.

The delay bits specify how long transmission stops to allow for
mechanical or other movement when certain characters are sent to the
terminal. In all cases, a value of 0 indicates no delay. If OFILL is set,
fill characters will be transmitted for delay instead of a timed delay.
This is useful for high baud rate terminals which need only a minimal
delay. If OFDEL is set, the fill character is DEL, otherwise NUL.
If a fonn feed or vertical tab delay is specified, it lasts for about 2
seconds.

Newline delay lasts about 0.10 seconds. If ONLRET is set, the carriage return delays are used instead of the newline delays. If OFILL is
set, 2 fill characters will be transmitted.
Carriage return delay type 1 is dependent on the current column position, type 2 is about 0.10 seconds, and type 3 is about 0.15 seconds. If
OFILL is set, delay type 1 transmits 2 fill characters, and type 2
transmits 4 fill characters.
Horizontal tab delay type 1 is dependent on the current column position. Type 2 is about 0.10 seconds. Type 3 specifies that tabs are to be
expanded into spaces. If OFILL is set, 2 fill characters will be
transmitted for any delay.
Backspace delay lasts about 0.05 seconds. If OFILL is set, 1 fill character will be transmitted.
The actual delays depend on line speed and system load.
The initial output control value is all bits clear.
The c_ cflag field describes the hardware control of the terminal:
CBAUD

BO
B50
B75
BllO
B134
B150
B200
B300

May 16, 1988

0000017 Baud rate:
o
Hang up
0000001 50 baud
0000002 75 baud
0000003 110 baud
0000004 134.5 baud
0000005 150 baud
0000006 200 baud
0000007 300 baud

Page 6

TERMIO (M)

B600
B1200
B1800
B2400
B4800
B9600
EXTA
EXTB
CSIZE

CS5
CS6
CS7
CS8
CSTOPB
CREAD
PARENB
PARODD
HUPCL
CLOCAL
LOBLK

TERMIO (M)

0000010
0000011
0000012
0000013
0000014
0000015
0000016
0000017

600 baud
1200 baud
1800 baud
2400 baud
4800 baud
9600 baud
External A
External B

0000060 Character size:
5 bits
0000020 6 bits
0000040 7 bits
0000060 8 bits
0000100 Sends two stop bits, else one
0000200 Enables receiver
0000400 Parity enable
0001000 Odd parity, else even
0002000 Hangs up on last close
0004000 Local line, else dial-up
0010000 Block layer output

o

The CBAUD bits specify the baud rate. The zero baud rate, BO, is used
to hang up the connection. If BO is specified, the data-tenninal-ready
signal will not be asserted. Without this signal, the line is disc on nected if it is connected through a modem. For any particular
hardware, impossible speed changes are ignored.
The CSIZE bits- specify the character size in bits for both transmission
and reception. This size does not include the parity bit, if any. If
CSTOPB is set, 2 stop bits are used, otherwise 1 stop bit. For example,
at 110 baud, 2 stops bits are required.
If PARENB is set, parity generation and detection is enabled and a parity bit is added to each character. If parity is enabled, the PARODD

flag specifies odd parity if set, otherwise even parity is used.
If CREAD is set, the receiver is enabled. Otherwise no characters will

be received.
If HUPCL is set, the line will be disconnected when the last process
with the line open closes it or tenninates. That is, the data-tenninalready signal will not be asserted.
If CLOCAL is set, the line is assumed to be a local, direct connection

with no modem control. The data-tenninal-ready and request-to-send
signals are asserted, but incoming modem signals are ignored. If
CLOCAL is not set, modem control is assumed. This means the datatenninal-ready and request-to-send signals are asserted. Also, the

May 16, 1988

Page 7

TERMIO (M)

TERMIO (M)

carrier-detect signal must be returned before communications can
proceed.
If LOBLK is set, the output of a job control layer will be blocked when

it is not the current layer. Otherwise the output generated by that
layer will be multiplexed onto the current layer.
The initial hardware control value after open is B9600, CS8, CREAD,
HUPCL.
The c_!flag field of the argument structure is used by the line discipline to control terminal functions. The basic line discipline (0) provides the following:
ISIG
ICANON
XCASE
ECHO
ECHOE
ECHOK
ECHONL
NOFLSH
XCLUDE

0000001
0000002
0000004
0000010
0000020
0000040
0000100
0000200
0100000

Enable signals
Canonical input (erase and kill processing)
Canonical upper!lower presentation
Enables echo
Echoes erase character as BS-SP-BS
Echoes NL after kill character
EchoesNL
Disables flush after interrupt or quit
Exclusive use of the line

If ISIG is set, each input character is checked against the special control characters INTR, SWTCH, and QUIT. If an input character

matches one of these control characters, the function associated with
that character is performed. If ISIG is not set, no checking is done.
Thus, these special input functions are possible only if ISIG is set.
These functions may be disabled individually by changing the value of
the control character to an unlikely or impossible value (e.g., 0377).
If ICANON is set, canonical processing is enabled. This enables the
erase and kill edit functions, and the assembly of input characters into

lines delimited by NL, EOF, and EOL. If ICANON is not set, read
requests are satisfied directly from the input queue. A read will not be
satisfied until at least VMIN characters have been received or the
timeout value VTIME has expired and at least one character has been
input. This allows fast bursts of input to be read efficiently while still
allowing single character input. (See the discussion of VMIN and
VTIME below.)
The VMIN and VTIME values are stored in the position for the EOF
and EOL characters respectively. VMIN and VTIME are interpreted as
EOF and EOL if ICANON is set. Default VMIN and VTIME values are
stored in the lusr/includel sys/termio.h file. To change these values,
set ICANON to off and use stty(C) to change the VMIN and VTIME
values as represented by EOF and EOL. The TIME value represents
tenths of seconds.

May 16, 1988

Page 8

TERMIO (M)

TERMIO (M)

If XCASE and ICANON are set, an uppercase letter is accepted on
input by preceding it with a \ character, and is output preceded by a \
character. In this mode, the following escape sequences are generated
on output and accepted on input:

For:

J

Use:
\"
\!
\"

{
}

\(
\)

\

\\

For example, A is input as \a, \0 as \\0, and \N as \ \\no
If ECHO is set, characters are echoed as received.

When ICANON is set, the following echo functions are possible. If
ECHO and ECHOE are set, the erase character is echoed as ASCII BS
SP BS, which will clear the last character from a CRT screen. If
ECHOE is set and ECHO is not set, the erase character is. echoed as
ASCII SP BS. If ECHOK is set, the NL character will be echoed after
the kill character to emphasize that the line will be deleted. Note that
an escape character preceding the erase or kill character removes any
special function. If ECHONL is set, the NL character will be echoed
even if ECHO is not set. This is useful for tenninals set to local echo
(so-called half duplex). Unless escaped, the EOF character is not
echoed. Because EOT is the default EOF character, this prevents terminals that respond to EOT from hanging up.
If NOFLSH is set, the nonnal flush of the input and output queues associated with the quit and interrupt characters will not be done.
If XCLUDE is set, any subsequent attempt to open the TTY device
using open(S) will fail for all users except the super-user. If the call
fails, it returns EBUSY in errno. XCLUDE is useful for programs
which must have exclusive use of a communications line. It is not
intended for the line to the program's controlling terminal. XCLUDE
must be cleared before the setting program terminates, otherwise subsequent attempts to open the device will fail.
VMIN represents the minimum number of characters that should be

received when the read is satisfied (i.e., the characters are returned to
the user). VTIME is a timer of 0.10 second granularity used to time-out
bursty and short-term data transmissions. The four possible values for
VMIN and VTIME and their interactions are:
VMIN > 0, VTIME > 0
In this case, VTIME serves as an inter-character timer activated after
the first character is received, and reset upon receipt of each character.
VMIN and VTIME interact as follows:

May 16, 1988

Page 9

1~1<.M1U

l1iKM1U (M)

(M)

As soon as one character is received the inter-character timer is
started.
If VMIN characters are received before the inter-character timer

expires the read is satis fied.
If the timer expires before VMIN characters are received the char-

acters received to that point are returned to the user.
A read(S) operation will sleep until the VMIN and VTIME mechanisms are activated by the receipt of the first character; thus, at least
one character must be returned.
VMIN > 0, VTIME = 0
In this case, because VTIME = 0, the timer plays no role and only
VMIN is significant. A read(S) operation is not satisfied until VMIN

characters are received.
VMIN = 0, VTIME > 0
In this case, because VMIN = 0, VTIME no longer serves as an inter-

character timer, but now serves as a read timer that is activated as
soon as the read(S) operation is processed. A read(S) operation is
satisfied as soon as a single character is received or the timer expires,
in which case, the read(S) operation will not return any characters.

=

=

VMIN 0, VTIME 0
In this case, return is immediate. If characters are present, they will

be returned to the user.
The initial line-discipline control value is all bits clear.
The primary ioctl (S) system calls have the form:
ioctl (fildes, command, arg)
struct termio *arg;
The commands using this form are:
TCGETA

Gets the parameters associated with the terminal and
stores them in the termio structure referenced by argo

TCSETA

Sets the parameters associated with the terminal from
the structure referenced by argo The change is
immediate.

TCSETAW

Waits for the output to drain before setting the new
parameters. This form should be used when changing
parameters that will affect output.

TCSETAF

Waits for the output to drain, then flushes the input
queue and sets the new parameters.

May 16, 1988

Page 10

TERMIO (M)

TERMIO (M)

Additional ioctl (S) calls have the form:
ioctl (fildes, command, arg)
int arg;
The commands using this form are:
TCSBRK

Waits for the output to drain. If arg is 0, then sends a
break (zero bits for 0.25 seconds).

TCXONC

Starts/stops control. If arg is 0, suspends output; if 1,
restarts suspended output.

TCFLSH

If arg is 0, flushes the input queue; if 1, flushes the

output queue; if 2, flushes both the input and output
queues.
Files

/dev/tty
/dev/tty*
/dev/console
See Also

fork(S), ioctl(S), mapchan(F), mapchan(M), read(S), setgprp(S),
signal(S), stty(C), tty(M)

May 16,1988

Page 11

TRCHAN(M)

TRCHAN(M)

Name

trchan - Translate character sets
Syntax

trchan [-ciko] mapfile
Description

trehan perfonns mapping as a filter, using the same fonnat of mapfile
as mapehan(M) (described in mapehan(F». This allows a file consisting of one internal character set to be "translated' , to another internal
character set.
trehan reads standard input, maps it, and writes to standard output. A
mapfile must be given on the command line. Errors cause trehan to
stop processing unless -c is specified.

The following options can be used with trehan :
-c causes errors to be echoed on stderr, and processing is continued.

-i specifies that the "input" section of the mapfile is used when
translating data.
-k specifies that the "dead" and "compose" sections of the mapfile

are used when translating data.
-0

specifies that the "output" section of the mapfile is used when
translating data.
The -i, -k and -0 options can be specified in any combination; if
none are specified, trehan uses the entire mapfile, as if all three
were specified together.

Files

/usr/lib/mapchan/*
See Also

ascii(M), mapchan(F), mapchan(M)
Notes

trehan currently ignores the control sections of the mapfile.

June 29, 1988

Page 1

17Y(M)

17Y(M)

Name
tty - Special terminal interface.
Description
The file /dev/tty is, in each process, a synonym for the control terminal associated with the process group of that process, if any. It is useful for programs or shell sequences that wish to be sure of writing
messages on the terminal no matter how output has been redirected. It
can also be used for programs that demand the name of a file for output, when typed output is desired, and when it is tiresome to find out
what terminal is currently in use.
The general terminal interface is described in termio (M).
Files
/dev/tty
/dev/tty*
See Also
termio(M)

May 16, 1988

Page 1

TZ(M)

TZ(M)

Name
TZ - Time zone environment variable.
Syntax
TZ=sssn[ddd[m][;start[ltime],end[ltime] ]] ; export TZ

setenv TZ sssn[ddd[m][;start[ltime],end[ltime]]]
/etc/tz
Description
TZ is the shell environment variable for the time zone of the system
and is set in the files /etc/rc, /.profile, and /etc/default/login.
The shell script /etc/tz, generally run during installation, prompts for
the correct time zone and makes the changes in the appropriate files.
/etc/tz also prompts for the dates when time is shifted from standard to
daylight time and back, and for the number of hours to shift (partial
hours in the form of hh:mm:ss are acceptable).
Users living in a time zone different than that of the host machine may
change TZ in their $HOME/.profile or $HOMEl.Iogin files.
TZ contains the following information:
(sss)

One to nine letters designating the standard time zone.

(n)

Number of hours past Greenwich mean time for the standard time (partial hours are valid e.g. 12:30:01). Positive
hours are west of Greenwich, negative numbers are east of
Greeenwich.

(ddd)

One to nine letters designating the local daylight savings
time (summer time) zone. If not present, summer time is
assumed not to apply.

(m)

Number of hours past Greenwich mean time for the summer time (partial hours are valid e.g. 11:30:01). Positive
hours are west of Greenwich, negative numbers are east of
Greeenwich. If m is not given, the distance to GMT during summer time is assumed to be one hour less than during standard time.

(start)

The rule defining the day summer time begins. In the
southern hemisphere, the ending day will be earlier in the
year than the starting day.

May 16, 1988

Page 1

TZ(M)

lZlM)

(end)

The rule defining the day summer time ends.

(time)

The time of day the change to and from summer time
occurs. The default is 02:00:00 local time.

The rules for defining the start and end of summer time are as follows:
1 based Julian day n (1

In
n
Wn.d
Mm.n.d

*

~

n ~ 365)*

obased Julian day n (0 ~ n ~ 364)*
day d (0 :::; d:::; 6)** of week n (1 :::; n :::; 53)t
day d of week n (1 ~ n ~ 5)+ of month m (1 :::; m :::; 12)

Leap days (February 29) are never counted; that is, February 28
(J59) is immediately followed by March 1 (160) even in leap years.

** Sunday is the first day of the week (0). If d is omitted, Sunday is
assumed. Note that d is optional.

t The 5th week of the month is always the last week containing day'
d, whether there are actually 4 or 5 weeks containing day d.
:j:

The 53rd week of the year is always the last week containing day
d, whether there are actually 52 or 53 weeks containing day d.

If start and end are omitted, current U.S. law is assumed.
For the simple expression of Eastern Standard/Daylight Time TZ is set
as follows:
TZ=EST5EDT ; export TZ
(for sh(C) and vsh(C))
setenv TZ EST5EDT
(for csh(C))
The fully expressed TZ string for Eastern Standard/Daylight Time,
using the current U.S. law of changing to daylight saving time on the
first Sunday in April, and back to standard time on the last Sunday in
October at 2:00 a.m. local time, would be:
TZ=EST05 :00:00EDT04:00:00;M4.1.0/02:00:00,M1 0.5.0/02:00:00

To change the time zone for the entire system, run the shell script
/etc/tz (as root) or use an editor to change the variable TZ in the files
/etc/rc, /.profile and /etc/default/login. In /etc/rc the line changing
the time zone (see the sh example above) must occur before the
/etc/asktime command. The TZ variable in /etc/default/login causes
the time zone to be set correctly on logging in and for programs such
as uucico.

May 16, 1988

Page 2

TZ(M)

TZ(M)

Files
/etc/rc
/etc/default/login
/etc/tz
$HOME/.profile
$HOME/.login
See Also
environ(M), date(C), ctime(S)
Notes
The date (C) automatically switches from Standard Time to Summer
Time (Daylight Saving Time). Leap days are properly accounted for.
Changes to TZ are immediately effective, (Le. if a process changes the
TZ variable, the next call to a ctime (S) routine returns a value based
on the new value of the variable).

May 16, 1988

Page 3

Contents
File Formats (F)
intro
86rel
a.out
acct
ar
archive
backup
checklist
clock
core
cpio
default
dir
dump
filesys
filesystem
fstab
gettydefs
group
inittab
inode
mapchan
master
mem,kmem
micnet
mnttab
null
passwd
sccsfile
stat
systemid
tar
term
terminfo
top, top.next
ttYS
types

Introduction to file fonnats.
Intel relocatable format for object modules.
Format of assembler .and link editor output.
Format of per-process accounting file.
Archive file format.
Default backup device information.
Incremental dump tape format.
List of file systems processed by fsck.
System real time clock.
Format of core image file.
Format of cpio archive.
Default program infonnation directory.
Format of a directory.
Incremental dump tape format.
Default infonnation for mounting file systems.
Format of a system volume.
File system mount and check commands.
Terminal speeds and settings.
Format of the group file.
Alternative login terminals file.
Format of an inode.
Format of tty device mapping files.
Master device information table.
Memory image file.
The Micnet default commands file.
Format of mounted file system table.
The null file.
The password file.
Format of an sees file.
Data returned by stat system call.
The Micnet system identification file.
Archive fonnat.
Terminal driving tables for nroff.
Format of compiled term info file.
The Micnet topology files.
Login terminals file.
Primitive system data types.

utmp, wtmp

ii

Fonnats of utrnp and wtrnp entries.

INTRO (F)

INTRO (F)

Name

intro - Introduction to file formats.
Description

This section outlines the formats of various files. Usually, these structures can be found in the directories lusr/include or lusr/include/sys.

May 16, 1988

Page 1

86REL (F)

86REL (F)

Name
86rel - Intel 8086 Relocatable Format for Object Modules.
Syntax
#include 
Description
Intel 8086 Relocatable Format, or 86rel, is the object module format
generated by masm(CP), and the input format for the linker Id(CP).
The include file relsym86.h specifies appropriate definitions to access
86rel format files from C. For the technical details of the 86rel format, see Intel 8086 Object Module Format External Product Specification.
An 86rel consists of one or more variable length records. Each record
has at least three fields: the record type, length, and checksum. The
first byte always denotes the record type. There are thirty-one different record types. Only eleven are used by Id(CP) and masm(CP).
The word after the first byte is the length of the record in bytes,
exclusive of the first three bytes. Following the length word are typically one or more fields. Each record type has a specific sequence of
fields, some of which may be optional or of varying length. The very
last byte in each record is a checksum. The checksum byte contains
the sum modulo 256 of all other bytes in the record. The sum modulo
256 of all bytes in a record, including the checksum byte, should equal
zero.
With few exceptions, 86rel strings are length prefixed and have no
trailing null. The first byte contains a number between 0 and 40,
which is the remaining length of the string in bytes. Although the
Intel specification limits the character set to upper case letters, digits,
and the characters "?", "@", ":", ".", and "_", masm (CP) uses the
complete ASCII character set.
The Intel Object Module Format (OMF) specification uses the term
"index" to mean a positive integer either in the range 0 to 127, or 128
to 32,768. This terminology is retained in this document and elsewhere in the 86relliterature. An index has one or two bytes. If the
first byte has a leading 0 bit, the index is assumed to have only one
byte, and the remainder of the byte represents a positive integer
between 0 and 127. If the second byte has a leading 1 bit, the index is
assumed to take up two bytes, and the remainder of the word
represents a positive integer between 128 and 32,768.

May 16, 1988

Page 1

86REL (F)

86REL (F)

Following is a list of record types and the hexadecimal value of their
first byte, as defined in relsym86.h.
#define MRHEADR Ox6e I*rel module header/*
#define MREGINT
Ox70 I*register initialization*1
#define MREDATA Ox72 1* explicit (enumerated) data image *1
#define MRIDATA
Ox74/*repeated (iterated) data image*1
#define MOVLDEF
Ox76 1* overlay definition*1
#define MENDREC
Ox78 I*block or overlay end record*1
#define MBLKDEF
Ox7 a I*block definition *1
#define MBLKEND
Ox7c /*block end*/
#define MDEBSYM
Ox7e I*debug symbols*1
#define MTHEADR Ox80 I*module header,
*usually first in a reI file *1
#define MLHEADR Ox82 I*link module header*1
#define MPEDATA Ox84 1* absolute data image*1
#define MPIDATA
Ox86 1* absolute repeated (iterated)
*data image*1
#define MCOMENT Ox88 I*comment record*1
#define MMODEND Ox8a I*module end record*1
Ox8c I*external definition*1
#define MEXTDEF
#define MTYPDEF
Ox8e I*type definition*1
Ox90 I*public definition*1
#define MPUBDEF
#define MLOCSYM
Ox92/*local symbols*1
#define MLINNUM
Ox94 I*source line number* 1
#define MLNAMES Ox96/*name list record*1
#define MSEGDEF
Ox98 I*segment definition*1
#define MGRPDEF
Ox9a /*group definition*/
#define MFIXUPP
Ox9c /*fix up previous data image*1
#define MNONEI
Oxge l*none*1
#define MLEDATA OxaO I*logical data image*1
#define MLIDATA
Oxa2 I*logical repeated (iterated)
*data image* /
#define MLIBHED
Oxa4 I*library header*1
#define MLIBNAM
Oxa6 I*library names record*1
#define MLIBLOC
Oxa8 I*library module locations*1
#define MLIBDIC
Oxaa I*library dictionary*1
#define M386END
Ox86 1*32 bit module end record* 1
#define MPUB386
Ox91 1*32 bit public definition*/
#define MLOC386
Ox93 1*32 bit logical symbols*1
#define MLIN386
Ox95 1*32 bit source line number*1
Ox99 1*32 bit segment definition*1
#define MSEG386
#define MFIX386
Ox9d I*fix up previous 32 bit data image*1
#define MLED386
Oxa1 1*32 bit logical data image*1
Oxa3 1*32 bit logical repeated (iterated) data imag
#define MLID386
In the following discussion, the salient features of each record type are
given. If the record is not used by either masm(CP) or ld(ep), it is not
listed.

May 16, 1988

Page 2

86REL (F)

86REL (F)
THEADR

The record type byte is Ox80. The THEADR record
specifies the name of the source module at assemblytime (see Notes). The sole field is the T-MODULE
NAME , which contains a length-prefixed string
derived from the base name of the source module.

COMENT

The record type byte is Ox88. The COMENT record
may contain a remark generated by the compiler system. mams(CP) inserts the string "XENIX 8086
ASSEMBLER.' '

MODEND

The record type byte is Ox8a. The MODEND record
terminates a module. It can specify whether the
current module is to be used as the entry point to the
linked executable. If the module is an entry point, the
MODEND record can then specify the address of the
entry point within the executable.

EXTDEF

The record type byte is Ox8c. The EXTDEF record
contains the names and types of symbols defined in
other modules by a PUBDEF record (see below). This
corresponds to the C storage class ' 'extern. " The
fields consist of one or more length-prefixed strings,
each with a following type index. The indices reference a TYPDEF record seen earlier in the module.
masm(CP) generates only one EXTDEF per exterior
symbol.

TYPDEF

The record type byte is Ox8e. The TYPDEF record
gives a description of the type (size and storage attributes) of an object or objects. This description can
then be referenced by EXTDEF , PUBDEF , and other
records.

PUBDEF

The record type byte is Ox90. The PUBDEF record
gives a list of one or more names that may be referenced by other modules at link-time ("publics"). The
list of names is preceded by a group and segment
index, which reference the location of the start of the
list of publics within the current segment and group.
If the segment and group indices are zero, a frame
number is given to provide an absolute address in the
module. The list consists of one or more of lengthprefixed strings, each associated with a 16-bit offset
within the current segment and a type index referring
to a TYPDEF.

LNAMES

The record type byte is Ox96. The LNAMES record
gives a series of length-prefixed strings which are
associated with name indices within the current
module. Each name is indexed in sequence given
starting with 1. The names may then be referenced

May 16, 1988

Page 3

86REL (F)

86REL (F)

within the current module by successive SEGDEF and
GRPDEF records to provide strings for segments,
classes, overlays or groups.
SEGDEF

The record type byte is Ox98. The SEGDEF record provides an index to reference a segment, and information concerning segment addressing and attributes.
This index may be used by other records to refer to the
segment. The first word in the record after the length
field gives information about the alignment, and about
combination attributes of the segment. The next word
is the segment length in bytes. Note that this restrains
segments to a maximum 645,536 bytes in length. Following this word is an index (see above) for the segment. Lastly, the SEGDEF may optionally contain
class and/or overlay index fields.

GRPDEF

The record type is Ox9a. The GRPDEF record provides
a name to reference several segments. The group
name is implemented as an index (see above).

FIXUPP

The record byte is Ox9c. The FIXUPP record specifies
one or more load-time address modifications
("fixups"). Each fixup refers to a location in a
preceding LEDATA (see below) record. The fixup is
specified by four data; a location, a mode, a target and
a frame. The frame and target may be specified explicitly or by reference to an already defined fixup.

LEDATA

The record type byte is OxaO. This record provides a
contiguous text or data image which the loader Id(CP)
uses to construct a portion of an 8086 run-time executable. The image might require additional processing
(see FIXUPP) before being loaded into the executable.
The image is preceded by two fields, a segment index
and an enumerated data offset. The segment index
(see INDEX) specifies a segment given by a previously
seen SEGDEF. The enumerated data offset (a word)
specifies the offset from the start of this segment.

See Also

as(CP), Id(CP)

May 16, 1988

Page 4

86REL (F)
Notes
If you attempt to load a number of modules assembled under the same
basename, the loader will try to put them all in one big segment. In
286 programs, segment size is limited to 64K. In a large program the
resulting segment size can easily exceed 64K. A large model code
executable results from the link of one or more modules, composed of
segments that aggregate into greater than 64K of text.

Hence, be sure that the assembly-time name of the module has the
same basename as the source. This can occur if the source module is
preprocessed not by cc(CP), but, for example, by hand or shell script,
prior to assembly. The following example is incorrect:
#incorrect
cc -E module1.c I filter> x.c
cc x.c
mv x.o module 1.0
cc -E module2.c I filter> x.c
cc x.c
mv x.o module2.0
cc -E module3.c I filter> x.c
cc x.c
mv x.o module3.0
ld modulel.o module2.0 module3.0
To avoid this, each of the modules should have a unique name when
assembled, as follows:
#correct
cc -E module 1.c I filter> x.c
cc -S x.c
mv x.s module1.s
as module1.s

Id modulel.o module2.0 module3.0

May 16, 1988

A.OUT(F)

A.OUT(F)

Name
a.out - Format of assembler and link editor output.

Description
A.out is the output file of the assembler masm and the link editor ld.
Both programs will make a.out executable if there were no errors in
assembling or linking, and no unresolved external references.
The format of a.out, called the x.out or segmented x.out format, is
defined
by
the
files
lusr/includel a.out.h
and
lusr/include/sys/relsym.h. The a.out file has the following general
layout:
1.

Header.

2.

Extended header.

3.

File segment table (for segmented formats).

4.

Segments (Text, Data, Symbol, and Relocation).

In the segmented format, there may be several text and data segments,
depending on the memory model of the program. Segments within the
file begin on boundaries which are multiplies of 512 bytes as defined
by the file's pagesize.

Format
/*

*
*
*

*
*

The main and extended header structures.
For x.out segmented (XE_SEG):
1) fields marked with (s) must contain sums of xs_psize for
non-memory images, or xs_vsize for memory images.
2) the contents of fields marked with (u) are undefined.

*/
struct xexec {
/* x.out header */
unsigned short x_magic; /* magic number */
unsigned short x_ext;
/* size of header extension */
long
x_text;
/* size of text segment (s) */
long
x_data;
/* size of initialized data (s) */
long
x_bss;
/* size of uninitialized data (s) */
long
x_syms;
/* size of symbol table (s) */
long
x_reloc;
/* relocation table length (s) */
long
x_entry;
/* entry point, machine dependent */

May 16, 1988

Page 1

A.UU1' (ti)

A.UU1Ct')

char
x_cpu;
/* cpu type & byte/word order */
char
x_relsym; /* relocation & symbol format (u) */
/* run-time environment */
unsigned short x_renv;
};

struct xext {
long
long
long
long
long

/* x.out header extension */
/* size of text relocation (s) */
xe_trsize;
/* size of data relocation (s) */
xe_drsize;
xe_tbase;
/* text relocation base (u) */
/* data relocation base (u) */
xe_dbase;
/* stack size (ifXE_FS set) */
xe_stksize;
/* the following must be present if XE_SEG */
/* segment table position */
long
xe_segpos;
/* segment table size */
long
xe_segsize;
long
xe_mdtpos; /* machine dependent table position */
long
xe_mdtsize;/* machine dependent table size */
/* machine dependent table type */
char
xe_mdttype;
char
xe_pagesize; /* file pagesize, in multiples of 512 */
/* operating system type */
char
xe_ostype;
/* operating system version */
char
xe_osvers;
unsigned short xe_eseg; /* entry segment, machine dependent */
/* reserved */
unsigned short xe_sres;

};

struct xseg {
unsigned
unsigned
unsigned
char
char
long
long
long
long
unsigned
unsigned
long

/* x.out segment table entry */
short xs_type;
/* segment type */
short xs_attr; /* segment attributes */
/* segment number */
short xs_seg;
/* log base 2 of alignment */
xs_align;
xS3res;
/* unused */
/* file position */
xs_filpos;
/* physical size (in file) */
xs_psize;
/* virtual size (in core) */
xs_vsize;
/* relocation base address/offset */
xs_rbase;
short xs_noff,/* segment name string table offset */
short xs_sres;/* unused */
/* unused */
xs_Ires;

};

struct xiter {
long
long
long

xi_size;
xi_rep;
xi_offset;

/* x.out iteration record */
/* source byte count */
/* replication count */
/* destination offset in segment */

};

May 16, 1988

Page 2

A.OUT(F)

A.OUT(F)
struct xlist {
/* xlist structure for xlist(3). */
unsigned short xCtype;
/* symbol type */
unsigned short xl_seg;
/* file segment table index */
long
xl_value;
/* symbol value */
char
*xl_name;
/* pointer to asciz name */
};
struct aexec {
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
unsigned short
};

/* a.out header */
xa_magic;
/* magic number */
xa_text;
/* size of text segment */
xa_data;
/* size of initialized data */
xa_bss;
/* size of uninitialized data */
xa_syms;
/* size of symbol table */
xa_entry;
/* entry point */
xa_unused; /* not used */
xa_flag;
/* relocation info stripped */

struct nlist {
/* nlist structure for nlist(3). */
char
n_name[8]; /* symbol name */
int
n_type;
/* type flag */
unsigned n_value;
/* value */
};

struct bexec {
/* b.out header */
long
xb_magic; /* magic number */
long
xb_text;
/* text segment size */
long
xb_data;
/* data segment size */
long
xb_bss; /* bss size */
long
xb_syms; /* symbol table size */
long
xb_trsize; /* text relocation table size */
long
xb_drsize; /* data relocation table size */
long
xb_entry; /* entry point */
};

See Also
masm(CP), Id(CP), nm(CP), strip(CP), xlist(S).

May 16, 1988

Page 3

ACCT(F)

ACCT(F)

Name
acct - Format of per-process accounting file.
Description

Files produced as a result of calling acct(S) have records in the form
defined by .
In acJlag, the AFORK flag is turned on by eachfork(S) and turned off
by an exec (S). The ac_comm field is inherited from the parent process and is reset by any exec. Each time the system charges the process with a clock tick, it also adds the current process size to ac mem
computed as follows:
-

(data size) + (text size) / (number of in-core processes using text)
The value of ac mem/ ac stime can be viewed as an approximation to
the mean process size, as modified by text-sharing.
See Also
acctcom(ADM), acct(S)
Notes
The ac_ mem value for a short-lived command gives little information
about the actual size of the command, because ac_ mem may be incremented while a different command (e.g., the shell) is being executed
by the process.

May 16, 1988

Page 1

AR (F)

AR (F)

Name
ar - Archive file fonnat.
Description
The archive command ar is used to combine several files into one.
Archives are used mainly as libraries to be searched by the link editor
Id(C).

A file produced by ar has a magic number at the start, followed by the
constituent files, each preceded by a file header. The magic number is
0177545 octal (or Oxff65 hexadecimal). The header of each file is
declared in lusr/include/ar.h.
Each file begins on a word boundary; a null byte is inserted between
files if necessary. Nevertheless the size given reflects the actual size
of the file exclusive of padding.
Notice there is no provision for empty areas in an archive file.
See Also
ar(CP), Id(CP)

May 16, 1988

Page 1

ARCHlVE(F)

ARCHlVE(F)

Name

archive - Default backup device information.

Descri ption
/etcldefault/archive contains information on system default backup
devices for use by sysadmin(ADM). The device entries are in the following format:

name=value [name=value] ...
value may contain white spaces if quoted, and newlines may be
escaped with a backslash.

The following names are defined for /etcldefault/archive:
bdev

Name of the block interface device.

cdev

Narne of the character interface device.

size

Size of the volume in either blocks or feet.

density

Volume density, such as 1600. If this value is missing or null, then size is in blocks; otherwise the size
is in feet.

format

Command used to format the archive device.

blocking

Blocking factor.

desc

A description of the device, such as "Cartridge
Tape."

See Also

sysadmin(ADM)

May 16, 1988

Page 1

BACKUP (F)

BACKUP (F)

Name

backup - Incremental dump tape format.
Description

The backup and restore commands are used to write and read incremental dump magnetic tapes.
The backup tape consists of a header record, some bit mask records, a
group of records describing file system directories, a group of records
describing file system files, and some records describing a second bit
mask.
The header record and the first record of each description have the format described by the structure included by:
#include 

Fields in the dumprestor structure are described below.
NTREC is the number of 512 byte blocks in a physical tape record.
MLEN is the number of bits in a bit map word. MSIZ is the number of

bit map words.
The TS_ entries are used in the c type field to indicate what sort of
header this is. The types and their meanings are as follows:
TS_TYPE

Tape volume label.

TS_INODE

A file or directory follows. The c_ din ode field is a
copy of the disk inode and contains bits telling what
sort of file this is.

TS_BITS

A bit mask follows. This bit mask has one bit for each
inode that was backed up.

TS_ADDR

A subblock to a file (TS INODE). See the description
of c count below.
-

TS_END

End of tape record.

TS_CLRI

A bit mask follows. This bit mask contains one bit for
all inodes that were empty on the file system when
backed up.

MAGIC

All header blocks have this number in c_magic.

CHECKSUM

Header blocks checksum to this value.

May 16, 1988

Page 1

BACKUP (F)

BACKUP (F)

The fields of the header structure are as follows:
c_type

The type of the header.

c date

The date the backup was taken.

c ddate

The date the file system was backed up.

c volume

The current volume number of the backup.

c_tapea

The current block number of this record. This is counting 512 byte blocks.

c inumber

The number of the inode being backed up if this is of
type TS_INODE.

c_magic

This contains the value MAGIC above, truncated as
needed.

c checksum

This contains whatever value is needed to make the
block sum to CHECKSUM.

c din ode

This is a copy of the inode as it appears on the file system.

c count

The following count of characters describes the file.
A character is zero if the block associated with that
character was not present on the file system; otherwise, the character is nonzero. If the block was not
present on the file system no block was backed up and
it is replaced as a hole in the file. If there is not
sufficient space in this block to describe all of the
blocks in a file, TS_ADDR blocks will be scattered
through the file, each one picking up where the last
left off.

c addr

This is the array of characters that is used as described
above.

Each volume except the last ends with a tapemark (read as an end of
file). The last volume ends with a TS_END block and then the tapemark.
The structure idates describes an entry of the file where backup history is kept.
See Also
backup(C), restore(C), filesystem(F)

May 16, 1988

Page 2

CHECKLIST (F)

CHECKLIST (F)

Name

checklist - List of file systems processed by fsck.
Description

The /etc/checklist file contains a list of the file systems to be checked
when fsck(ADM) is invoked without arguments. The list contains at
most 15 special tile names. Each special file name must be on a
separate line and must correspond to a file system.
See Also

fsck(ADM)

May 16, 1988

Page 1

CLOCK (F)

CLOCK (F)

Name
clock - The system real-time (time of day) clock.
Description
The clock file provides access to the battery-powered, real-time time
of day clock. Reading this file returns the current time; writing to the
file sets the current time. The time, 10 bytes long, has the following
form:
MMddhhmmyy
where MM is the month, dd is the day, hh is the hour, mm is the
minute, and yy is the last two digits of the year. For example, the time:
0826150385 is 15:03 on August 26, 1985.
Files
/dev/clock
See Also
setclock(ADM)
Notes
Not all computers have battery-powered real-time time of day clocks.
Refer to your computer's hardware reference manual.

May 16, 1988

Page 1

CORE (F)

CORE (F)

Name
core - Format of core image file.

Description
XENIX writes out a core image of a terminated process when any of
various errors occur. See signal (S) for the list of reasons; the most
common are memory violations, illegal instructions, bus errors, and
user-generated quit signals. The core image is called core and is written in the process' working directory (provided it can be; normal
access controls apply). A process with an effective user ID different
from the real user ID will not produce a core image.
The first section of the core image is a copy of the system's per-user
data for the process, including the registers as they were at the time of
the fault. The size of this section depends on the parameter usize,
which is defmed in lusr/includel sys/param.h. The remainder
represents the actual contents of the user's core area when the core
image was written. If the text segment is read-only and shared, or
separated from data space, it is not dumped.
The format of the information in the first section is described by the
user structure of the system, defined in lusr/includel sys/user .h. The
locations of registers, are outlined in lusr/include/sys/reg.h.
See Also
adb(CP), setuid(S), signal(S)

May 16,1988

Page 1

CPIO (F)

CPIO (F)

Name
cpio - Fonnat of cpio archive.

Description
The header structure, when the c option is not used, is:
struct {
short

h_magic,
h_dev,
h_ino,
h_mode,
h_uid,
h~id,

char

h_nlink,
h_rdev,
h_mtime[2] ,
h_namesize,
h_filesize[2] ;
h_name[h_namesize rounded to word];

} Hdr;
When the c option is used, the header information is described by the
statement below:
sscanf(Chdr, "%60%60%60%60%60%60%60%60% 1110%60% 1110%s ",
&Hdr.h_magic,&Hdr.h_dev,&Hdr.h_ino,&Hdr.h_mode,
&Hdr.h_uid,&Hdr.h~id,&Hdr.h_n1ink,&Hdr.h_rdev ,
&Longtime,&Hdr.h_namesize,&Longfile,Hdr.h_name);

Longtime and Longfile are equivalent to Hdr.h_mtime and
Hdr.hJilesize, respectively. The contents of each file is recorded in
an element of the array of varying length structures, archive, together
with other items describing the file. Every instance of h_magic contains the constant 070707 (octal). The items h dev through h mtime
have meanings explained in stat(S). The length-of the null-terminated
patbname h_name, including the null byte, is given by h_ namesize.
The last record of the archive always contains the name TRAILER!!!.
Special files, directories, and the trailer are recorded with hJilesize
equal to zero.

See Also
cpio(C), find(C), stat(S)

May 16, 1988

Page 1

DEFAULT (F)

DEFAULT (F)

Name
default - Default program information directory.
Description
The files in the directory /etc/default contain the default information
used by system commands such as backup(C) and remote(C).
Default information is any information required by the command that
is not explicitly given when the command is invoked.
The directory may contain zero or more files. Each file corresponds to
one or more commands. A command searches a file whenever it has
been invoked without sufficient information. Each file contains zero
or more entries which define the default information. Each entry has
the form:
keyword
or
keyword=value
where keyword identifies the type of information available and value
defines its value. Both keyword and value must consist of letters,
digits, and punctuation. The exact spelling of a keyword and the
appropriate values depend on the command and are described with the
individual commands.
Any line in a file beginning with a number sign (#) is considered a
comment and is ignored.
Files
/etc/default/archive
/etc/default!backup
/etc/default!boot
/etc/default/cron
/etc/default/ dumpdir
/etc/default/dumpsrv
/etc/default/ filesys
/etc/default/format
/etc/default/login
/etc/default/lpd
/etc/default/man
/etc/default/mapchan
/etc/default/micnet
/etc/default/mkuser
/etc/default/msdos
/etc/default/passwd

May 16, 1988

Page 1

DEFAULT (F)

DEFAULT (F)

/etc/default/restor
/etc/default/ su
/etc/default/tar
/etc/default/usemouse
See Also

archive(F), backup(C), boot(HW), cron(C), dos(C), dumpdir(C),
filesys(F), 10gin(M), Ipr(C), mapchan(M), mapchan(F), micnet (F),
mkuser(ADM), pwadmin(ADM), remote(C), restore(C), su(C),
sysadmin(ADM), tar(C)
Note

Not all commands use letc/default files. Please refer to the manual
page for a specific command to determine if letcl default files are used,
and what information is specified.

May 16, 1988

Page 2

DIR (F)

DIR (F)

Name
dir - Fonnat of a directory.
Syntax
#include 
Description
A directory behaves exactly like an ordinary file, except that no user
may write into a directory. The fact that a file is a directory is indicated by a bit in the flag word of its inode entry (see Jilesystem (F».
The structure of a directory is given in the include file
lusr/includel sys/dir.h.
By convention, the first two entries in each directory are"dot" (.) and
"dotdot" ( •. ). The first is an entry for the directory itself. The second
is for the parent directory. The meaning of dotdot is modified for the
root directory of the master file system; there is no parent, so dotdot
has the same meaning as dot.
See Also
filesystem(F)

May 16, 1988

Page 1

DUMP (F)

DUMP (F)

Name

dump - Incremental dump tape format.
Description

The dump and restor commands are used to write and read incremental dump magnetic tapes.
The dump tape consists of a header record, some bit mask records, a
group of records describing file system directories, a group of records
describing file system files, and some records describing a second bit
mask.
The header record and the first record of each description have the format described by the structure included by:
#include 

Fields in the dumprestor structure are described below.
NTREC is the number of 512 byte blocks in a physical tape record.
MLEN is the number of bits in a bit map word. MSIZ is the number of

bit map words.
The TS_ entries are used in the c type field to indicate what sort of
header this is. The types and their meanings are as follows:
TS_TYPE

Tape volume label.

TS_INODE

A file or directory follows. The c dinode field is a
copy of the disk inode and contains bits telling what
sort of file this is.

TS_BITS

A bit mask follows. This bit mask has a one-bit for
each inode that was dumped.

TS_ADDR

A subblock to a file (TS INODE). See the description
of c count below.
-

TS _END

End of tape record.

TS_CLRI

A bit mask follows. This bit mask contains a one-bit
for all inodes that were empty on the file system when
dumped.

MAGIC

All header blocks have this number in c_magic.

CHECKSUM

Header blocks checksum to this value.

May 16, 1988

Page 1

DUMP (F)

DUMP (F)

The fields of the header structure are as follows:
c_type

The type of the header.

c date

The date the dump was taken.

c ddate

The date the file system was dumped from.

c volume

The current volume number of the dump.

c_tapea

The current block number of this record. This is counting 512 byte blocks.

c inumber

The number of the inode being dumped if this is of
type TS_INODE.

c_magic

This contains the value MAGIC above, truncated as
needed.

c checksum

This contains whatever value is needed to make the
block sum to CHECKSUM.

c dinode

This is a copy of the inode as it appears on the file system.

c count

This is the count of characters following that describe
the file. A character is zero if the block associated
with that character was not present on the file system,
otherwise the character is nonzero. If the block was
not present on the file system no block was dumped
and it is replaced as a hole in the file. If there is not
sufficient space in this block to describe all of the
blocks in a file, TS_ADDR blocks will be scattered
through the file, each one picking up where the last
left off.

c addr

This is the array of characters that is used as described
above.

Each volume except the last ends with a tapemark (read as an end of
file). The last volume ends with a TS_END block and then the tapemark.
The structure idates describes an entry of the file where dump history
is kept.

See Also
dump(C), restor(C), filesystem(F)

May 16,1988

Page 2

FILESYS (F)

FILESYS (F)

Name
filesys - Default infonnation for mounting filesystems.
Description
letcldefaultlfilesys contains infonnation for mounting filesystems in
the following fonnat:

name=value [name=value] ...
value may contain white spaces if quoted, and newlines may be
escaped with a backslash.
mnt (see mnt(C)) and sysadmin(ADM) use the infonnation in the
letcldefaultlfilesys when the system comes up multiuser. The following names are defined for letcldefaultlfilesys:

bdev

Name of the block interface device.

cdev

Name of the character interface device.

size

Size in blocks.

mountdir

Directory on which the filesystem is mounted.

desc

A description of the filesystem.
"User filesystem."

mountflags

Any flags passed to the monnt(ADM) command.

fsckflags

Any flags passed to the fsck(ADM) command.

rcmount

Whether or not to mount the filesystem when the
system goes multiuser. Can be "yes", "no" or
"prompt". If set to "prompt", you are prompted
when it is time to mount the filesystem.

For example,

See Also
mount(ADM), mnt(C), sysadmin(ADM)

May 16, 1988

Page 1

FIL~·srSll:!.-M

(.1:<)

Name
file system - Fonnat of a system volume.
Syntax
#include 
#include 
#include 
Description
Every file system storage volume (for example, a hard disk) has a
common fonnat for certain vital infonnation. Every such volume is
divided into a certain number of 1024 byte blocks. Block 0 is unused
and is available to contain a bootstrap program or other infonnation.
Block 1 is the super-block. The fonnat of a super-block is described
in lusr/includel sys/filesys.h. In that include file, S isize is the
address of the first data block after the i-list. The i-list starts just after
the super-block in block 2; thus the i-list is s_isize-2 blocks long.
SJsize is the first block not potentially available for allocation to a
file. These numbers are used by the system to check for bad block
numbers. If an "impossible" block number is allocated from the free
list or is freed, a diagnostic is written on the console. Moreover, the
free array is cleared so as to prevent further allocation from a presumably corrupted free list.
The free list for each volume is maintained as follows. The s Jree
array contains, in sJree [1], ... , sJree [s_nfree-1], up to 99 numbers of
free blocks. SJree [0] is the block number of the head of a chain of
blocks constituting the free list. The first short in each free-chain
block is the number (up to 100) of free-block numbers listed in the
next 100 longs of this chain member. The fIrst of these 100 blocks is
the link to the next member of the chain. To allocate a block: decrement s_nfree, and the new block is sJree [s_ nfree ]. If the new block
number is 0, there are no blocks left, so give an error. If s_ nfree
becomes 0, read in the block named by the new block number, replace
s_ nfree by its first word, and copy the block numbers in the next 100
longs into the sJree array. To free a block, check if s_ nfree is 100; if
so, copy s_ nfree and the sJree array into it, write it out, and set
s_ nfree to O. In any event set sJree [s_ nfree] to the freed block's
number and increment s_ nfree.

S_tfree is the total free blocks available in the file system.
S ninode is the number of free i-numbers in the s inode array. To
allocate an inode: if s ninode is greater than 0, decrement it and
return s inode [s ninode]. If it was 0, read the i-list and place the
numberS-of all free inodes (up to 100) into the s_inode array, then try

May 16, 1988

Page 1

FILESYSTEM (F)

FILESYSTEM (F)

again. To free an inode, provided s ninode is less than 100, place its
number into s inode [s ninode] and-increment s ninode. If s ninode
is already 100-:- do not bother to enter the freed Inode into any table.
This list of inodes only speeds up the allocation process. The information about whether the inode is really free is maintained in the inode
itself.
S_tin ode is the total free inodes available in the file system.
SJlock and s_ilock are flags maintained in the core copy of the file
system while it is mounted and their values on disk are immaterial.
The value of sJmod on disk is also immaterial, and is used as a flag to
indicate that the super-block has changed and should be copied to the
disk during the next periodic update of file system information.
S_ronly is a read-only flag to indicate write-protection.
S_time is the last time the super-block of the file system was changed,
and is a double precision representation of the number of seconds that
have elapsed since 00:00 Jan. 1, 1970 (GMT). During a reboot, the
s_time of the super-block for the root file system is used to set the
system's idea of the time.
I-numbers begin at 1, and the storage for inodes begins in block 2.
Also, inodes are 64 bytes long, so 16 of them fit into a block. Therefore, inode i is located in block (i +31 )/16, and begins
64x((i+31) (mod 16» bytes from its start. Inode 1 is reserved for
future use. Inode 2 is reserved for the root directory of the file system,
but no other i-number has a built-in meaning. Each inode represents
one file. For the format of an inode and its flags, see inode(F).
Files

/usr/include/ sys/filsys.h
/usr/include/ sys/stat.h
See Also

fsck(ADM), mkfs(ADM), inode(F)

May 16, 1988

Page 2

FSTAB (F)

FSTAB (F)

Name
fstab - File system mount and check commands.

Description
fstab is an ASCn text file containing infonnation that is passed to the
mount (ADM) and fsck(ADM) commands that are executed from
lete/re. A typical lete/fstab file might look like this:
# device directory
optional flags
/dev/u
lu
fsckflags="-y -D"
/dev/archive
/archive mountflags="-r" fsckflags="-f"

The first column lists the device to be mounted and the second column
gives the mount point (directory) for the device.
The third column lists any optional flags. Optional flags are:
fsckflags
mountflags
prompt

Flags that are passed to fsck.
Flags that are passed to mount.
If set to "y", prompts whether or not to
mount filesystem. Default is "n".

Comment lines start with a number sign (#).

See Also
fsck(ADM), mount(ADM)

May 16, 1988

Page 1

GETTYDEFS (F)

GETTYDEFS (F)

Name
gettydefs - Speed and terminal settings used by getty.
Description
The /etc/gettydefs file contains information used by getty(M) to set up
the speed and terminal settings for a line. It supplies information on
what the login prompt should look like. It also supplies the speed to
try next if the user indicates the current speed is not correct by typing
a BREAK character.
Each entry in /etc/gettydefs has the following format:
label# initial-flags # final-flags # login-prompt #next-label [#
login-program]
Each entry must be followed by a carriage return and a blank line.
The various fields can contain quoted characters of the form \b, \n, \c,
etc., as well as \nnn, where nnn is the octal value of the desired character. The various fields are:
label

Identifies the /etc/gettydefs entry to getty. This could
be a letter or number. The label corresponds to the line

mode field in /etc/ttys. Init passes the line mode as an
argument to getty .
initial-flags

Sets the initial ioetl (S) settings if a terminal type is not
specified to getty. The flags that getty understands are
the same as the ones listed in tty (M). Normally only
the speed flag is required in the initial-flags. Getty
automatically sets the terminal to raw input mode and
takes care of most of the other flags. The initial-flag
settings remain in effect until getty executes login(M).

final-flags

Sets the same values as the initial-flags. These flags
are set just prior to getty executing login-program. The
speed flag is again required. The composite flag SANE
is a composite flag that sets the following termio(M)
parameters:
modes set:
CREAD BRKINT IGNPAR ISTRIP ICRNL IXON
ISIG ICANON ECHO ECHOK OPOST ONLCR
modes cleared:
CLOCAL IGNBRK PARMRK INPCK INLCR IUCLC
IXOFF XCASE ECHOE ECHONL NOFLSH OLCUC
OCRNL ONOCR ONLRET OFILL OFDEL NLDLY
CRDLY TABDLY BSDLY VTDLY FFDLY

May 16, 1988

Page 1

GEITYDEFS (F)

GEITYDEFS (F)

The other two commonly specifiedfinal-jlags are TAB3,
so that tabs are sent to the terminal as spaces, and
HUPCL, so that the line is hung up on the final close.

login-prompt Contains login prompt message that greets users.
Unlike the above fields where white space is ignored (a
space, tab, or new-line), it is included in the loginprompt field. The '@' in the login-prompt field is
expanded to the first line in /etc/systemid (unless the
'@' is preceded by a '\'). Several character sequences
are recognized, including:
\n
Linefeed
\r
Carriage return
\v
Vertical tab
vmn
(3 octal digits) Specify ASCII character
\t
Tab
\f
Form feed
\b
Backspace
next-label

Identifies the next entry in gettydefs for getty to try if
the current one is not successful. Getty tries the next
label if a user presses the BREAK key while attempting
to log in to the system. Groups of entries, for example,
for dial-up lines or for ITY lines, should form a closed
set so that getty cycles back to the original entry if
none of the entries is successful. For instance, 2400
linked to 1200, which in tum is linked to 300, which
finally is linked to 2400.

login-program
The name of the program that actually logs the user
onto XENIX. The default program is /etc/login. If preceded by the keyword AUTO, getty will not prompt for
a username, but instead uses its first argument as the
username and executes the login-program immediately.

If getty is called without a second argument, then the first entry of
/etc/gettydefs is used, thus making the first entry of /etc/gettydefs the
default entry. The first entry is also used if getty can not find the
specified label. If /etc/gettydefs itself is missing, there is one entry
built into the command which will bring up a terminal at 300 baud.
After modifying /etc/gettydefs, run it through getty with the check
option to be sure there are no errors.
Files
/etc/gettydefs

May 16, 1988

Page 2

GEITYDEFS (F)

GEITYDEFS (F)

See Also
stty(C), ioctl(S), getty(M), login(M)

May 16, 1988

Page 3

UKUUP (.F)

GROUP (F)

Name

group - Format of the group file.
Description
group contains the following information for each group:

- Group name
- Encrypted password (optional)
- Numerical group ID
- Comma-separated list of all users allowed in the group
This is an ASCII file. The fields are separated by colons; each group is
separated from the next by a newline. If the password field is null, no
password is demanded.
This file resides in directory Jetc. Because of the encrypted passwords, it can and does have general read permission and can be used,
for example, to map numerical group IDs to names.
Files

/etc/group
See Also

newgrp(C), passwd(C), passwd(F)

May 16,1988

Page 1

INITTAB (F)

INITTAB (F)

Name

inittab - Alternative login tenninals file.
Description

telinit(ADM) reads inittab and converts it into a ttys (F)-fonnat file.
init(M) reads /etc/ttys to detennine for which tenninals logins are
allowed.
Each line in inittab has the fonn:
id:run-Ievels : action :/etc/getty tty mode
id A one- to four-character name that uniquely identifies this line. It
is recommended that if tty is ttyxx that the id then be "xx".
run-levels
A list of digits ranging from 0 to 6. This list specifies which telinit
states are concerned with this line. If the run-levels list is empty,
then it is assumed to be "0123456" (all states).
action
Whether or not logins are allowed on tty :
off

Logins are not allowed in any of the listed run-levels.
respawn
Logins are allowed only in the listed run-levels.

on demand
Identical to "respawn".
tty The filename of a character device special file. Only the filename
is supplied; the path is assumed to be /dev.
mode
A single character supplied as an argument to the getty (M) program. It defines the line characteristics (such as the baud rate) for
the tenninal, and must match one of the names listed in
/etc/gettydefs.
Exactly one space must separate ttys from ... :/etc/getty and from
mode. No other spaces or tabs are allowed.

May 16, 1988

Page 1

INITTAB (F)

INITTAB (F)

Files

/etc/inittab
See Also

disable(C), enable(C), init(M), getty(M), gettydefs(F) , telinit(ADM),
ttys(F)
Notes
inittab is provided for users more familiar with the telinit approach to
terminal administration, as opposed to the standard XENIX
enable (C)/disable (C) approach. It is intended that a full integration of
these two approaches will be provided in a future version of XENIX.

May 16, 1988

Page 2

[NODE (F)

[NODE (F)

Name
inode - Fonnat of an inode.
Syntax
#include 
#include 
Description
An inode for a plain file or directory in a file system has the structure
defined by . For the meaning of the defined types off t
and time_t see types (F).
Files
/usr/inc1ude/ sys/ino.h
See Also
stat(S), filesystem(F), types(F)

May 16, 1988

Page 1

MAPCHAN(F)

MAPCHAN(F)

Name
map chan - Format of tty device mapping files.
Description
mapchan configures the mapping of information input and output of
XENIx.

Each unique channel map requires a mUltiple of 1024 bytes (a lK
buffer) for mapping the input and output of characters. No buffers are
required if no channels are mapped. If control sequences are specified' an additional lK buffer is required.
A method of sharing maps is implemented for channels that have the
same map in place. Each additional, unique map allocates an additional buffer. The maximum number of map buffers available on a
system is configured in the kernel, and is adjustable via the link kit
NEMAP parameter (see config(ADM) and configure (ADM».
Buffers of maps no longer in use are returned for use by other maps.
Example of a Map File
The internal character set used by XENIX is defined by the right
column of the input map, and the first column of the output map in
place on that line. The default internal character set is the 8-bit ISO
8859/1 character set, which is also known as dpANS X3.4.2 and
ISO{fC97/SC2. It supports the Latin alphabet and can represent most
European languages.
Any character value not given is assumed to be a straight mapping,
only the differences are shown in the mapfile. The left hand columns
must be unique. More than one occurrence of any entry is an error.
Right hand column characters can appear more than once. This is
"many to one" mapping. Nulls can be produced with compose
sequences or as part of an output string.
It is recommended that no mapping be enabled on the channel used to
create or modify the mapping files. This prevents any confusion of the
actual values being entered due to mapping. It is also recommended
that numeric rather than character representations be used in most
cases, as these are not likely to be subject to mapping. Use comments
to identify the characters represented. Refer to the ascii (M) manual
page and the hardware reference manual for the device being mapped
for the values to assign.

May 16, 1988

Page 1

lY.l.rU \"-11r11 Y \ 1. . }

#
# sharp/pound/cross-hatch is the comment character
# however, a quoted # ('#') is Ox23, not a comment
#
# beep, input, output, dead, compose and
# control are special keywords and should appear as shown.
#
# sound the bell when errors occur

beep
input

a b
c d
deadp
q r
s t

# p followed by q yields r.
# p followed by s yields t.

dead u
vw
compose x

# u followed by v yields w.

# x is the compose key (only one allowed).

yzA
BCD

# x followed by B and C yields D.

output
ef
g h

i j

kim n

control
input
E 1

0

# e is mapped to f.
# g is mapped to hij - one to many.
# k is mapped to lmno.
# The control sections must be last
# The character E is followed by 1 more
unmapped character

output
FG

2

# The characters FG are followed by 2
more unmapped characters

All of the single letters above preceding the "control" section must
be in one of these formats:

56
045
Oxfa
'b'

'\076'
'\x4a'

# decimal
# octal
# hexadecimal
# quoted char
# quoted octal
# quoted hex

All of the above formats are translated to single byte values.
The control sections (which must be the last in the file) contain
specifications of character sequences which should be passed through
to or from the terminal device without going through the normal mapchan processing. These specifications consist of two parts: a fixed
May 16,1988

Page 2

MAPCHAN(F)

MAPCHAN(F)

sequence of one or more defined characters indicating the start of a
no-map sequence, followed by a number of characters of which the
actual values are unspecified.
To illustrate this, consider a cursor-control sequence which should be
passed directly to the terminal without being mapped. Such a
sequence would typically begin with a fixed escape sequence instructing the terminal to intetpret the following two characters as a cursor
position; the values of the following two characters are variable, and
depend on the cursor position requested. Such a control sequence
would be specified as:
\E=

2

# Cursor control: escape =  

There are two subsections under control: the input section is used to
filter data sent from the terminal to XENIX, and the output section is
used to filter data sent from XENIX to the terminal. The two fields in
each control sequence are separated by white space, that is the SPACE
or TAB characters. Also the '#' (HASH) character introduces a comment, causing the remainder of the line to be ignored. Therefore, if
any of these three characters are required in the specification itself,
they should be entered using one of alternative means of entering
characters, as follows:
"x The character produced by the terminal on pressing the CONTROL

and x keys together.
\E or\e

The ESCAPE character, octal 033.
\c Where c is one of b, f, 1, n, r or t, produces BACKSPACE, FORM
FEED, LINE FEED, NEWLINE, CARRIAGE RETURN or TAB characters respectively.

\0 Since the NULL character can not be represented, this sequence is
stored as the character with octal value 0200, which behaves as a
NULL on most terminals.

'vzn or'vznn
Specifies the octal value of the character directly.
\

followed by any other character is intetpreted as that character.
This can be used to enter SPACE, TAB , or HASH characters.

Diagnostics
mapcban performs these error checks when processing the mapfile:

More than one compose key. Characters mapped to more than one
thing. Syntax errors in the byte values. Missing input or output keywords. Dead or compose keys also occurring in the input section.

May 16,1988

Page 3

MAPCHAN(F)

MAPCHAN(F)

Extra information on a line. Mapping a character to null. Starting an
output control sequence with a character that is already mapped.
If characters are displayed as the 7-bit value instead of the 8-bit value,
use stty -a to verify that -istrip is set. Make sure input is mapping to
the 8859 character set, output is mapping from the 8859 to the device
display character set. dead and compose sequences are input mapping and should be going to 8859.

Files
/etc/default/mapchan
/usr/lib/mapchan/*

See Also
ascii(M), keyboard(HW), Ip(C), Ipadmin(ADM), mapchan(M),
trchan(M), mapkey(M), parallel(HW), screen(HW), serial(HW),
setkey(M), tty(M)

Notes
Some non-U.S. keyboards and display devices do not support characters commonly used by XENIX command shells and the C programming language. Do not attempt to use such devices for system
administration tasks.
Not all terminals or printers can display all the characters that can be
represented using this utility. Refer to the device's hardware manual
for information on the capabilities of the peripheral device.

Warnings
Use of mapping files that specify a different "internal" character set
per-channel, or a set other than the 8-bit ISO 8859 set supplied by
default can cause strange side effects. It is especially important to
retain the 7-bit ASCII portion of the character set (see ascii (M)).
XENIX utilities and applications assume these values. Media transported between machines with different internal code set mappings
may not be portable as no mapping is performed on block devices,
such as tape and floppy drives. trchan can be used to "translate" from
one internal character set to another.
Do not set ISTRIP (see stty(C)) on channels that have mapping that
includes eight bit characters.

May 16, 1988

Page 4

MASTER (F)

MASTER (F)
Name
master - Master device information table.
Description

master contains device information used by config (ADM) to generate
the configuration files. The file consists of 5 parts, each separated by
a line with a dollar sign ($) in column 1.
- Part 1 contains
- Part 2 contains
- Part 3 contains
- Part 4 contains
- Part 5 contains

device information.
the line discipline table.
names of devices that have aliases.
tunable parameter information.
the event devices table.

Any line with an asterisk (*) in column 1 is treated as a comment.
Part 1
This part contains definitions for the system devices. Each line has 14
fields with the fields delimited by tabs and/or blanks:
Field 1:
Field 2:
Field 3:

Device name (8 chars. maximum).
Number of interrupt vectors.
Device mask (octal). Each "on" bit indicates that
the driver has the corresponding handler or structure:
002000 Process swtch( ) time routine.
001000 streamtab structure.
000400 tty structure.
000200 Halt routine.
000100 Initialization handler.
000040 Clock time poll routine.
000020 Open handler.
000010 Close handler.
000004 Read handler.
000002 Write handler.
000001 loctl handler.
The clock time poll routine, if present in the driver, is called every
clock tick in which the· clock interrupted task-time processing.
If the streamtab bit is on, the device is a stream module with an
fmodsw entry, unless the character special bit is set in the type
indicator (Field 4). If this is the case, the device is a stream end
driver with a cdevsw entry.
Field 4:
Device type indicator (octal):
000200 Not used
000100 No qswtch on interrupt.
000040 Not used.

May 16, 1988

Page 1

MASTER (F)

MASTER (F)

000020 Required device.
000010 Block device.
000004 Character device.
000002 Not used.
000001 Not used.
Field 5:
Handler prefix (4 chars. maximum). Usually same
as Field 1. The routines of dev.c should begin dev ...
The tty structure of dev.c should be named dev_tty.
Field 6:
Not used.
Field 7:
Major device number for block-type device.
Field 8:
Major device number for character-type device.
Field 9:
Maximum number of devices per controller.
The spllevel(1 - 7) at which the device's interrupt
Field 10:
routine should be called.
Fields 11-14: Maximum of four interrupt vector addresses (octal).
Each address is followed by a unique letter or a
blank.
Devices that are not interrupt-driven have an interrupt vector size of
zero. Devices that generate interrupts but are not of the standard character or block device mold, should be specified with a type (field 4)
which has neither the block nor character bits set.

Part 2
This part contains definitions for the system line discipline. Each line
has 9 fields. Each field is a maximum of 8 characters delimited by a
blank if less than 8:
Field 1:
Field 2:
Field 3:
Field 4:
Field 5:
Field 6:
Field 7:
Field 8:
Field 9:

Device associated with this line.
Open routine.
Close routine.
Read routine.
Write routine.
Ioct! routine.
Receiver interrupt routine.
Transmitter interrupt routine.
Modem control interrupt routine.

Part 3
This part contains definitions for device aliases. Each line has 2
fields:
Field 1:
Field 2:

Alias name of device (8 chars. maximum).
Reference name of device as given in part 1 (8
chars. maximum).

May 16,1988

Page 2

MASTER (F)

MASTER (F)

Aliases may be used in place of actual device names when creating
the config(ADM) description file.

Part 4
This part contains the names and default values for tunable parameters. Each line has 2 or 3 fields:
Field 1:
Field 2:
Field 3:

Parameter name to be used in the config(ADM)
description file (20 chars. maximum).
Parameter name as it will appear in the resulting c.c
file (20 chars. maximum).
Default parameter value (20 chars. maximum).

If a parameter has no default value, an explicit specification for the
parameter must be given in the description file. See config(ADM) for
a list of the tunable parameters.

PartS
This part contains device names and handler routines for all devices
used to generate events.

See Also
config(ADM), configure(ADM)

May 16, 1988

Page 3

MEM(F)

MEM(F)

Name

mem, kmem - Memory image file.
Description

The mem file provides access to the computer's physical memory.
All byte addresses in the file are interpreted as memory addresses.
Thus, memory locations can be examined in the same way as individual bytes in a file. Note that accessing a nonexistent location causes
an error.
The kmem file is the same as mem except that it corresponds to kernel virtual memory rather than physical memory.
In rare cases, the mem and kmem files may be used to write to

memory and memory-mapped devices. Such patching is not intended
for the naive user and may lead to a system crash if not conducted
properly. Patching device registers is likely to lead to unexpected
results if the device has read-only or write-only bits.
Files

Idev/mem
Idev/kmem

May 16, 1988

Page 1

MICNET(F)

MICNET(F)

Name

micnet - The Micnet default commands file.
Description

The mienet file lists the system commands that may be executed
through the remote command. The file is required for each system in
a Micnet network. Whenever a remote command is received through
the network, the Micnet programs search the mienet file for the system command specified with the remote command. If found, the command is executed. Otherwise, the command is ignored and an error
message is returned to the system which issued the remote command.
The file may contain one or more lines. If all commands may be executed, only the line
executeall
is required in the file. Otherwise, the commands must be listed individually. A line that defines an individual command has the form:
command=commandpath
Command is the command name to be specified in a remote command.
Command path is the full pathname of the command on the specified
system. The equal sign (=) separates the command and commandpath.
For example, the line:

cat=/bin/ cat
defines the command name cat (used in the remote command) to refer
to the system command cat in the Ibin directory.
When executeall is set, commands are sought in a series of default
directories. Initially, the directories are Ibin and lusr/bin. The
default directories can be explicitly defined in the file by including a
line of the form:
execpath=P ATH=directory[:directory] ...

May 16,1988

Page 1

MICNET(F)

MICNET(F)

The first part of the line, execpath=PATH=, is required. Each directory must be a valid pathname. The colon is required to separate
directories. For example, the line:
execpath=P ATH=/bin:/usr/bin:/usr/bobf/bin
sets the default directories to /bin, lusr/bin, and lusr/bobf/bin.
Files
/etc/default/micnet
See Also
aliases(M), netutil(ADM), systemid(F), top(F)
Notes
The rcp command cannot be executed from a remote system unless
the micnet file contains either executeall , or the line
rcp=/usr/bin/rcp

May 16, 1988

Page 2

MNITAB (F)

MNITAB (F)

Name
mnttab - Format of mounted file system table.
Syntax
#include 
#include 
Description
The letc/mnttab file contains a table of devices mounted by the
mount(ADM) command.
Each table entry contains the pathname of the directory on which the
device is mounted, the name of the device special file, the read/write
permissions of the special file, and the date on which the device was
mounted.
The maximum number of entries in mnttab is based on the system
parameter NMOUNT located in lusrlsys/conf/space.c, which defines
the number of allowable mounted special files.
See Also
mount(ADM)

May 16, 1988

Page 1

NULL (F)

NULL (F)

Name
null - The null file.

Description
Data written on a null special file is discarded.
Reads from a null special file always return 0 bytes.

Files
/dev/null

May 16, 1988

Page 1

PASSWD (F)

PASSWD (F)

Name
passwd - The password file.
Description
Passwd contains the following information for each user:

-Login name
-Encrypted password
-Numerical user ID
-Numerical group ID
-Comment
-Initial working directory
-Program to use as shell
Refer to [inger(C) for information in the required format of the comment field for [inger(C) to display the information. Each user is
separated from the next by a newline. If the password field is nUll, no
password is demanded; if the shell field is null, sh(C) is used.
This file resides in the directory fetc. Because the passwords are
encrypted, the file has general read permission and can be used, for
example, to map numerical user IDs to names.
The encrypted password consists of 13 characters chosen from a 64character alphabet (., f, 0-9, A-Z, a-z), except when the password is
nUll, in which case the encrypted password is also null. Password
aging is in effect for a particular user if his encrypted password in the
password file is followed by a comma and a nonnull string of characters from the above alphabet. (Such a string must be introduced by the
super-user.) The first character of the age denotes the maximum
number of weeks for which a password is valid. A user who attePlpts
to log in after his password has expired will be forced to supply anew
one. The next character denotes the minimum period in weeks which
must expire before the password may be changed. The remaining characters define the week (counted from the beginning of 1970) when the
password was last changed. (A null string is equivalent to zero.) The
first and second characters must have numerical values in the range
0-63, where the dot (.) is equal to 0 and lowercase z is equal to 63. If
the numerical value of both characters is 0, the user will be forced to
change his password the next time he logs in. If the second character
is greater than the first, only the super-user will be able to change the
password.

May 16,1988

Page 1

PASSWD (.F)

PASSWD (F)

Files
/etc/passwd
See Also
login(M),
passwd(C),
pwadmin(ADM).

May 16, 1988

a641(S),

getpwent(S),

group(F),

Page 2

SCCSFlLE (F)

SCCSFILE (F)

Name
sccsfile - Fonnat of an sees file.
Description
An sees file is an AseII file. It consists of six logical parts: the
checksum, the delta table (contains infonnation about each delta),
user names (contains login names and/or numerical group IDs of users
who may add deltas),flags (contains definitions of internal keywords),
comments (contains arbitrary descriptive infonnation about the file),
and the body (contains the actual text lines intennixed with control
lines). Each logical part of an sees file is described in detail below.
Throughout an sees file there are lines which begin with the ASeII
SOH (start of heading) character (octal 001). This character is
hereafter referred to as the control character and will be represented
graphically as @. Any line described below which is not depicted as
beginning with the control character is prevented from beginning with
the control character. Entries of the fonn DDDDD represent a five
digit string (a number between 00000 and 99999).
Checksum

The checksum is the first line of an sees file. The fonn of the line is:
@hDDDDD
The value of the checksum is the sum of all characters, except those of
the first line. The @hRprovides a magic number of (octal) 064001.
Delta Table

The delta table consists of a variable number of entries of the fonn:
@s DDDDD/DDDDD/DDDDD
@d   yr/mo/da hr:mi:se  DDDDD DDDDD
@iDDDDD •.•
@xDDDDD .••
@gDDDDD ••.
@m 
@c  .••
@e

May 16,1988

Page 1

SCCSFILE (F)

SCCSFILE (F)

The fIrst line
(@s) contains the number of lines
inserted/deleted/unchanged respectively. The second line (@d) contains the type of the delta (currently, normal: D, and removed: R), the
sees ID of the delta, the date and time of creation of the delta, the
login name corresponding to the real user ID at the time the delta was
created, and the serial numbers of the delta and its predecessor,
respectively.
The @i, @x, and @g lines contain the serial numbers of deltas
included, excluded, and ignored, respectively. These lines are
optional.
The @m lines (optional) each contain one MR number associated with
the delta; the @c lines contain comments associated with the delta.
The @e line ends the delta table entry.
User Names

The list of login names and/or numerical group IDs of users who may
add deltas to the file, separated by new-lines. The lines .containing
these login names and/or numerical group IDs are surrounded by the
bracketing lines @u and @U. An empty list allows anyone to make a
delta.
Flags

Keywords used internally (see admin(CP) for more information on
their use). Each flag line takes the form:
@f



The following flags are defined:
@ft
@f v
@fi
@fb
@fm
@ff
@f c
@fd
@fn
@fj
@fl
@f q










The t flag defines the replacement for the identification keyword.
The v flag controls prompting for MR numbers in addition to comments; if the optional text is present it defmes an MR number validity

May 16,1988

Page 2

SCCSFILE (F)

SCCSFILE (F)

checking program. The i flag controls the warning/error aspect of the
"No id keywords" message. When the i flag is not present, this message is only a warning; when the i flag is present, this message will
cause a "fatal" error (the file will not be gotten, or the delta will not
be made). When the b flag is present the -b option may be used with
the get command to cause a branch in the delta tree. The m flag
defines the first choice for the replacement text of the sccsfile.F identification keyword. The f flag defines the "floor" release; the release
below which no deltas may be added. The c flag defines the "ceiling" release; the release above which no deltas may be added. The d
flag defines the default SID to be used when none is specified on a get
command. The n flag causes delta to insert a "null" delta (a delta
that applies no changes) in those releases that are skipped when a
delta is made in a new release (e.g., when delta 5.1 is made after delta
2.7, releases 3 and 4 are skipped). The absence of the n flag causes
skipped releases to be completely empty. The j flag causes get to
allow concurrent edits of the same base SID. The I flag defines a list
of releases that are locked against editing (get(CP) with the -e option).
The q flag defines the replacement for the identification keyword.
Comments

Arbitrary text surrounded by the bracketing lines @t and @T. The
comments section typically contains a description of the file's purpose.
Body

The body consists of text lines and control lines. Text lines don't
begin with the control character, control lines do. There are three
kinds of control lines: insert, delete, and end, as follows:
@IDDDDD
@DDDDDD
@EDDDDD

The digit string (DDDDD) is the serial number corresponding to the
delta for the control line.
See Also

admin(CP), delta(CP), get(CP), prs(CP)
XENIX Programmer's Guide

May 16,1988

Page 3

STAT (F)

STAT (F)
Name
stat - Data returned by stat system call.
Syntax
#include 
Description

The sys/stat.h include file contains the definition for the structure
returned by the stat andfstat functions. The structure is defined as:
struct stat {
dev_t

sCdev;

/*

ino_t
ushort
short
ushort
ushort
dev_t

sCino;
sh_mode;
sCnlink;
sCuid;
sCgid;
sCrdev;

/* inode number */
/* file mode */
/* # of links */
/* owner uid */
/* owner gid */
/*

off_t
time_t
time_t
time_t

sCsize;
sCatime;
sCmtime;
sCctime;

/* file size in bytes */
/* time of last access */
/* time of last data modification */
/* time of last file status 'change' */

};
Note that the st atime, st mtime, and st ctime values are measured in
seconds since 00:00:00 (GMT) on January 1, 1970.
The st_ mode value is actually a combination of one or more of the following file mode values:
S_IFMT
0170000
/* type of file */
S_IFDIR
0040000 /* directory */
S_IFCfUR
0020000 /* character special */
S_IFBLK
0060000 /* block special */
S_IFREG
0100000 /* regular */
S_IFIFO
0010000 /* fifo */
S_IFNAM
0050000 /* name special entry */
S_INSEM
01
/* semaphore */
S_INSHD
02
/* shared memory */
S_ISUID
04000
/* set user id on execution */

May 16, 1988

Page 1

STAT (F)

STAT (F)
S_IGUID
S_ISVTX
S_IREAD
S_IWRITE
S_IEXEC

02000
01000
00400
00200
00100

/* set group id on execution

*/

/* save swapped text even after use */
/* read permission, owner */
/* write permission, owner */

/* execute/search permission, owner */

Files
jusr/include/sys/stat.h

See Also
stateS)

May 16, 1988

Page 2

SYSTEMID (F)

SYSTEMID (F)

Name

systemid - The Micnet system identification file.
Description

The systemid file contains the machine and site names for a system in
a Micnet network. A machine name identifies a system and distinguishes it from other systems in the same network. A site name identifies the network to which a system belongs and distinguishes the network from other networks in the same chain.
The systemid file may contain a site name and up to four different
machine names. The file has the form:
[site-name]
[machine-name I]
[machine-name2]
[machine-name 3]
[machine-name4]
The file must contain at least one machine name. The other machine
names are optional, serving as alternate names for the same machine.
The file must contain a site name if more than one machine name is
given or if the network is connected to another through a uucp link.
The site name, when given, must be on the first line.
Each name can have up to eight letters and numbers but must always
begin with a letter. There is never more than one name to a line. A
line beginning with a pound sign (#) is considered a comment line and
is ignored.
The Micnet network requires one systemid file on each system in a
network with each file containing a unique set of machine names. If
the network is connected to another network through a uucp link, each
file in the network must contain the same site name.
The systemid file is used primarily during resolution of aliases. When
aliases contain site and/or machine names, the name is compared with
the names in the file and removed if there is a match. If there is no
match, the alias (and associated message, file, or command) is passed
on to the specified site or machine for further processing.

May 16, 1988

Page 1

SYSTEMID (F)

SYSTEMID (F)

Files
letc/systemid

See Also
aliases(M), netutil(ADM), top(F)

May 16, 1988

Page 2

TAR (F)

TAR (F)

Name
tar - archive format
Description
The command tar(C) dumps files to and extracts files from backup
media or the hard disk.
Each file is archived in contiguous blocks, the first block being occupied by a header, whose format is given below, and the subsequent
blocks of the files occupying the following blocks. All headers and
file data start on 512 byte block boundaries and any spare unused
space is padded with garbage. The format of a header block is as follows:
#define TBLOCK 512
#define NBLOCK 20
#define NAMSIZ 100
union hblock {
char dummy[TBLOCK];
struct header {
char name [NAMSIZ] ;
char mode[8];
char uid[8];
char gid[8];
char size[12];
char mtime[12];
char chksum[8];
char linkflag;
char linkname[NAMSIZ];
char extno[4];
char extotal[4];
char efsize[12];
} dbuf;
} dblock;
The name entry is the path name of the file when archived. If the pathname starts with a zero word, the entry is empty. It is at most 100
bytes long and ends in a null byte. Mode, uid, gid, size, and time
modified are the same as described under i-nodes (refer to
filesystem (F». The checksum entry has a value such that the sum of
the words of the directory entry is zero.
If the entry corresponds to a link, then linkname contains the pathname of the file to which this entry is linked and linkflag gives a count
of the links. No data is put in the archive file.

See Also
filesystem(F), tar(C)

May 16,1988

Page 1

TERM (F)

TERM (F)

Name
tenn - Tenninal driving tables for moff.
Description

nroff(CT) uses driving tables to customize its output for various types
of output devices, such as printing tenninals, special word-processing
printers (such as Diablo, Qume, or NEC Spinwriter mechanisms), or
special output filter programs. These driving tables are written as C
programs, compiled, and installed in /usr/lib/term/tabname, where
name is the name for that tenninal type as shown in term(CT).
The structure of the tables is as follows. Sizes are in 240ths of an
inch.
#define

INCH

240

struct tenntable tlp ; {\* lp is the name of the term, *\
int bset;
\* modify with new name, such as tnew *\
int breset;
int Hor;
int Vert;
int Newline;
int Char;
int Em;
int Halfline;
int Adj;
char *twinit;
char *twrest;
char *twnl;
char *hlr;
char *hlf;
char *flr;
char *bdon;
char *bdoff;
char *iton;
char *itoff;
char *ploton;
char *plotoff;
char *up;
char *down;
char *right;
char *left;
char *codetab[256-32];
char *zzz;
};

The meanings of the various fields are as follows:

May 16, 1988

Page 1

TERM (F)

TERM (F)

bset

bits to set in termio.c oflag see tty(M) and termio(M».
after output.
-

breset

bits to reset in termio.c_oflag before output.

Hor

horizontal resolution in fractions of an inch.

Vert

vertical resolution in fractions of an inch.

Newline

space moved by a newline (linefeed) character in fractions of an inch.

Char

quantum of character sizes, in fractions of an inch. (i.e.,
characters are multiples of Char units wide. See codetab
below.)

Em

size of an em in fractions of an inch.

Halfline

space moved by a half-linefeed (or half-reverse-linefeed)
character in fractions of an inch.

Adj

quantum of white space for margin adjustment in the
absence of the -e option, in fractions of an inch. (i.e.,
white spaces are a mUltiple of Adj units wide)
Note: if this is less than the size of the space character (in
units of Char; see below for how the sizes of characters
are defined), nroff will output fractional spaces using plot
mode. Also, if the -e switch to nroff is used, Adj is set
equal to Hor by nroff.

twin it

set of characters used to initialize the terminal in a mode
suitable for nroff.

twrest

set of characters used to restore the terminal to normal
mode.

twnl

set of characters used to move down one line.

hlr

set of characters used to move up one-half line.

hlf

set of characters used to move down one-half line.

fir

set of characters used to move up one line.

bdon

set of characters used to tum on hardware boldface mode,
if any. Nroff assumes that boldface mode is reset
automatically by the twnl string, because many letterquality printers reset the boldface mode when they
receive a carriage return; the twnl string should include
whatever characters are necessary to reset the boldface
mode.

May 16, 1988

Page 2

TERM (F)

TERM (F)
bdoff

set of characters used to tum off hardware boldface mode,
if any.

iton

set of characters used to tum on hardware italics mode, if
any.

itoff

set of characters used to tum off hardware italics mode, if
any.

ploton

set of characters used to tum on hardware plot mode (for
Diablo-type mechanisms), if any.

plotoff

set of characters used to tum off hardware plot mode (for
Diablo-type mechanisms), if any.

up

set of characters used to move up one resolution unit
(Vert) in plot mode, if any.

down

set of characters used to move down one resolution unit
(Vert) in plot mode, if any.

right

set of characters used to move right one resolution unit
(Hor) in plot mode, if any.

left

set of characters used to move left one resolution unit
(Hor) in plot mode, if any.

codetab

Array of sequences to print individual characters. Order
is
nrojJ's
internal
ordering.
See
the
file
losr/lib/term/taboser.c for the exact order.

zzz

a zero terminator at the end.

The code tab sequences each begin with a flag byte. The top bit indicates whether the sequence should be underlined in the .01 font. The
rest of the byte is the width of the sequence in units of Char.
The remainder of each code tab sequence is a sequence of characters
to be output. Characters with the top bit off are output as given; characters with the top bit on indicate escape into plot mode. When such
an escape character is encountered, nroff shifts into plot mode, emitting ploton, and skips to the next character if the escape character was
'\200'.
When in plot mode, characters with the top bit off are output as given.
A character with the top bit on indicates a motion. The next bit indicates coordinate, with 1 being vertical and 0 being horizontal. The
next bit indicates direction, with 1 meaning up or left. The remaining
five bits give the amount of the motion. An amount of zero causes exit
from plot mode.

May 16, 1988

Page 3

TERM (F)

TERM (F)

When plot mode is exited, either at the end of the string or via the
amount-zero exit, plotoffis emitted followed by a blank.
All quantities which are in units of fractions of an inch should be
expressed as INCH*num/denom, where num and ,denom are respectively the numerator and denominator of the fraction; that is, 1/48 of
an inch would be written as "INCH/48".
If any sequence of characters does not pertain to the output device,
that sequence should be given as a null string.

The XENIX Development System must be installed on the computer to
create a new driving table. The source code for a generic output device is in the file /usr/lib/term/tabuser.c Copy this file and make the
necessary modifications, including the name of the term table struct.
Refer to the hardware manual for the codes needed for the output device (terminal, printer, etc.). Name the file according to the convention
explained in term(CT). The makefile, /usr/lib/term/makefile, should
be updated to include the source file to the new driving table. When
the files are prepared, enter the command :
make
(See make(CP». The source to the new driving table is linked with the
object file mkterm.o, and the new driving table is created and installed in
the proper directory.

FILES
iusr/lib/term/tabname driving tables
/usr/lib/term/tabuser.c generic source for driving tables
/usr/lib/term/makefile make file for creating driving tables
/usr/lib/term/mkterms.olinkable object file for creating driving tables

SEE ALSO
nroff(CT), term(CT).
Notes
The XENIX Development System must be installed on the computer
to create new driving tables.
Not all XENIX facilities support all of these options.

May 16, 1988

Page 4

TERMINFO ( F )

TERMINFO( F)

Name
term info - Format of compiled terminfo file.
Description
Compiled term info descriptions are placed under the directory
lusr/lib/terminfo. In order to avoid a linear search of a huge XENIX
system
directory,
a
two-level
scheme
is
used:
lusr/lib/terminfol c/name where name is the name of the terminal,
and e is the first character of name. Thus, aet4 can be found in the file
lusr/lib/terminfol a/act4. Synonyms for the same terminal are implemented by multiple links to the same compiled file.
The format has been chosen so that it will be the same on all
hardware. An 8- or more-bit byte is assumed, but no assumptions
about byte ordering or sign extension are made.
The compiled file is created with the tie(C) program, and read by the
routine setupterm in terminfo(S). The file is divided into six parts:
the header, terminal names, boolean flags, numbers, strings, and string
table.
The header section begins the file. This section contains six short
integers in the format described below. These integers are (1) the
magic number (octal 0432); (2) the size, in bytes, of the names section; (3) the number of bytes in the boolean section; (4) the number of
short integers in the numbers section; (5) the number of offsets (short
integers) in the strings section; (6) the size, in bytes, of the string
table.
Short integers are stored in two 8-bit bytes. The first byte contains the
least significant 8 bits of the value, and the second byte contains the
most significant 8 bits. (Thus, the value represented is
256*second+first.) The value -1 is represented by 0377,0377; other
negative values are illegal. The -1 generally means that a capability is
missing from this terminal. Note that this format corresponds to the
hardware of the VAX and PDP-II. Machines in which this does not
correspond to the hardware read the integers as two bytes and compute
the result.
The terminal names section comes next. It contains the first line of
the term info description, listing the various names for the terminal,
separated by the 'I' character. The section is terminated with an
ASCII NUL character.
The boolean flags have one byte for each flag. This byte is either 0 or
1, as the flag is present or absent. The capabilities are in the same
order as the file .

May 16, 1988

Page 1

TERMINFO ( F )

TERMINFO(F)

Between the boolean section and the number section, a null byte will
be inserted, if necessary, to ensure that the number section begins on
an even byte. All short integers are aligned on a short-word boundary.
The numbers section is similar to the flags section. Each capability
takes up two bytes, and is stored as a short integer. If the value
represented is -1, the capability is taken to be missing.
The strings section is also similar. Each capability is stored as a short
integer, in the format above. A value of -1 means the capability is
missing. Otherwise, the value is taken as an offset from the beginning
of the string table. Special characters in AX or \c notation are stored in
their interpreted form, not the printing representation. Padding information $ and parameter information %x are stored intact in uninterpreted form.
The final section is the string table. It contains all the values of string
capabilities referenced in the string section. Each string is nullterminated.
Note that it is possible for setupterm to expect a different set of capabilities than are actually present in the file. Either the database may
have been updated since setup term was recompiled (resulting in extra
unrecognized entries in the file) or the program may have been recompiled more recently than the database was updated (resulting in missing entries). The routine setupterm must be prepared for both possibilities; this is why the numbers and sizes are included. Also, new capabilities must always be added at the end of the lists of boolean,
number, and string capabilities.

May 16, 1988

Page 2

TERMINFO ( F)

TERMINFO (F)

As an example, an octal dump of the description for the Microterm
ACT 4 is included:

microtermlact41microterm act iv,
cr=~M,

cudl=~J,

ind=~J,

bel=~G,

am,

cubl=~H,

, el=~~, clear=~L, cup=~T%pl%c%p2%c,
cols#80, lines#24, cufl=~X, cuul=~Z, home=~J,
ed=~

000
020
040
060
100
120
140
160
200

032 001
0
t
t
e
\0 \0
\0 \0
377 377
\b \0
377 377
377 377

\0 025
e

r

r

rn

\0

\0
\0
377
377
377
377

p

377
377
377
377

rn

\0
377
\0
377
034
377

\0
I
a
\0
377
\0
377
\0
377

\b \0 212 \0
" \0 rn
a
c
t
4
rn
i
i
v \0 \0
c
t
\0 \0 \0 \0 \0 \0 \0
030 \0 377 377 377 377 377
002 \0 377 377 377 377 004
\n \0 026 \0 030\0 377
377 377 036 \0 377 377 377
377 377 377 377 377 377 377

i

c
001
\0
377
\0
377
377
377

c

r

r

0

\0 \0
\0 \0
377 377
006 \0
032 \0
377 377
377 377

*
520 377 377 377 377
\0 377 377 377 377 377 377 377 377 377 377
540 377 377 377 377 377 377 007 \0 \r \0 \f \0 036 \0 037 \0
560 024
% P
1
% c
% P
2
% c \0 \n \0 035 \0
600 \b \0 030 \0 032 \0 \n \0

Some limitations: the total size of a compiled description cannot
exceed 4096 bytes; the name field cannot exceed 128 bytes.

Files
/usr/lib/terminfo/* /*

compiled terminal capability data base

See Also
terminfo(M), terminfo(S), tic(C)

May 16, 1988

Page 3

TOP (F)

TOP (F)

Name

top, top.next - The Micnet topology files.
Description

These files contain the topology infonnation for a Micnet network.
The topology infonnation describes how the individual systems in the
network are connected, and what path a message must take from one
system to reach another. Each file contains one or more lines of text.
Each line of text defines a connection or a communication path.
The top file defines connections between systems. Each line lists the
machine names of the connected systems, the serial lines used to make
the connection, and the speed (baud rate) of transmission between the
systems. Each line has the following fonnat:
machine 1 tty 1a machine2 tty2a speed
machine] and machine2a are the machine names of the respective systems (as given in the systemid files). The ttys are the device names
(e.g., ttyla) of the connecting serial lines. The speed must be an
acceptable baud rate (e.g., 110,300, ... , 19200).

The top.next file contains infonnation about how to reach a particular
system from a given system. There may be several lines for each system in the network. Each line lists the machine name of a system, followed by the machine name of a system connected to it, followed by
the machine names of all the systems that may be reached by going
through the second system. Such a line has the fonn:
machine 1 machine2 machine3 [machine4] ...
The machine names must be the names of the respective systems (as
given by the first machine name in the systemid files).
The top.next file must be present even if there are only two computers
in the network. In such a case, the file must be empty.
In the top and top.next files, any line beginning with a number sign
(#) is considered a comment, and is ignored.

Files

/usr/lib/mail/top
/usr/lib/mail/top.next

May 16, 1988

Page 1

TOP (F)

TOP (F)

See Also
aliases(M), netutil(ADM), systemid(F), top(F)

May 16, 1988

Page 2

ITYS (F)

TITS (F)

Name
ttys - Login tenninals file.

Description
The /etc/ttys file contains a list of the device special files associated
with possible login tenninals, and defines which files are to be opened
by the init(M) program on system start-up.
The file contains one or more entries of the fonn

state mode name
The name must be the filename of a device special file. Only the
filename may be supplied, the path is assumed to be /dev. If state is
"1", the file is enabled for logins; if "0", the file is disabled. The
mode is used as an argument to the getty (M) program. It defines the
line speed and type of device associated with the tenninal. A list of
arguments is provided in getty (M).
For example, the entry "lmtty02" means the serial line tty02 is to be
opened for logging in at 9600 baud.
Files
/etc/ttys

See Also
disable(C), enable(C), getty(M), init(M), terminal(HW), tenninals(M),
tty(M)
Notes
The /etc/ttys file should only be edited when the system is in system
maintenance mode. If it is edited when the system is in multi-user
mode, the changes will not take effect until signal 2 is sent to init or
an enable or disable command is given. (Enter the following command as root to send signal 2 to init: kill -2 1.) Rebooting the system
will also cause the changes to take effect. See the XENIX System
Administrator's Guide.

May 16,1988

Page 1

TYPES (F)

TYPES (F)

Name
types - Primitive system data types.

Syntax
#include 
Description
The data types defined in the include file  are used in
XENIX system code; some data of these types are accessible to user
code.
The fonn daddr t is used for disk addresses except in an inode on
disk, see filesysiem (F). Times are encoded in seconds since 00:00:00
GMT, January 1, 1970. The major and minor parts of a device code
specify kind and unit number of a device and are installationdependent. Offsets are measured in bytes from the beginning of a file.
The label_t variables are used to save the processor state while
another process is running.

See Also
filesystem(F)

May 16,1988

Page 1

UTMP (F)

U .llY.ll

\.L.)

Name
utmp, wtmp - Formats of utmp and wtmp entries.

Syntax
#include 
#include 
Description
These files, which hold user and accounting information for such commands as who(C), write(C), and iogin(M), have the following structure as defined by :
#define
#define
#define

UTMP]ILE
WTMP_FILE

ut_name

struct utmp {
char
char
char
short
short
struct
short
short
} ucexit;

"/etc/utmp"
" /etc/wtmp"
ucuser

ucuser[8];
uUd[4];
uUine[12];
uCpid;
uuype;
exicstatus {
e_termination;

/* User login name */
/* usually line # */
/* device name (console, lnxx) */
/* process id */
/* type of entry */

/* Process termination status */
/* Process exit status */
/* The exit status of a process
marked as DEAD_PROCESS. */

uCtime;

/* time entry was made */

};

/* Definitions for uctype */
#define EMPTY
o
#define RUN_LVL
#define BOOT_TIME
2
#define OLD_TIME
3
#define NEW_TIME
4
#define INIT_PROCESS
5 /* Process spawned by "init" */
#define LOGIN_PROCESS
6 /* A "getty" process waiting for login */
#define USER_PROCESS
7 /* A user process */
#define DEAD_PROCESS
8
#define ACCOUNTING
9
#define UTMAXTYPE ACCOUNTING /* Largest legal value of uCtype */

/*
/*
/*
/*

Special strings or formats used in the "uCline" field when */
accounting for something other than a process */
No string for the uCline field can be more than 11 chars + */
a NULL in length */
#define RUNLVL_MSG "run-level %c"
#define BOOT_MSG
"system boot"

May 16, 1988

Page 1

UTMP (F)
.#define OTIME_MSG
#define NTIME_MSG

UTMP (F)
"old time"
"new time"

Files
/usr/inc1ude/utmp.h
/etc/utmp
/etc/wtmp

See Also
getut(S), login(C), who(C), write(C)

May 16,1988

Page 2

Permuted Index
Commands, System Calls, Library Routines and File Formats

This permuted index is derived from the "Name" description lines found on each
reference manual page. Each index line shows the title of the entry to which the line
refers, followed by the reference manual section letter where the page is found.
To use the permuted index search the middle column for a key word or phrase. The right
hand column contains the name and section letter of the manual page that documents
the key word or phrase. The left column contains additional useful information about
the command. Commands or routines are also listed in the context of the index line,
followed by a colon (:). This denotes the "beginning" of the sentence. Notice that in
many cases, the lines wrap, starting in the middle column and ending in the left column.
A slash (/) indicates that the description line is truncated.

coffconv: Convert
13tol, ltol3: Converts between
accepts a number of
between long integer and base
Object Modules. 86rel: Intel
asx: XENIX
Format for Object Modules.
long integer and base 64 ASCII.
value.
abs: Returns an integer
and/ /fabs, ceil, fmod: Performs
integer. labs: Returns the
blocks.
files. settime: Changes the
a file. touch: Updates
utime: Sets file
of a file.
dosls, dosrm, dosrmdir:
directory. chmod: Changes the
a/ /nbwaitsem: Awaits and checks
sdenter, sdleave: Synchronizes
sputl, sgetl:
endutent, utmpname:
access: Determines
Synchronizes shared data
csplit: Splits files
nnuser: Removes a user
accton: Turns on
acct: Format of per-process

386 COFF files to XENIX format.
3-byte integers and long/
512-byte blocks. . . . . . .
64 ASCII. a641, 164a: Converts
8086 Relocatable Format for
8086/186/286/386 Assembler.
86rel: Intel 8086 Relocatable
a64I, 164a: Converts between
abort: Generates an lOT fault.
abs: Returns an integer absolute
..... .
absolute value.
absolute value, floor, ceiling
absolute value of a long • • •
accepts a number of 512-byte
access and modification dates of
access and modification times of
access and modification times.
access: Determines accessibility
..•.•
Access DOS files.
access permissions of a file or
access to a resource governed by
access to a shared data segment.
Accesses long integer data in a/
Accesses utmp file entry.
accessibility of a file.
access. sdgetv, sdwaitv:
according to context. . . . . .
account from the system.
accounting. • •.
accounting file.

• coffconv(M)
l3tol(S)
10gin(M)
a64I(S)
86rel(F)
asx(CP)
86rel(F)
a64I(S)
abort(S)
• abs(S)
abs(S)
floor(S)
labs(DOS)
10gin(M)
settime(ADM)
• touch(C)
utime(S)
· accesseS)
dos(C)
chmod(C)
· waitsem(S)
• sdenter(S)
sputl(S)
getut(S)
accesseS)
sdgetv(S)
csplit(C)
nnuser(ADM)
accton(ADM)
acct(F)

I-I

Permuted Index

Searches for and prints process
imacct: Generate an IMAGEN
Enables or disables process
process accounting.
accounting file.
process accounting files.
sin, cos, tan, asin,
Prints current SCCS file editing
information about system
debugger.
Copies bytes from a specific
mkuser:
nl:
lineprinters. lpinit:
swapadd:
putenv: Changes or
SCCS files.
admin: Creates and
netutil:
uuinstall:
pwadmin: Performs password aging
sysadmsh: Menu driven system
uadmin:
pwadmin: Performs password
alarm: Sets a process'
clock.
aliashash: Micnet
table generator.
faliases: Micnet
brkct1:
malloc, free, realloc, calloc:
brk: Changes data segment space
file. inittab:
terminals/ telinit, mkinittab:
Generates programs for lexical
document. style:
link editor output.
libraries.
dc: Invokes an
cpio: Format of cpio
ar:
tar:
the names of files on a backup
ar: Maintains
tar:
cpio: Copies file
ranlib: Converts
swapadd: Adds swap
varargs: variable

1-2

accounting files. acctcom:
accounting report.
accounting. acct:
acct: Enables or disables
acct: Format of per-process
acctcom: Searches for and prints
·
accton: Thrns on accounting.
acos, atan, atan2: Performs/
activity. sact: •• • . • . .
activity. uptime: Displays
adb: Invokes a general-purpose
address. movedata:
Adds a login ID to the system.
Adds line numbers to a file.
Adds, reconfigures and maintains •
Adds swap area. ,.. • • . . •
adds value to environment.
admin: Creates and administers
administers SCCS files.
Administers the XENIX network. •
Administers UUCP control files.
·
administration.
administration utility.
• ..•.
administrative control.
aging administration.
alarm clock.
alarm: Sets a process' alarm
alias hash table generator.
aliashash: Micnet alias hash
aliasing files. • • • • • • •
Allocates data in a far segment.
Allocates main memory.
allocation. sbrk, • • . • . •
Alternative login terminals
Alternative method of turning
analysis. lex: • • • . • . •
Analyzes characteristics of a
a.out: Format of assembler and
ar: Archive file format.
ar: Maintains archives and • .
arbitrary precision calculator.
archive.
Archive file format.
archive format.
archive. dumpdir: Prints
archives and libraries.
Archives files. • . . • •
archives in and out.
archives to random libraries.
area.
argument list. • • • • • .

acctcom(ADM)
imacct(C)
acct(S)
acct(S)
acct(F)
acctcom(ADM)
accton(ADM)
trig(S)
sact(CP)
uptime(C)
adb(CP)
movedata(DOS)
mkuser(ADM)
nl(C)
Ipinit(ADM)
swapadd(S)
putenv(S)
admin(CP)
admin(CP)
netuti1(ADM)
uuinstall(ADM)
pwadmin(ADM)
sysadmsh(ADM)
uadmin(S)
pwadmin(ADM)
alarm(S)
alarm(S)
aliashash(ADM)
aliashash(ADM)
aliases(M)
brkct1(S)
malloc(S)
sbrk(S)
inittab(F)
telinit(ADM)
lex(CP)
style(CT)
a.out(F)
ar(F)
ar(CP)
dc(C)
cpio(F)
ar(F)
tar(F)
dumpdir(C)
ar(CP)
tar(C)
cpio(C)
ranlib(CP)
swapadd(S)
varargs(S)

Permuted Index

output of a varargs
getopt: Gets option letter from
expr: Evaluates
echo: Echoes
ascii: Map of the
character set.
atof, atoi, atol: Converts
between long integer and base 64
tzset: Converts date and time to
and/ ctime, localtime, gmtime,
Performs/ sin, cos, tan,
commands. help:
time of day.
output. a.out: Format of
asx: XENIX 8086/186/286/386
masm: Invokes the XENIX
program.
deassigns devices.
assign, deassign:
setbuf, setvbuf:
setkey:
Assembler.
a later time.
sin, cos, tan, asin, acos,
sin,cos, tan,asin,acos,atan,
to numbers.
double-precision/ strtod,
numbers. atof,
integer. strtol, atol,
integer. strtol,
atof, atoi,
/Print file to printer
lprint: Print to a printer
data segment. sdget, sdfree:
the system.
schedule: Database for
autoboot:
resource/ waitsem, nbwaitsem:
processes. wait:
a pattern in a file.
wait: Awaits completion of
Prints the names of files on a
sddate: Prints and sets
/Default
format.
file system backup.
Performs incremental file system
Performs incremental file system
error-checking filesystem
sysadmin: Performs file system
periodic semi-automated system

argument list. /Prints formatted
argument vector. . . • . . •
arguments as an expression.
arguments. . . . • •
ASCII character set.
ascii: Map of the ASCII
ASCII to numbers.
ASCII. a641, 164a: Converts
ASCII. /gmtime, asctime,
asctime, tzset: Converts date
asin, acos, atan, atan2:
Asks for help about SCCS
asktime: Prompts for the correct
•
assembler and link editor
Assembler. . • . . . . . • . .
assembler.
. ..•...•.
assert: Helps verify validity of
assign, deassign: Assigns and
Assigns and deassigns devices.
Assigns buffering to a stream.
Assigns the function keys.
asx: XENIX 8086/186/286/386
at, batch: Executes commands at
·
atan, atan2: Performs/ • . • •
atan2: Performs trigonometric/
atof, atoi, atol: Converts ASCII
atof: Converts a string to a • •
atoi, atol: Converts ASCII to
atoi: Converts string to
atol, atoi: Converts string to
atol: Converts ASCII to numbers. •
attached to a serial console
attached to the user's terminal
Attaches and detaches a shared
autoboot: Automatically boots
automated system backups . .
Automatically boots the system.
•
A waits and checks access to a
Awaits completion of background
awk: Searches for and processes
•
background processes.
backup archive. dumpdir:
backup dates. • • • . • .
backup device information.
backup: Incremental dump tape
backup: Performs incremental
backup. backup:
backup. dump:
backup fsave: Interactive,
backups and restores files.
backups fsphoto: Performs

vprintf(S)
getopt(S)
expr(C)
echo(C)
ascii(M)
ascii(M)
atof(S)
a64I(S)
ctime(S)
ctime(S)
trig(S)
help(CP)
asktime(ADM)
a.out(F)
asx(CP)
masm(CP)
assert(S)
assign(C)
assign(C)
setbuf(S)
setkey(C)
asx(CP)
at(C)
trig(S)
trig(S)
atof(S)
strtod(S)
atof(S)
strtol(S)
strtol(S)
atof(S)
consoleprint(ADM)
Iprint(C)
sdget(S)
autoboot(ADM)
schedule(ADM)
autoboot(ADM)
waitsem(S)
wait(C)
awk(C)
wait(C)
dumpdir(C)
sddate(C)
archive(F)
backup(F)
backup(C)
backup(C)
dump(C)
fsave(ADM)
sysadmin(ADM)
fsphoto(ADM)

1-3

Permuted Index

Database for automated system backups schedule:
fixed disk for flaws and creates bad track table. badtrk: Scans
flaws and creates bad track! badtrk: Scans fixed disk for
banner: Prints large letters. .
between long integer and base 64 ASCII. /164a: Converts
and sets the configuration data base. cmos: Displays . • .
and sets the configuration data base. cmos: Displays . . .
names from pathnames. basename: Removes directory
...•.
Terminal capability data base. termcap:
•.••.
terminal capability data base. terminfo:
later time. at, batch: Executes commands at a
bc: Invokes a calculator.
fordifJ. bdiff: Compares files too large
bdos: Invokes a DOS system call. •
cb: Beautifies C programs.
jO, j 1, jn, yO, y 1, yn: Performs Bessel functions. bessel,
Perfonns Bessel functions. bessel, jO, j 1, jn, yO, y 1, yn:
bfs: Scans big files. . . . .
mail uudecode: decode a binary file for transmission via
mail uuencode: encode a binary file for transmission via
fixhdr: Changes executable binary file headers.
selected parts of executable binary files. hdr: Displays
fread, fwrite: Perfonns buffered binary input and output.
bsearch: Performs a binary search. . . . . .
tfind, tdelete, twalk: Manages binary search trees. tsearch,
Creates an instance of a binary semaphore. creatsem:
Removes symbols and relocation bits. strip:.. . . . . .
shutdn: Flushes block I/O and halts the CPU.
cmchk: Reports hard disk block size.
. .••.
df: Report number of free disk blocks.
Calculates checksum and counts blocks in a file. sum:
accepts a number of 512-byte blocks.
fdswap: Swaps default boot floppy drive.
boot: XENIX boot program. . •
boot: XENIX boot program.
autoboot: Automatically boots the system.
allocation. sbrk, brk: Changes data segment space
segment. brkctl: Allocates data in a far
search. bsearch: Performs a binary
output. fread, fwrite: Performs buffered binary input and
stdio: Performs standard buffered input and output.
setbuf, setvbuf: Assigns buffering to a stream.
flushall: Flushes all output buffers.
• •...•
a character to the console buffer. ungetch: Returns
mknod: Builds special files.
. •.••.•
inp: Returns a byte.
outp: Writes a byte to an output port.
movedata: Copies bytes from a specific address.
swab: Swaps bytes.
cc: Invokes the C compiler. . •
cflow: Generates C flow graph.

1-4

schedule(ADM)
badtrk(ADM)
badtrk(ADM)
banner(C)
a64I(S)
cmos(HW)
cmos(HW-86)
basename( C)
termcap(M)
terminfo(M)
at(C)
bc(C)
bdiff(C)
bdos(DOS)
cb(CP)
bessel(S)
bessel(S)
bfs(C)
uuencode(C)
uuencode(C)
fixhdr(C)
hdr(CP)
fread(S)
bsearch(S)
tsearch(S)
creatsem(S)
strip(CP)
shutdn(S)
cmchk(C)
df(C)
sum(C)
login(M)
fdswap(ADM)
boot(HW)
boot(HW)
autoboot(ADM)
sbrk(S)
brkct1(S)
bsearch(S)
fread(S)
stdio(S)
setbuf(S)
flushall(DOS)
ungetch(DOS)
mknod(C)
inp(DOS)
outp(DOS)
movedata(DOS)
swab(S)
cc(CP)
cflow(CP)

Permuted Index

cpp: The
lint: Checks
cxref: Generates
cb: Beautifies
xref: Cross-references
xstr: Extracts strings from
stack requirements for
an error message file from
distance. hypot,
blocks in a file. sum:
bc: Invokes a
Invokes an arbitrary precision
cal: Prints a
service.
bdos: Invokes a DOS system
intdos: Invokes a DOS system
intdosx: Invokes a DOS system
exit: Terminates the
malloc, free, realloc,
cu:
Data returned by stat system
lineprinter. lp,lpr,
termcap: Terminal
tenninfo: terminal
descriptions into terminfo/
files.
catimp: Convert
Generate troffwidth files and
imPRESS format.

commentary of an SCCS delta.
value, floor,! floor, fabs,
/perfonns absolute value, floor,

delta: Makes a delta
allocation. sbrk, brk:
headers. fixhdr:
chgrp:
passwd:
chmod:
environment. putenv:
chown:
nice:
command. chroot:
modification dates off settime:
of a file or directory. chmod:
an SCCS delta. cdc:

C language preprocessor.
C language usage and syntax.
C program cross-reference.
C programs.
.... .
C programs.
C programs.
.... .
C programs. !Determines
C source. mkstr: Creates
cabs: Determines Euclidean
cal: Prints a calendar.
Calculates checksum and counts
calculator.
calculator. dc:
calendar. . . •
calendar: Invokes a reminder
call.
call. . . . • .
call. . . . . . .
calling process.
calloc: Allocates main memory.
Calls another XENIX system.
call. stat:
..•.••..
cancel: Send/cancel requests to
capability data base.
capability data base.
capinfo: convert tenncap
cat: Concatenates and displays
C/M files to imPRESS fonnat.
catab file. charmap:
catimp: Convert C/Aff files to
cb: Beautifies C programs. • .
cc: Invokes the C compiler.
cd: Changes working directory.
cdc: Changes the delta
ceil, fmod: Performs absolute .
ceiling and remainder functions.
cflow: Generates C flow graph.
cgets: Gets a string.
(change) to an SCCS file.
Changes data segment space
Changes executable binary file
Changes group ID.
Changes login password.
Changes mode of a file.
Changes or adds value to
Changes owner ID. . .
Changes priority of a process.
Changes root directory for . .
Changes the access and
Changes the access permissions
Changes the delta commentary of

cpp(CP)
lint(CP)
cxref(CP)
cb(CP)
xref(CP)
xstr(CP)
stackuse( CP)
mkstr(CP)
hypot(S)
cal(C)
sum(C)
bc(C)
dc(C)
cal(C)
calendar( C)
bdos(DOS)
intdos(DOS)
intdosx(DOS)
exit(DOS)
malloc(S)
cu(C)
stat(F)
Ip(C)
termcap(M)
tenninfo(M)
capinfo(C)
cat(C)
catimp(CT)
charmap(CT)
catimp(CT)
cb(CP)
cc(CP)
cd(C)
cdc(CP)
floor(S)
floor(S)
cflow(CP)
cgets(DOS)
delta(CP)
sbrk(S)
fixhdr(C)
chgrp(C)
passwd(C)
chmod(S)
putenv(S)
chown(C)
nice(S)
chroot(ADM)
settime(ADM)
chmod(C)
cdc(CP)

1-5

Permuted Index

file. newform:
file. chown:
chroot:
chsize:
chdir:
password file. chsh:
cd:
stream. ungetc: Pushes
eqnchar: Contains special
isatty: Checks for a
ioctl: Controls
fgetc, fgetchar: Gets a
getch: Gets a
getche: Gets and echoes a
getc, getchar, fgetc, getw: Gets
!putchar, fputc, putw: Puts a
ascii: Map of the ASCII
trchan: Translate
fputc, fputchar: Write a
ungetch: Returns a
putch: Writes a
style: Analyzes
Displays/changes hard disk
strrev: Reverses the order of
charater. strset: Sets all
ltoa: Converts long integers to
strlwr: Converts uppercase
strupr: Converts lowercase
tr: Translates
ultoa: Converts numbers to
wc: Counts lines, words and
tolower, toascii: Translates
toascii: Classifies or converts
characters in a string to one
files and catab file.
directory.
fstab: File system mount and
permissions file uucheck:
constant-width text fori cw,
mathematical text/ eqn, neqn,
processed by fsck.
of MM macros.
waitsem, nbwaitsem: Awaits and
fsck:
syntax. lint:
isatty:
grpcheck:
diction:
pwcheck:
keystroke. kbhit:
to be read. rdchk:

1-6

Changes the format of a text
Changes the owner and group of a
Changes the root directory.
Changes the size of a file.
Changes the working directory.
changes user login shell in
Changes working directory.
character back into input
character definitions for eqn.
character device.
character devices.
character from a stream.
..•.•
character.
character.
....•
character or word from a stream.
character or word on a stream.
character set.
. • • •
character sets • • . . . .
character to a stream.
character to the console buffer.
character to the console. • •
characteristics of a document.
characteristics. dparam: . •
characters in a string.
characters in a string to one
characters. • • • . •
characters to lowercase.
characters to uppercase. . . • •
characters. • • • . •
characters.
characters. • . . . •
characters. conv, toupper,
characters. /tolower, toupper,
charater. strset: Sets all
charmap: Generate troff width
chdir: Changes the working
check commands.
check the uucp directories and
checkcw, cwcheck: Prepares
checkeq, eqncheck: Formats
checklist: List of file systems
checkmm, mmcheck: Checks usage
checks access to a resource/
Checks and repairs file systems.
Checks C language usage and
Checks for a character device.
Checks group file.
Checks language usage. . . • .
Checks password file. •
Checks the console for a
Checks to see if there is data

newform(C)
• chown(S)
chroot(S)
chsize(S)
chdir(S)
chsh(ADM)
cd(C)
ungetc(S)
eqnchar(CT)
isatty(DOS)
ioctl(S)
fgetc(DOS)
getch(DOS)
getche(DOS)
• getc(S)
putc(S)
. ascii(M)
trchan(M)
fputc(DOS)
ungetch(DOS)
putch(DOS)
style(CT)
dparam(ADM)
strrev(DOS)
strset(DOS)
Itoa(DOS)
strlwr(DOS)
. strupr(DOS)
tr(C)
ultoa(DOS)
wc(C)
conv(S)
ctype(S)
strset(DOS)
charmap( CT)
chdir(S)
fstab(F)
uucheck(ADM)
cw(CT)
eqn(CT)
checklist(F)
checkmm(CT)
waitsem(S)
· fsck(ADM)
lint(CP)
isatty(DOS}
grpcheck(C)
. diction(CT)
pwcheck(C)
kbhit(DOS)
rdchk(S)

Permuted Index

checkmm, mmcheck: Checks usage of MM macros.
file. sum: Calculates checksum and counts blocks in a
chgrp: Changes group ID.
times: Gets process and child process times.
terminate. wait: Waits for a child process to stop or
chmod: Changes mode of a file.
permissions of a file or/ chmod: Changes the access
chown: Changes owner ID.
group of a file. chown: Changes the owner and
for command. chroot: Changes root directory
directory. chroot: Changes the root
in password file. chsh: changes user login shell
file. chsize: Changes the size of a
tolower, toupper, toascii: Classifies or converts/ /isascii,
uuclean: uucp spool directory clean-up . • . . . . . . .
clear: Clears a terminal screen.
stream status. ferror, feof, clearerr, fileno: Determines
clear: Clears a terminal screen.
clri: Clears inode. . • . . .
a shell command interpreter with C-like syntax. csh: Invokes
alarm: Sets a process' alarm clock. . . • . . . . .
clock: Reports CPU time used.
(time of day) clock. clock: The system real-time
system real-time (time of day) clock. clock: The
system real-time (time of day) clock. setclock: Sets the
operations. closedir: Performs directory
close: Closes a file descriptor.
fclose, fftush: Closes or flushes a stream.
shuts down the/ haltsys, reboot: Closes out the file systems and
fclose, fcloseall: Closes streams. . • . . . . •
clri: Clears inode.
•.•..
size. cmchk: Reports hard disk block
configuration data base. cmos: Displays and sets the
cmp: Compares two files.
coffconv: Convert 386 COFF files to XENIX format.
col: Filters reverse linefeeds.
screen: tty[Ol-n], color, monochrome, ega,.
setcolor: Set screen color. • . • . . • . • .
lc: Lists directory contents in columns. . • . . • . . • •
comb: Combines SCCS deltas.
comb: Combines SCCS deltas.
common to two sorted files. comm: Selects or rejects lines
nice: Runs a command at a different priority.
segread: command description.
env: Sets environment for command execution.
quits. nohup: Runs a command immune to hangups and •
rsh: Invokes a restricted shell (command interpreter).
sh: Invokes the shell command interpreter. . . • . .
syntax. csh: Invokes a shell command interpreter with C-Jike
uux: Executes command on remote XENIX.
getopt: Parses command options. • . . . • • .

checkmm(CT)
sum(C)
chgrp(C)
times(S)
waiteS)
chmod(S)
chmod(C)
chown(C)
chown(S)
chroot(ADM)
chroot(S)
chsh(ADM)
chsize(S)
ctype(S)
uuclean(ADM)
clear(C)
ferror(S)
clear(C)
clri(ADM)
csh(C)
alarm(S)
clock(S)
clock(F)
clock(F)
setclock(ADM)
directory(S)
close(S)
fclose(S)
haltsys(ADM)
fclose(DOS)
clri(ADM)
cmchk(C)
cmos(HW)
cmp(C)
coffconv(M)
col(CT)
screen(HW)
setcolor(C)
lc(C)
comb(CP)
comb(CP)
comm(C)
nice (C)
segread(DOS)
env(C)
nohup(C)
rsh(C)
sh(C)
csh(C)
uux(C)
getopt(C)

1-7

Permuted Index

system: Executes a shell
time: Times a
Changes root directory for
at, batch: Executes
cron: Executes
micnet: The Micnet default
help: Asks for help about SCCS
intro: Introduces XENIX
system. remote: Executes
xargs: Constructs and executes
File system mount and check
Introduces text processing
XENIX Development System
cdc: Changes the delta
comm: Selects or rejects lines
/the status of inter-process
ftok: Standard interprocess
dircmp:
sdiff:
diff. bdiff:
diskcp, diskcmp: Copies or
dill:
cmp:
diff:
file. sccsdiff:
regexp: Regular expression
terminfo: Format of
cc: Invokes the C
tic: Terminfo
yacc: Invokes a
expressions. regex, regcmp:
regcmp:
erf, erfc: Error function and
processes. wait: Awaits
storage.
compress:
pack, pcat, unpack:
scsi: Small
cat:
system.
cmos: Displays and sets the
hwconfig: Read the
/mapscrn, mapstr, convkey:
mapchan:
config:
spooling system. Ipadmin:
an out-going terminal line
Returns a character to the
cputs: Puts a string to the
console: System

1-8

command.
command.
command. chroot:
commands at a later time.
commands at specified times.
commands file.
commands.
commands. . . • . . • .
commands on a remote XENIX
commands.
commands. fstab:
commands. intro:
commands. intro: Introduces
commentary of an SCCS delta.
common to two sorted files.
communication facilities.
communication package.
Compares directories. •
Compares files side-by-side.
Compares files too large for
compares floppy disks.
Compares three files.
Compares two files.
Compares two text files.
Compares two versions of an SCCS
compile and match routines.
compiled terminfo file.
compiler. . . . .
compiler. • • . . . .
compiler-compiler. . •
Compiles and executes regular
Compiles regular expressions.
complementary error function.
completion of background
compress: Compress data for .
Compress data for storage. . .
Compresses and expands files.
computer systems interface.
Concatenates and displays files.
conditions. test: Tests . . .
config: Configures a XENIX
configuration data base.
configuration information.
Configure monitor screen/
Configure tty device mapping.
Configures a XENIX system.
Configures the lineprinter
connection. dial: Establishes
console buffer. ungetch:
console.
console device.

system(S)
time(CP)
chroot(ADM)
at(C)
cron(C)
micnet(F)
help(CP)
Intro(C)
remote(C)
xargs(C)
fstab(F)
Intro(CT)
Intro(CP)
cdc(CP)
comm(C)
ipcs(ADM)
stdipc(S)
dircmp(C)
sdiff(C)
bdiff(C)
diskcp(C)
dift3(C)
cmp(C)
diff(C)
sccsdiff(CP)
regexp(S)
terminfo(F)
cc(CP)
tic(C)
yacc(CP)
regex(S)
regcmp(CP)
erf(S)
wait(C)
compress(C)
compress(C)
pack(C)
scsi(HW)
cat(C)
test(C)
config(ADM)
cmos(HW)
hwconfig(ADM)
mapkey(M)
mapchan(M)
config(ADM)
Ipadmin(ADM)
dial(S)
ungetch(DOS)
cputs(DOS)
conso1e(M)

Permuted Index

kbhit: Checks the
cscanf: Converts and formats
messages: Description of system
putch: Writes a character to the
to printer attached to a serial
printer attached to a serial!
cw, checkcw, cwcheck: Prepares
mkfs:
commands. xargs:
nroff/troff, tbl, and eqn
debugging on uutry: try to
definitions for eqn. eqnchar:
Ie: Lists directory
Is: Gives information about
1: Lists information about
Splits files according to
UUCP
init, inir: Process
msgctl: Provides message
uadmin: administrative
ioctl:
fcntl:
semctl:
operations. shmctl:
uucp status inquiry and job
Translates characters.
term:
fcvt, gcvt: Performs output
format. coffconv:
and human-readable/ deco, enco:
format. catimp:
format. dviimp:
into terminfo/ capinfo:
double-precision/ strtod, atof:
dd:
input. cscanf:
scanf, fscanf, sscanf:
libraries. ranlib:
atof, atoi, atol:
and long/ 13tol,lto13:
and base 64 ASCII. a64l, l64a:
toupper, toascii: Classifies or
/gmtime, asctirne, tzset:
characters. ltoa:
uppercase. strupr:
ultoa:
itoa:
standard FORTRAN. ratfor:
strtol, atol, atoi:
format. iprint:

console for a keystroke.
console input.
console messages.
console.
console: System console device.
console /print file
consoleprint: Print file to
constant-width text fortroff.
Constructs a file system. . .
Constructs and executes . . .
constructs. deroff: Removes
contact remote system with
Contains special character
contents in columns.
contents of directories.
contents of directory.
context. csplit:
control files. uuinstall: Administers
control initialization.
control operations.
•.•..
control.
Controls character devices.
Controls open files. . . . •
Controls semaphore operations.
Controls shared memory
control. uustat: . . • . . .
conv, toupper, tolower, toascii:
Conventional names.
conversions. ecvt, • . . . .
Convert 386 COFF files to XEN1X
Convert between imPRESS format
Convert C/A/T files to imPRESS
Convert DV1 files to imPRESS
convert termcap descriptions
Converts a string to a
. Converts and copies a file.
Converts and formats console
Converts and formats input.
Converts archives to random
Converts ASCII to numbers.
Converts between 3-byte integers
Converts between long integer
converts characters. /tolower,
Converts date and time to ASCII.
Converts long integers to
Converts lowercase characters to
Converts numbers to characters.
Converts numbers to integers.
Converts Rational FORTRAN into
Converts string to integer.
Converts text files to DV1

·

•

•

•
·
•

kbhit(DOS)
cscanf(DOS)
messages(M)
putch(DOS)
console(M)
consoleprint(ADM)
consoleprint(ADM)
cw(CT)
mkfs(ADM)
xargs(C)
deroff(CT)
uutry(ADM)
eqnchar(CT)
Ie(C)
ls(C)
l(C)
csplit(C)
uuinstall(ADM)
init(M)
msgctl(S)
uadmin(S)
ioctl(S)
fcntl(S)
semctl(S)
shmctl(S)
uustat(C)
conv(S)
term(CT)
ecvt(S)
coffconv(M)
deco(CT)
catimp( CT)
dviimp(CT)
capinfo(C)
strtod(S)
dd(C)
cscanf(DOS)
scanf(S)
ranlib(CP)
atof(S)
l3tol(S)
a64l(S)
ctype(S)
ctirne(S)
ltoa(DOS)
strupr(DOS)
ultoa(DOS)
itoa(DOS)
ratfor(CP)
strtol(S)
iprint(C)

1-9

Permuted Index

units:
lowercase. strlwr:
screen/ mapkey, mapscm, mapstr,
dd: Converts and
address. movedata:
cpio:
systems. rcp:
cp:
copy:
diskcp, diskcmp:
Public XENIX-to-XENIX file
core: Format of
asktime: Prompts for the
explain:
atan2: Performs/ sin,
functions. sinh,
sum: Calculates checksum and
characters. wc:
cpio: Format of
and out.
preprocessor.
clock: Reports
Flushes block I/O and halts the
console.
rewrites an existing one.
file. tmpnam, tempnam:
mkdir:
an existing one. creat:
fork:
spawnl, spawnvp:
ctags:
tee:
tmpfile:
from C source. mkstr:
profile. profil:
semaphore. creatsem:
pipe:
files. admin:
/Scans fixed disk for flaws and
umask: Sets and gets file
a binary semaphore.
listing.
specified times.
intro: Introduction to DOS
dosld: XENIX to MS-DOS
cxref: Generates C program

I-1O

Converts units.
•.••••••
Converts uppercase characters to .
convkey: Configure monitor
copies a file.
••••.••
Copies bytes from a specific
Copies file archives in and out.
Copies files across XENIX
•••••.
Copies files.
Copies groups of files.
Copies or compares floppy disks. •
copy: Copies groups of files.
copy. uuto, uupick:
core: Format of core image file.
core image file.
correct time of day.
Corrects language usage.
cos, tan, asin, acos, atan,
cosh, tanh: Performs hyperbolic
counts blocks in a file.
Counts lines, words and
cp: Copies files.
cpio archive.
cpio: Copies file archives in
cpio: Format of cpio archive.
cpp: The C language
cprintf: Formats output. . . • • •
CPU time used.
CPU. shutdn: • • • •
cputs: Puts a string to the
creat: Creates a new file or
Creates a name for a temporary
Creates a new directory. . .
Creates a new file or rewrites
Creates a new process.
Creates a new process.
Creates a tags file.
Creates a tee in a pipe.
Creates a temporary file.
Creates an error message file
Creates an execution time
Creates an instance of a binary
Creates an interprocess pipe.
Creates and administers SCCS
creates bad track table.
creation mask.
•...•.
creatsem: Creates an instance of
•
cref: Makes a cross-reference
cron: Executes commands at
cross development functions.
cross linker.
. • . • .
cross-reference. • . • . .

units(C)
strlwr(DOS)
mapkey(M)
dd(C)
movedata(DOS)
cpio(C)
rcp(C)
cp(C)
copy(C)
diskcp(C)
copy(C)
uuto(C)
core(F)
core(F)
asktime(ADM)
explain(CT)
trig(S)
sinh(S)
sum(C)
wc(C)
cp(C)
cpio(F)
cpio(C)
cpio(F)
cpp(CP)
cprintf(DOS)
clock(S)
shutdn(S)
cputs(DOS)
creat(S)
tmpnam(S)
mkdir(DOS)
creat(S)
fork(S)
spawn(DOS)
ctags(CP)
tee(C)
tmpfile(S)
mkstr(CP)
profil(S)
creatsem(S)
pipe(S)
admin(CP)
badtrk(ADM)
umask(S)
creatsem(S)
cref(CP)
cron(C)
intro(DOS)
dosld(CP)
cxref(CP)

Permuted Index

cref: Makes a
xref:
console input.
interpreter with C-like syntax.
to context.
terminal
for a terminal.
asctime, tzset: Converts date/
islower, isdigit, isxdigit,/
pointer. tell: Gets the
activity. sact: Prints
the slot in the utmp file of the
getcwd: Get the patbname of
uname: Prints the name of the
uname: Gets name of
cursor functions.
curses: Performs screen and
spline: Interpolates smooth
the user.
each line of a file.
line of a file. cut:
constant-width text for trofI.
text for troff. cw, checkcw,
cross-reference.
daemon.mn: Micnet mailer
sdwaitv: Synchronizes shared
termcap: Terminal capability
terminfo: terminal capability
and sets the configuration
compress: Compress
brkctl: Allocates
/sgetl: Accesses long integer
plock: Lock process, text, or
prof: Displays profile
execseg: makes a
call. stat:
sbrk, brk: Changes
Synchronizes access to a shared
Attaches and detaches a shared
rdchk: Checks to see if there is
types: Primitive system
backups schedule:
firstkey, nextkey: Performs
terminfo: terminal description
tput: Queries the terminfo
/gmtime, asctime, tzset: Converts
date: Prints and sets the

cross-reference listing.
Cross-references C programs.
cscanf: Converts and formats
csh: Invokes a shell command
csplit: Splits files according
ct: spawn getty to a remote
ctags: Creates a tags file.
ctermid: Generates a filename
ctime, localtime, gmtime,
ctype, isalpha, isupper,
cu: Calls another XENIX system. ·
current position of the file
current SCCS file editing
current user. ttyslot: Finds
current working directory.
current XENIX system.
current XENIX system.
curses: Performs screen and
cursor functions. • . • •
curve. . . . . . . • . . .
cuserid: Gets the login name of
cut: Cuts out selected fields of
Cuts out selected fields of each
cw, checkcw, cwcheck: Prepares
·
cwcheck: Prepares constant-width ·
cxref: Generates C program
daemon. . . . • . • . . • .
daemon.mn: Micnet mailer daemon.
data access. sdgetv,
data base.
. .•...
data base.
data base. cmos: Displays
data for storage. . . • • .
data in a far segment.
data in a machine-independent.
data in memory.
data.
• ..••••...
data region executable.
Data returned by stat system
data segment space allocation.
data segment. sdenter, sdleave:
data segment. sdget, sdfree:
data to be read.
•••.•.
data types. . • • • • • • •
Database for automated system
database functions. /delete,
database. . . • . • •
database. • . • . • •
date and time to ASCII.
date.
date: Prints and sets the date.

cref(CP)
xref(CP)
cscanf(DOS)
csh(C)
csplit(C)
ct(C)
ctags(CP)
ctermid(S)
ctime(S)
ctype(S)
cu(C)
tell(DOS)
sact(CP)
ttyslot(S)
getcwd(S)
uname(C)
uname(S)
curses(S)
curses(S)
spline(CP)
cuserid(S)
cut(CT)
cut(CT)
cw(CT)
cw(CT)
cxref(CP)
daemon.mn(M)
daemon.mn(M)
sdgetv(S)
termcap(M)
terminfo(M)
cmos(HW)
compress(C)
brkctl(S)
sput1(S)
plock(S)
prof(CP)
execseg(S)
stat(F)
sbrk(S)
sdenter(S)
sdget(S)
rdchk(S)
types(F)
schedule(ADM)
dbm(S)
terminfo(S)
tput(C)
ctime(S)
date(C)
date(C)

1-11

Permuted Index

time, ftime: Gets time and
the access and modification
sddate: Prints and sets backup
The system real-time (time of
the system real-time (time of
Prompts for the correct time of
firstkey, nextkey: Performs/
precision calculator.
devices. assign,
assign, deassign: Assigns and
adb: Invokes a general-purpose
fsdb: File system
sdb: Invokes symbolic
to contact remote system with
imPRESS format and/
transmission via mail uudecode:
fdswap: Swaps
rnicnet: The Micnet
information directory.
defopen, defread: Reads
directory. default:
Contains special character
entries.
defopen,
Performs/ dbminit, fetch, store,
rmdir:
pathname. dirname:
file. tail:
delta: Makes a
delta. cdc: Changes the
rmdel: Removes a
an SCCS file.
the delta commentary of an SCCS
comb: Combines SCCS
terminal. mesg: Permits or
tbl, and eqn constructs.
terminfo: terminal
Machine:
messages. messages:
segread: command
capinfo: convert termcap
descriptions into terminfo
close: Closes a file
dup2: Duplicates an open file
sdget, sdfree: Attaches and
file. access:
dtype:
eof:
hypot, cabs:
file:

1-12

date.
....•..
dates of files. /Changes
dates. . . • . . . .
day) clock. clock:
day) clock. setclock: Sets
day. asktime: • • . • .
dbminit, fetch, store, delete,
dc: Invokes an arbitrary
dd: Converts and copies a file.
deassign: Assigns and deassigns
deassigns devices.
debugger.
debugger.
debugger.
debugging on uutry: try
deco, enco: Convert between
decode a binary file for
default boot floppy drive.
default commands file.
default: Default program
default entries.
Default program information
definitions for eqn. eqnchar:
defopen, defread: Reads default
defread: Reads default entries.
delete, firstkey, nextkey:
Deletes a directory.
Delivers directory part of
Delivers the last part of a
delta (change) to an SCCS file.
delta commentary of an SCCS
delta from an SCCS file. • •.
delta: Makes a delta (change) to
delta. cdc: Changes
deltas. . . . . • . . . •
denie"SlIIeSSages sent to a
deroff: Removes nroffltroff,
description database.
Description of host machine.
Description of system console
description. . . . • • . • .
descriptions into terminfo/ •
descriptions. /convert termcap
descriptor. . . . . . . . .
descriptor. dup, . • • . • • . •
detaches a shared data segment.
.
Determines accessibility of a
Determines disk type. . . •.
Determines end-of-file. • • . . •
Determines Euclidean distance.
Determines file type. • . • • . •

time(S)
settime(ADM)
sddate(C)
clock(F)
setclock(ADM)
asktime(ADM)
dbm(S)
dc(C)
dd(C)
assign(C)
assign(C)
adb(CP)
fsdb(ADM)
sdb(CP)
uutry(ADM)
deco(CT)
uuencode(C)
fdswap(ADM)
micnet(F)
default(F)
defopen(S)
default(F)
eqnchar(CT)
defopen(S)
defopen(S)
dbm(S)
rmdir(DOS)
dirname(C)
tail(C)
delta(CP)
cdc(CP)
rmdel(CP)
delta(CP)
cdc(CP)
comb(CP)
mesg(C)
deroff(CT)
terminfo(S)
machine(HW)
messages(M)
segread(DOS)
capinfo(C)
capinfo(C)
close(S)
dupeS)
sdget(S)
accesseS)
dtype(C)
eof(DOS)
hypot(S)
file(C)

Permuted Index

for C programs. stackuse:
ferror, feof, clearerr, fileno:
whodo:
console: System console
error: Kernel error output
/Default backup
master: Master
lp, IpO, lpl, Ip2: Line printer
isatty: Checks for a character
mapchan: Format of tty
mapchan: Configure tty
devnm: Identifies
systty: System maintenance
ioct1: Controls character
deassign: Assigns and deassigns
font and video mode for a video
blocks.
terminal line connection.
dial:
uuchat:

diffink: Marks
between files.

uucheck: check the uucp
dircmp: Compares
mv: Moves or renames files and
rm, rmdir: Removes files or
rmdir: Removes
information about contents of
cd: Changes working
chdir: Changes the working
chroot: -'Changes the root
uuclean: uucp spool
Ie: Lists
dir: Format of a
unlink: Removes
chroot: Changes root
uucico: Scan the spool
mkdir: Makes a
mkdir: Creates a new
mvdir: Moves a
pwd: Prints working
basename: Removes
closedir: Performs
ordinary file. mknod: Makes a

stackuse( CP)
Determines stack requirements
ferror(S)
Determines stream status.
whodo(C)
Determines who is doing what.
console(M)
device.
error(M)
device.
..... .
archive(F)
device information.
master(F)
device information table.
Ip(HW)
device interfaces.
isatty(DOS)
device.
•....
mapchan(F)
device mapping files.
mapchan(M)
device mapping.
devnm(C)
device name.
systty(M)
device.
ioct1(S)
devices.
assign(C)
devices. assign,
vidi(C)
device. vidi: Sets the
devnm(C)
devnm: Identifies device name.
df(C)
df: Report number of free disk
dial(ADM)
dial: Dials a modem.
dial(S)
dial: Establishes an out-going
dial(ADM)
Dials a modem. . • . • .
dial(ADM)
dials a modem.
.....
. diction(CT)
diction: Checks language usage.
diff(C)
diff: Compares two text files.
diff3(C)
diff3: Compares three files.
diffink( CT)
differences between files.
diffink( CT)
diffink: Marks differences
dir(F)
dir: Format of a directory.
dircmp(C)
dircmp: Compares directories.
uucheck(ADM)
directories and permissions file
dircmp(C)
directories.
mv(C)
directories.
rm(C)
directories.
rmdir(C)
directories.
Is(C)
directories. Is: Gives
cd(C)
directory.
chdir(S)
directory.
chroot(S)
directory.
uuclean(ADM)
directory clean-up
Ie(C)
directory contents in columns.
dir(F)
directory.
. ....
directory entry.
unlink(S)
chroot(ADM)
directory for command.
directory for work.
uucico(C)
rnkdir(C)
directory.
rnkdir(DOS)
directory.
mvdir(C)
directory.
pwd(C)
directory name.
directory names from pathnames. . basename( C)
directory(S)
directory operations.
directory, or a special or . . .___ . • mknod(S)

1-13

Permuted Index

dirname: Delivers
rename: renames a file or
rmdir: Deletes a
access permissions of a file or
Default program information
the pathname of current working
information about contents of
of pathname.
printers.
acct: Enables or
type, modes, speed, and line
cmchk: Reports hard
df: Report number of free
dparam: Displays/changes hard
hd: Internal hard
track/ badtrk: Scans fixed
fdisk: Maintain
dtype: Determines
du: Summarizes
floppy disks. diskcp,
compares floppy disks.
format: format floppy
Copies or compares floppy
umount:
zcat:
vedit: Invokes a screen-oriented
configuration data base. cmos:
cat: Concatenates and
format. hd:
od:
system activity. uptime:
is on the system and what w:
prof:
executable binary files. hdr:
characteristics. dparam:
mail: Sends, reads or
cabs: Determines Euclidean
1cong48: Generates uniformly

mm macros. mm: Prints
mmt: Typesets
Analyzes characteristics of a
whodo: Determines who is
intro: Introduction to
dosexterr: Gets
dosls, dosrm, dosrmdir: Access
bdos: Invokes a
intdos: Invokes a
intdosx: Invokes a
messages.
linker.

1-14

dirname(C)
directory part of pathname.
rename(DOS)
directory.
.••••.•
rmdir(DOS)
directory.
•••••••
chmod(C)
directory. chmod: Changes the
default(F)
directory. default:
getcwd(S)
directory. getcwd: Get
1(C)
directory. 1: Lists
• dirname(C)
dirname: Delivers directory part
disable(C)
disable: Turns off terminals and
acct(S)
disables process accounting.
getty(M)
discipline. /Sets terminal
cmchk(C)
disk block size.
df(C)
disk blocks. . • • •
dparam(ADM)
disk characteristics.
hd(HW)
disk drive.
badtrk(ADM)
disk for flaws and creates bad
fdisk(ADM)
disk partitions.
dtype(C)
.••.•.••
disk type.
du(C)
disk usage. . • • . • . • .
diskcp(C)
diskcmp: Copies or compares
diskcp(C)
diskcp, diskcmp: Copies or
fonnat(C)
disks. • . • • . • . . •
diskcp(C)
disks. diskcp, diskcmp:
umount(ADM)
Dismounts a file structure.
compress(C)
Display a stored file.
vi(C)
display editor. vi, view,
cmos(HW)
Displays and sets the
cat(C)
displays files. • . . . .
hd(C)
Displays files in hexadecimal
od(C)
Displays files in octal format.
uptime(C)
Displays information about
. w(C)
Displays information about who
prof(CP)
Displays profile data.
hdr(CP)
Displays selected parts of
dparam(ADM)
Displays/ changes hard disk
mail(C)
disposes of mail. . . . • •
hypot(S)
distance. hypot,
distributed. srand48, seed48,
drand48(S)
divvy(ADM)
divvy -b block_device -c c/
mm(CT)
documents formatted with the
mmt(CT)
documents.
style(CT)
document. style:
whodo(C)
doing what. • . .
intro(DOS)
DOS cross development functions.
dosexter(DOS)
DOS error messages.
dos(C)
DOS files.
bdos(DOS)
DOS system call.
intdos(DOS)
DOS system call.
intdosx(DOS)
DOS system call.
dosexter(DOS)
dosexterr: Gets DOS error
dosld(CP)
dosld: XENIX to MS-DOS cross

Permuted Index

DOS files.
files. dosls,
dosls, dosrm,
/atof: Converts a string to a
disk characteristics.
hd: Internal hard disk
Swaps default boot floppy
utility. sysadmsh: Menu
sxt: Pseudo-device
term: Terminal

format.
system backup.
backup: Incremental
dump: Incremental
files on a backup archive.
file. tapedump:
file descriptor.
descriptor. dup,
descriptor. dup, dup2:
dviimp: Convert
iprint: Converts text files to
imPRESS format.
getche: Gets and
echo:
output conversions.
program. end, etext,
sact: Prints current SCCS file
ed: Invokes the text
ex: Invokes a text
ld: Invokes the link
ld: Invokes the link
Format of assembler and link
the stream
a screen-oriented display
effective user, real group, and
/getgid, getegid: Gets real user,
color, monochrome,
for a pattern. grep,
input. soelim:
line printers.
accounting. acct:
format and human-readable/ deco,
transmission via mail uuencode:
makekey: Generates an
locations in program.
/getgrgid, getgmam, setgrent,
eof: Determines

dosls, dosrm, dosrmdir: Access
dosrm, dosrmdir: Access DOS
dosrmdir: Access DOS files.
double-precision number.
dparam: Displays/changes hard
drive. • . . . . . . • • .
drive. fdswap:
.....
driven system administration
driver. . . • • . . . . .
driving tables for nroff.
dtype: Determines disk type.
du: Summarizes disk usage.
dump: Incremental dump tape
•
dump: Performs incremental file
dump tape format. . • • • •
dump tape format. . . • • •
dumpdir: Prints the names of.
Dumps magnetic tape to output
dup, dup2: Duplicates an open
dup2: Duplicates an open file
Duplicates an open file
DVI files to imPRESS format.
DVI format.
...•••
dviimp: Convert DVI files to
echo: Echoes arguments.
echoes a character.
Echoes arguments.
ecvt, fcvt, gcvt: Performs
ed: Invokes the text editor.
edata: Last locations in • . • . .
editing activity.
editor.
. • . •.
editor.
editor.
. . . • • •
editor.
editor output. a.out:
editor. sed: Invokes
editor. /view, vedit: Invokes
effective group IDs. !real user,
effective user, real group, and/
ega,. /tty[OI-n], • • • • •
egrep, fgrep: Searches a file
Eliminates .so's from nroff
enable: Turns on terminals and
Enables or disables process
enco: Convert between imPRESS •
encode a binary file for • . • . .
encryption key. . . . . .
end, etext, edata: Last • • . .
endgrent: Get group file entry.
end-of-file. • . • . . • • . .

dos(C)
dos(C)
dos(C)
strtod(S)
dparam(ADM)
hd(HW)
fdswap(ADM)
sysadmsh(ADM)
sxt(M)
term(F)
dtype(C)
du(C)
dump(F)
dump(C)
backup(F)
dump(F)
dumpdir(C)
tapedump(C)
dup(S)
dup(S)
dup(S)
dviimp(CT)
iprint(C)
dviimp(CT)
echo(C)
getche(DOS)
echo(C)
ecvt(S)
ed(C)
end(S)
sact(CP)
ed(C)
ex(C)
Id(CP)
Id(M)
a.out(F)
sed(C)
vi(C)
getuid(S)
getuid(S)
screen(HW)
grep(C)
soelim(CT)
enable(C)
acct(S)
deco(CT)
uuencode(C)
makekey(M)
end(S)
getgrent(S)
eof(DOS)

1-15

Permuted Index

/getpwuid, getpwnam, setpwent,
utmp file entry.
defopen, defread: Reads default
xlist, fxlist: Gets name list
nlist: Gets
wtmp: Formats of utmp and wtmp
putpwent: Writes a password file
unlink: Removes directory
utmpname: Accesses utmp file
endgrent: Get group file
endpwent: Gets password file
command execution.
profile: Sets up an
environ: The user
execution. env: Sets
getenv: Gets value for
putenv: Changes or adds value to
TZ: Time zone
Removes nroff!troff, tbl, and
Formats mathematical text fori
character definitions for eqn.
text fori eqn, neqn, checkeq,
character definitions for
complementary error function.
complementary error/ erf,
perror, sys_errlist, sys_nerr,
error function. erf, erfc:
Error function and complementary
device.
source. mkstr: Creates an
dosexterr: Gets DOS
sys_nerr, ermo: Sends system
services, library routines and
error: Kernel
fsave: Interactive,
matherr:
hashcheck: Finds spelling
terminal line connection. dial:
setmnt:
setmnt: Establishes
program. end,
hypot, cabs: Determines
expression. expr:
execlp, execvp: Executes a/
Executes a file. execl, execv,
exec I, exec v , execle, execve,
executable.
fixhdr: Changes

1-16

endpwent: Gets password file/
endutent, utmpname: Accesses
..... .
entries.
entries from files.
entries from name list.
entries. utmp,
entry. . • . . .
entry.
entry. endutent,
entry. /getgmam, setgrent,
entry. /getpwnam, setpwent,
env: Sets environment for
environ: The user environment.
environment at login time.
environment. • • . . .
environment for command
environment name. . •
environment. . • . . .
environment variable. . . .
eof: Determines end-of-file.
eqn constructs. deroff:
eqn, neqn, checkeq, eqncheck:
eqnchar: Contains special
eqncheck: Formats mathematical
eqn. eqnchar: Contains special
erf, erfc: Error function and
erfc: Error function and
ermo: Sends system error/
Error function and complementary
error function. erf, erfc:
error: Kernel error output
error message file from C
error messages.
error messages. /sys_errlist,
error numbers. /system
error output device.
error-checking filesystem backup
Error-handling function. . •
errors. /hashmake, spellin, .
Establishes an out-going
Establishes /etc/mnttab table.
/etc/mnttab table.
etext, edata: Last locations in
Euclidean distance.
Evaluates arguments as an
ex: Invokes a text editor.
execl, execv, execle, execve,
execle, execve, execlp, execvp:
execlp, execvp: Executes a file.
execseg: makes a data region .
executable binary file headers.

getpwent(S)
getut(S)
defopen(S)
xlist(S)
nlist(S)
utmp(F)
putpwent(S)
unlink(S)
getut(S)
getgrent(S)
getpwent(S)
env(C)
environ(M)
profile(M)
environ(M)
env(C)
getenv(S)
putenv(S)
tz(M)
eof(DOS)
deroff(CT)
eqn(CT)
eqnchar(CT)
eqn(CT)
eqnchar(CT)
erf(S)
erf(S)
perror(S)
erf(S)
erf(S)
error(M)
rnkstr(CP)
dosexter(DOS)
perror(S)
Intro(S)
error(M)
fsave(ADM)
matherr(S)
spell(CT)
dial(S)
setmnt(ADM)
setmnt(ADM)
end(S)
hypot(S)
expr(C)
exeC)
exec(S)
exec(S)
exec(S)
execseg(S)
fixhdr(C)

Permuted Index

hdr: Displays selected parts of
execseg: makes a data region
exec1e, execve, exec1p, execvp:
system:
int86:
int86x:
XENIX. uux:
time. at, batch:
times. cron:
XENIX system. remote:
xargs: Constructs and
regex, regcmp: Compiles and
nap: Suspends
sleep: Suspends
sleep: Suspends
monitor: Prepares
profil: Creates an
Sets environment for command
execvp: Executes a file .. exec1,
a file. exec1, execv, exec1e,
execv, exec1e, execve, execlp,
link: Links a new filename to an
a new file or rewrites an
process.
exit,
process.
false: Returns with a nonzero
true: Returns with a zero
Performs exponential,/
pcat, unpack: Compresses and
usage.
/log, pow, sqrt, log 10: Performs
number into a mantissa and an
expression.
routines. regexp: Regular
expr: Evaluates arguments as an
regcmp: Compiles regular
Compiles and executes regular
programs. xstr:
absolute value, floor,/ floor,
of inter-process communication
factor:

exit value.
abort: Generates an lOT
streams.
flushes a stream.
fclose,
conversions. ecvt,

executable binary files.
executable. • . • • .
Executes a file. exec1, execv,
Executes a shell command.
Executes an interrupt. . • .
Executes an interrupt. . . .
Executes command on remote
Executes commands at a later
Executes commands at specified
Executes commands on a remote
executes commands.
executes regular expressions.
execution for a short interval.
execution for an interval.
execution for an interval.
execution profile.
execution time profile.
execution. env:
execv, exec1e, execve, exec1p,
execve, exec1p, execvp: Executes
execvp: Executes a file. execl,
existing file.
.•...
existing one. creat: Creates
exit, _exit: Terminates a . .
_exit: Terminates a process.
exit: Terminates the calling
exit value.
. .••..•
exit value.
. .•...
exp, log, pow, sqrt, log 10:
expands files. pack,
explain: Corrects language
exponential, logarithm, power,!
exponent. /Splits floating-point
expr: Evaluates arguments as an
expression compile and match
expression.
expressions.
expressions. regex, regcmp:
Extracts strings from C
fabs, ceil, fmod: Performs
facilities. !Reports the status
Factor a number. • • . • .
factor: Factor a number.
faliases: Micnet aliasing files.
false: Returns with a nonzero
fault.
•...••.•
fclose, fcloseall: Closes
fclose, fflush: Closes or
fc1oseall: Closes streams.
fcntl: Controls open files.
fcvt, gcvt: Performs output

hdr(CP)
execseg(S)
exec(S)
system(S)
int86(DOS)
int86x(DOS)
uux(C)
at(C)
cron(C)
remote(C)
xargs(C)
regex(S)
napeS)
sleep(C)
sleep(S)
monitor(S)
profileS)
env(C)
exec(S)
. exec(S)
exec(S)
link(S)
createS)
exit(S)
exit(S)
exit(DOS)
false(C)
true(C)
exp(S)
pack(C)
explain(CT)
exp(S)
frexp(S)
expr(C)
regexp(S)
expr(C)
regcmp(CP)
regex(S)
xstr(CP)
floor(S)
ipcs(ADM)
factor(C)
factor(C)
aliases(M)
false(C)
abort(S)
fclose(DOS)
fclose(S)
fclose(DOS)
fcntl(S)
ecvt(S)

1-17

Permuted Index

fopen, freopen,
floppy drive.
Ito machine related miscellaneous
Introduction to miscellaneous
Detennines stream! ferror,
Determines stream status.
nextkey: Performs/ dbminit,
stream. fclose,
character from a stream.
word from a/ getc, getchar,
a stream. fgetc,
stream. gets,
pattern. grep, egrep,
Compares files too large for
cut: Cuts out selected
of file systems processed by
times. utime: Sets
cpio: Copies
chmod: Changes mode of a
chsize: Changes the size of a
uncompress: Uncompress a stored
zcat: Display a stored
uupick: Public XENIX-to-XENIX
core: Format of core image
umask: Sets and gets
ctags: Creates a tags
dd: Converts and copies a
close: Closes a
dup, dup2: Duplicates an open
sact: Prints current SCCS
putpwent: Writes a password
utmpname: Accesses utmp
setgrent, endgrent: Get group
endpwent: Gets password
filelength: Gets the length of a
grep, egrep, fgrep: Searches a
open: Opens
writing. sopen: Opens a
uudecode: decode a binary
uuencode: encode a binary
ar: Archive
intro: Introduction to
mkstr: Creates an error message
group: Format of the group
grpcheck: Checks group
Changes executable binary
split: Splits a
In: Makes a link to a
mem, kmem: Memory image

1-18

fdisk: Maintain disk partitions.
fdopen: Opens a stream. .
fdswap: Swaps default boot
features and files.
features and files. intro: . •
feof, clearerr, fileno:
ferror, feof, clearerr, fileno:
fetch, store, delete, firstkey,
fflush: Closes or flushes a
fgetc, fgetchar: Gets a
fgetc, getw: Gets character or
fgetchar: Gets a character from
fgets: Gets a string from a
fgrep: Searches a file for a
diU bdiff: . . • • • .
fields of each line of a file.
fsck. checklist: List
file access and modification
file archives in and out. . • • • .
..•••.
file.
file.
file.
file.
. •••.
file copy. uuto,
file. . • • • .
file creation mask.
file.
file.
file descriptor.
file descriptor.
file: Detennines file type.
file editing activity.
file entry.
•..•.
..•••.
file entry. endutent,
file entry. /getgrgid, getgrnam,
.
file entry. /getpwnam, setpwent,
file. . . . . . . . • .
file for a pattern. • . . .
file for reading or writing.
file for shared reading and
file for transmission via mail
file for transmission via mail
file format.
file formats. • • .
file from C source.
file. . • . • • •
file. . • • . • .
file headers. fixhdr:
file into pieces.
file.
file.

fdisk(ADM)
fopen(S)
fdswap(ADM)
Intro(HW)
Intro(M)
ferror(S)
ferror(S)
dbm(S)
fclose(S)
fgetc(DOS)
getc(S)
fgetc(DOS)
gets(S)
grep(C)
bdiff(C)
cut(CT)
checklist(F)
utime(S)
cpio(C)
chmod(S)
chsize(S)
compress( C)
compress(C)
uuto(C)
core(F)
umask(S)
ctags(CP)
dd(C)
close(S)
dupeS)
file(C)
sact(CP)
putpwent(S)
getut(S)
getgrent(S)
getpwent(S)
fileleng(DOS)
grep(C)
open(S)
sopen(DOS)
uuencode(C)
uuencode( C)
ar(F)
Intro(F)
mkstr(CP)
group(M)
grpcheck(C)
fixhdr(C)
split(C)
!n(C)
mem(M)

Permuted Index
nl: Adds line numbers to a
null: The null
!Finds the slot in the utmp
rename: renames a
the access pennissions of a
one. creat: Creates a new
passwd: The password
/ftell, rewind: Repositions a
lseek: Moves read/write
Gets the current position of the
prs: Prints an SCCS
pwcheck: Checks password
read: Reads from a
locking: Locks or unlocks a
sccsfile: Fonnat of an SCCS
stat, fstat: Gets
mount: Mounts a
umount: Dismounts a
backup: Perfonns incremental
dump: Perfonns incremental
files. sysadmin: Perfonns
fsdb:
volume.
mkfs: Constructs a
commands. fstab:
mount: Mounts a
quot: Summarizes
restore, restor: Invokes incremental
ustat: Gets
mnttab: Fonnat of mounted
umount: Unmounts a
haltsys, reboot: Closes out the
fsck: Checks and repairs
fsck. checklist: List of
tmpfile: Creates a temporary
serial! consoleprint: Print
tsort: Sorts a
the scheduler for the uucp
ftw: Walks a
ttys: Login terminals
file: Detennines
val: Validates an SCCS
write: Writes to a
Detennines accessibility of a
Format of per-process accounting
for and processes a pattern in a
troffwidth files and catab
Changes the owner and group of a
user login shell in password
umask: Sets
fields of each line of a

file.
file.
file of the current user.
file or directory.
file or directory. /Changes
file or rewrites an existing
file. •• . . • • . .
file pointer in a stream.
file pointer.
file pointer. teU:
file.
. • • • •
file. •• . . • •
file. . • . . .
file region for reading or/
file.
file status.
file structure.
file structure.
file system backup.
file system backup.
file system backups and restores
File system debugger. • . . . •
file system: Fonnat of a system
file system. •• . . • . .
File system mount and check
file system.
file system ownership.
file system restorer.
file system statistics.
file system table. . .
file system.
•
file systems and shuts down the/
file systems.
•••••
file systems processed by
file. . • • . • • . • . •
file to printer attached to a
file topologically.
file transport program uusched:
file tree.
file.
file type.
•..•..
file.
file.
file. access:
file. acct:
file. awk: Searches
file. charmap: Generate
file. chown:
file. chsh: changes
file-creation mode mask.
file. cut: Cuts out selected

nl(C)
nUll(F)
ttyslot(S)
rename(DOS)
chmod(C)
createS)
passwd(F)
fseek(S)
Iseek(S)
tell(DOS)
prs(CP)
pwcheck(C)
read(S)
locking(S)
sccsfile(F)
stateS)
mount(ADM)
umount(ADM)
backup(C)
dump(C)
sysadmin(ADM)
fsdb(ADM)
filesystem(F)
mkfs(ADM)
fstab(F)
mount(S)
quot(C)
restore(C)
ustat(S)
mnttab(F)
umount(S)
haltsys(ADM)
fsck(ADM)
checklist(F)
tmpfile(S)
consoleprint(ADM)
tsort(CP)
uusched(ADM)
ftw(S)
ttys(F)
file(C)
val(CP)
write(S)
accesseS)
acct(F)
awk(C)
channap( CT)
chown(S)
chsh(ADM)
umask(C)
cut(CT)

1-19

Permuted Index

a delta (change) to an SCCS
exec1p, execvp: Executes a
Alternative login terminals
file.
a new filename to an existing
The Micnet default commands
or a special or ordinary
ctermid: Generates a
mktemp: Makes a unique
linle Links a new
Changes the fonnat of a text
status. ferror, feof, clearerr,
Removes a delta from an SCCS
csplit: Splits
rcp: Copies
faliases: Micnet aliasing
charmap: Generate troff width
mv: Moves or renames
bfs: Scans big
cat: Concatenates and displays
cmp: Compares two
copy: Copies groups of
cp: Copies
dift3: Compares three
diff: Compares two text
fcntl: Controls open
find: Finds
translate: Translates
hd: Displays
od: Displays
mknod: Builds special
dumpdir: Prints the names of
imprint: Prints text
imprint: print text
pr: Prints
queue. ipr, oldipr: Put
rm, rmdir: Removes
paste: Merges lines of
sdiff: Compares
sort: Sorts and merges
tar: Archives
iprint: Converts text
catimp: Convert C/A{f
dviimp: Convert DVI
for printing. lpr: Sends
coffconv: Convert 386 COFF
bdiff: Compares
control
what: Identifies
and prints process accounting
Creates and administers SCCS

1-20

file. delta: Makes
.•••..
file. /execv, exec1e, execve,
file. inittab:
.••••.
filelength: Gets the length of a
file. link: Links • • . • . . • .
file. micnet:
......•
file. mknod: Makes a directory,
filename for a terminal. . . . • .
filename. • . . . • . •
filename to an existing file.
file. newform:
fileno: Determines stream
file. rmdel: . • . . • .
files according to context.
files across XENIX systems.
files.
•...•
files and catab file.
files and directories.
.•..•.
files.
files.
files.
files.
files.
files.
files.
files.
files.
files from one format to another
files in hexadecimal format.
files in octal format.
files.
••....•.
files on a backup archive.
files on an IMAGEN printer.
files on an IMAGEN printer.
files on the standard output.
files onto the IMAGEN printer
files or directories. • • • . .
files.
••.••
files side-by-side.
files.
files.
files to DVI format.
files to imPRESS format.
files to imPRESS format.
files to the lineprinter queue
files to XENIX format.
files too large for diff.
files. uuinstal1: Administers UUCP
files.
......•.
files. acctcom: Searches for
files. admin:
.•.•..•

delta(CP)
exec(S)
inittab(F)
fileleng(DOS)
link(S)
micnet(F)
mknod(S)
ctermid(S)
mktemp(S)
link(S)
newform(C)
ferror(S)
rmdel(CP)
csplit(C)
rcp(C)
aliases(M)
charmap( CT)
mv(C)
bfs(C)
cat(C)
cmp(C)
copy(C)
cp(C)
dift3(C)
diff(C)
fcntl(S)
find(C)
translate( C)
hd(C)
od(C)
mknod(C)
dumpdir(C)
imprint(C)
imprint(CT)
pr(C)
ipr(C)
rm(C)
paste(CT)
sdiff(C)
sort(C)
tar(C)
iprint(C)
catimp(CT)
dviimp(CT)
Ipr(C)
coffconv(M)
bdiff(C)
uuinstal1(ADM)
what(C)
acctcom(ADM)
admin(CP)

Permuted Index

Compares two versions of an SCCS
lines common to two sorted
Marks differences between
dosrrn, dosnndir: Access DOS
parts of executable binary
to miscellaneous features and
Prints the size of an object
semaphores and record locking on
Fonnat of tty device mapping
unpack: Compresses and expands
access and modification dates of
file system backups and restores
miscellaneous features and
top.next: The Micnet topology
printable strings in an object
checksum and counts blocks in a
Gets name list entries from
Interactive, error-checking
mnt: Mount a
The Micnet system identification
/Default infonnation for mounting
Delivers the last part of a
Dumps magnetic tape to output
Fonnat of compiled tenninfo
Creates a name for a temporary
and modification times of a
Undoes a previous get of an SCCS
Reports repeated lines in a
uucp directories and pennissions
col:
documents fonnatted with the
find:
hyphen:
finger:
look:
logname:
object library. larder:
hashmake, spellin, hashcheck:
ttyname, isatty:
an object file. strings:
of the current user. tty slot:
users.
dbminit, fetch, store, delete,
/Prints fonnatted output of a
bad track table. badtrk: Scans
binary file headers.
badtrk: Scans fixed disk for
frexp, Idexp, modf: Splits
/fmod: Perfonns absolute value,
Perfonns absolute value, floor,!
fonnat: fonnat

file. sccsdiff: • . . . . .
files. comm: Selects or rejects
files. diffink: . . . . . . .
files. dosls, . . . . . . . .
files. hdr: Displays selected
files. intra: Introduction
file. size:
files. lockf: Provide
files. mapchan:
files. pack, pcat, .
files. settime: Changes the
files. sysadmin: Perfonns
files. Ito machine related
files. top,
file. strings: Finds the
file. sum: Calculates
files. xlist, fxlist:
file system backup fsave:
filesystem
file. systemid:
filesystems. . .
file. tail:
file. tapedump:
file. tenninfo: .
file. tmpnam, tempnam:
file. touch: Updates access
file. unget: . . . . .
file. uniq:
.... .
file uucheck: check the
Filters reverse linefeeds.
mm macros. mm: Prints
Finds files. . . . . .
Finds hyphenated words.
Finds infonnation about users.
Finds lines in a sorted list.
Finds login name of user.
Finds ordering relation for an
Finds spelling errors. spell,
Finds the name of a tenninal.
Finds the printable strings in
Finds the slot in the utmp file
finger: Finds infonnation about
firstkey, nextkey: Perfonns/
varargs argument list.
fixed disk for flaws and creates
fixhdr: Changes executable
flaws and creates bad track!
floating-point number into a/
floor, ceiling and remainder/
floor, fabs, ceil, fmod:
...•..
floppy disks.

sccsdiff(CP)
comm(C)
diffink( CT)
dos(C)
hdr(CP)
Intro(M)
size(CP)
10ckf(S)
mapchan(F)
pack(C)
settime(ADM)
sysadmin(ADM)
Intro(HW)
top(F)
strings(CP)
sum(C)
xlist(S)
fsave(ADM)
rnnt(C)
systemid(F)
filesys(F)
tail(C)
tapedump(C)
tenninfo(F)
tmpnam(S)
touch(C)
unget(CP)
uniq(C)
uucheck(ADM)
col(CT)
mm(CT)
find(C)
hyphen(CT)
finger(C)
100k(CT)
10gname(S)
10rder(CP)
spell(CT)
ttyname(S)
strings(CP)
ttyslot(S)
finger(C)
dbm(S)
vprintf(S)
badtrk(ADM)
fixhdr(C)
badtrk(ADM)
frexp(S)
floor(S)
floor(S)
fonnat(C)

1-21

Permuted Index

diskcmp: Copies or compares
fdswap: Swaps default boot
cflow: Generates C
buffers.
fclose, fflush: Closes or
flu shall:
CPU. shutdn:
floor,! floor, fabs, ceil,
device. vidi: Sets the
stream.
enco: Convert between imPRESS
ar: Archive file
backup: Incremental dump tape
dump: Incremental dump tape
format:
86rel: Intel 8086 Relocatable
od: Displays files in octal
dir:
file system:
newform: Changes the
inode:
sccsfile:
editor output. a.out:
file. terminfo:
core:
cpio:
table. mnttab:
file. acct:
group:
files. mapchan:
tar: archive
Translates files from one
Convert C/A(f files to imPRESS
Convert 386 COFF files to XENIX
format and human-readable
Convert DVI files to imPRESS
Displays files in hexadecimal
Converts text files to DVI
cscanf: Converts and
fscanf, sscanf: Converts and
intro: Introduction to file
eqn, neqn, checkeq, eqncheck:
neqn:
entries. utmp, wtmp:
cprintf:
printf, fprintf, sprintf:
troff. tbl:
vfprintf, vsprintf: Prints
macros. mm: Prints documents

1-22

floppy disks. diskcp,
floppy drive.
flow graph.
flushall: Flushes all output
flushes a stream.
Flushes all output buffers.
Flushes block I/O and halts the
fmod: Performs absolute value,
font and video mode for a video
fopen, freopen, fdopen: Opens a
fork: Creates a new process.
format and human-readable/ deco,
format.
format.
format.
format floppy disks.
Format for Object Modules.
format: format floppy disks.
...... .
format.
Format of a directory. . .
Format of a system volume.
format of a text file.
Format of an inode.
Format of an SCCS file.
Format of assembler and link
Format of compiled terminfo
Format of core image file.
Format of cpio archive.
Format of mounted file system
Format of per-process accounting .
Format of the group file. . . .
Format of tty device mapping
.•.....
format.
format to another translate:
format. catimp:
format. coffconv:
format. /Convert between imPRESS
format. dviimp:
format. hd:
format. iprint:
formats console input.
formats input. scanf,
formats. . . . . .
Formats mathematical text fori
Formats mathematics. . . • .
Formats of utmp and wtmp
Formats output. • . . . . .
Formats output.
Formats tables for nroff or
formatted output of a/ vprintf,
formatted with the mm

diskcp(C)
fdswap(ADM)
cflow(CP)
flushall(DOS)
fclose(S)
flushall(DOS)
shutdn(S)
floor(S)
vidi(C)
fopen(S)
fork(S)
deco(CT)
ar(F)
backup(F)
dump(F)
format(C)
86rel(F)
format(C)
od(C)
dir(F)
filesystem(F)
newform(C)
inode(F)
sccsfile(F)
a.out(F)
terminfo(F)
core(F)
cpio(F)
mnttab(F)
acct(F)
group(M)
mapchan(F)
tar(F)
translate(C)
catimp(CT)
coffconv(M)
deco(CT)
dviimp(CT)
hd(C)
iprint(C)
cscanf(DOS)
scanf(S)
Intro(F)
eqn(CT)
neqn(CT)
utmp(F)
cprintf(DOS)
printf(S)
tbl(CT)
vprintf(S)
mm(CT)

Permuted Index

nroff: A text
ratfor: Converts Rational
Rational FORTRAN into standard
and segment.
output. printf,
segment. fp_off,
character to a stream.
word on a/ putc, putchar,
stream. fputc,
stream. puts,
binary input and output.
main memory. malloc,
fopen,
floating-point number into a/
error-checking file system/
fonnats input. scanf,
systems.
Repositions a file pointer in a/
semi-automated system backups
check commands.
stat,
file pointer in a/ fseek,
time,
communication package.
function. erf, erfc: Error
gamma: Perfonns log gamma
setkey: Assigns the
matherr: Error-handling
function and complementary error
floor, ceiling and remainder
atan2: Performs trigonometric
jn, yO, yl, yn: Perfonns Bessel
Performs screen and cursor
nextkey: Perfonns database
logarithm, power, square root
to DOS cross development
cosh, tanh: Perfonns hyperbolic
tgoto, tputs: Perfonns tenninal
input and output. fread,
from files. xlist,
gamma: Performs log
function.
conversions. ecvt, fcvt,
adb: Invokes a
report. imacct:
catab file. charmap:
tenninal. ctermid:
ptx:
random:

fonnatter.
.•..•.....
FORTRAN into standard FORTRAN.
FORTRAN. ratfor: Converts
fp_off, fp_seg: Return offset
fprintf, sprintf: Fonnats
fp_seg: Return offset and
fputc, fputchar: Write a
fputc, putw: Puts a character or
fputchar: Write a character to a
fputs: Puts a string on a
fread, fwrite: Perfonns buffered
free, realloc, calloc: Allocates
freopen, fdopen: Opens a stream.
frexp, ldexp, modf: Splits
fsave: Interactive,
fscanf, sscanf: Converts and
fsck: Checks and repairs file
fsdb: File system debugger.
fseek, ftell, rewind: . . . .
fsphoto: Performs periodic .
fstab: File system mount and
fstat: Gets file status.
ftell, rewind: Repositions a
ftime: Gets time and date.
ftok: Standard interprocess
ftw: Walks a file tree.
function and complementary error
function.
function keys. . • . . .
function. . . . • . . •
function. erf, erfc: Error
functions. /absolute value,
functions. /asin, acos, atan,
functions. bessel, jO, jl, . .
functions. curses:
functions. /delete, firstkey,
functions. /exponential,
functions. intro: Introduction
functions. sinh, . . . • .
functions. /tgetflag, tgetstr,
fwrite: Performs buffered binary
fxlist: Gets name list entries
gamma function. . . . . .
gamma: Perfonns log gamma
gcvt: Performs output . . • •
general-purpose debugger.
Generate an IMAGEN accounting
Generate troffwidth files and
Generates a filename for a
Generates a permuted index.
Generates a random number.

nroff(CT)
ratfor(CP)
ratfor(CP)
fp_seg(DOS)
printf(S)
fp_seg(DOS)
fputc(DOS)
putc(S)
fputc(DOS)
puts(S)
fread(S)
malloc(S)
fopen(S)
frexp(S)
fsave(ADM)
scanf(S)
fsck(ADM)
fsdb(ADM)
fseek(S)
fsphoto(ADM)
fstab(F)
stat(S)
fseek(S)
time(S)
stdipc(S)
ftw(S)
erf(S)
gamma(S)
setkey(C)
matherr(S)
erf(S)
floor(S)
trig(S)
bessel(S)
curses(S)
dbm(S)
exp(S)
intro(DOS)
sinh(S)
terrncap(S)
fread(S)
xlist(S)
gamma(S)
gamma(S)
ecvt(S)
adb(CP)
imacct(C)
charmap(CT)
ctennid(S)
ptx(CT)
random(C)

1-23

Permuted Index

rand, srand:
makekey:
abort:
cflow:
cross-reference. cxref:
numbers. ncheck:
analysis. lex:
srand48, seed48, lcong48:
Micnet alias hash table
character or word from a/
character or word from a/ getc,
character.
current working directory.
getuid, geteuid, getgid,
environment name.
real user, effective/ getuid,
effective/ getuid, geteuid,
setgrent, endgrent: Get group/
endgrent: Get group/ getgrent,
Get group/ getgrent, getgrgid,
argument vector.

process group, and/ getpid,
process, process group, and/
group, and/ getpid, getpgrp,
user ID.
setpwent, endpwent: Gets/
Gets/ getpwent, getpwuid,
endpwent: Gets/ getpwent,
fgetc, fgetchar:
getch:
shmget:
cgets:
gets, fgets:
input. gets:
getche:
ulimit:
getc, getchar, fgetc, getw:
dosexterr:
nlist:
a stream.
umask: Sets and
stat, fstat:
ustat:
standard input.
getlogin:
logname:
msgget:

1-24

Generates a random number.
Generates an encryption key.
Generates an lOT fault.
Generates C flow graph.
Generates C program
Generates names from inode
Generates programs for lexical
Generates uniformly distributed.
generator. aliashash:
getc, getchar, fgetc, getw: Gets
getch: Gets a character.
getchar, fgetc, getw: Gets
getche: Gets and echoes a
getcwd: Get the pathname of
getegid: Gets real user,!
getenv: Gets value for
geteuid, getgid, getegid: Gets
getgid, getegid: Gets real user,
getgrent, getgrgid, getgmam,
getgrgid, getgmam, setgrent,
getgmam, setgrent, endgrent:
getlogin: Gets login name.
getopt: Gets option letter from
getopt: Parses command options.
getpass: Reads a password.
getpgrp, getppid: Gets process,
getpid, getpgrp, getppid: Gets
getppid: Gets process, process
getpw: Gets password for a given
getpwent, getpwuid, getpwnam,
getpwnam, setpwent, endpwent:
getpwuid, getpwnam, setpwent,
Gets a character from a stream.
Gets a character.
Gets a shared memory segment.
Gets a string.
Gets a string from a stream.
Gets a string from the standard
Gets and echoes a character.
Gets and sets user limits.
Gets character or word from a/
Gets DOS error messages.
Gets entries from name list.
gets, fgets: Gets a string from
gets file creation mask.
Gets file status.
Gets file system statistics.
gets: Gets a string from the
Gets login name.
Gets login name.
Gets message queue.

rand(S)
makekey(M)
abort(S)
cflow(CP)
cxref(CP)
ncheck(ADM)
lex(CP)
drand48(S)
aliashash(ADM)
getc(S)
getch(DOS)
getc(S)
getche(DOS)
getcwd(S)
getuid(S)
getenv(S)
getuid(S)
getuid(S)
getgrent(S)
getgrent(S)
getgrent(S)
getlogin(S)
getopt(S)
getopt(C)
getpass(S)
getpid(S)
getpid(S)
getpid(S)
getpw(S)
getpwent(S)
getpwent(S)
getpwent(S)
fgetc(DOS)
getch(DOS)
shmget(S)
cgets(DOS)
gets(S)
gets(CP)
getche(DOS)
ulimit(S)
getc(S)
dosexter(DOS)
nlist(S)
gets(S)
umask(S)
stateS)
ustat(S)
gets(CP)
getlogin(S)
logname(C)
msgget(S)

Permuted Index

files. xlist, fxlist:
system. uname:
vector. getopt:
/getpwnam, setpwent, endpwent:
ID. getpw:
times. times:
getpid, getpgrp, getppid:
real! /geteuid, getgid, getegid:
semget:
file pointer. tell:
filelength:
cuserid:
tty:
time, ftime:
getenv:
modes, speed, and line/
ct: spawn
settings used by getty.
and terminal settings used by
getegid: Gets real user,!
from a/ getc, getchar, fgetc,
of directories. Is:
date and time/ ctime,localtime,
longjmp: Performs a nonlocal
and checks access to a resource
cflow: Generates C flow
file for a pattern.
/real user, effective user, real
/getppid: Gets process, process
newgrp: Logs user into a new
copy: Copies
updates, and regenerates
signals. ssignal,
shutdn: Flushes block I/O and
file systems and shuts down the/
serial sequence packet protocol
ips, isbs, ipbs: IMAGEN protocol
nohup: Runs a command immune to
cmchk: Reports
dparam: Displays/changes
hd: Internal
hcreate, hdestroy: Manages
aliashash: Micnet alias
spell, hashmake, spellin,
Finds spelling errors. spell,
search tables. hsearch,
hexadecimal format.
tables. hsearch, hcreate,
executable binary files.

Gets name list entries from
Gets name of current XENIX
•
Gets option letter from argument
Gets password file entry.
Gets password for a given user
Gets process and child process
Gets process, process group, and/ .
Gets real user, effective user,
Gets set of semaphores.
Gets the current position of the
Gets the length of a file.
Gets the login name of the user.
Gets the terminal's name.
Gets time and date. . . . . .
Gets value for environment name.
getty: Sets terminal type,
getty to a remote terminal
gettydefs: Speed and terminal
getty. gettydefs: Speed
getuid, geteuid, getgid,
getw: Gets character or word
Gives information about contents
gmtime, asctime, tzset: Converts
.
"goto". setjmp, . • • . • . . .
governed by a semaphore. /Awaits
graph. . . . . . . • . • .
grep, egrep, fgrep: Searches a
group, and effective group IDs.
group, and parent process IDs.
group. • • . • . . . . . .
..•...
groups of files.
.
groups of programs. /Maintains,
grpcheck: Checks group file.
gsignal: Implements software
halts the CPU. . . . • . •
haltsys, reboot: Closes out the
handler. ips: Imagen
handlers. . . • . . •
hangups and quits.
hard disk block size.
hard disk characteristics.
hard disk drive.
hash search tables. hsearch,
hash table generator.
hashcheck: Finds spelling/ • .
hashmake, spellin, hashcheck:
hcreate, hdestroy: Manages hash
••.••.
hd: Displays files in
hd: Internal hard disk drive.
hdestroy: Manages hash search
hdr: Displays selected parts of

xlist(S)
uname(S)
getopt(S)
getpwent(S)
getpw(S)
times(S)
getpid(S)
getuid(S)
semget(S)
tell(DOS)
fileleng(DOS)
cuserid(S)
tty(C)
time(S)
getenv(S)
getty(M)
ct(C)
gettydefs(F)
gettydefs(F)
getuid(S)
getc(S)
Is (C)
ctime(S)
setjmp(S)
waitsem(S)
cflow(CP)
grep(C)
getuid(S)
getpid(S)
newgrp(C)
copy(C)
make(CP)
grpcheck(C)
ssignal(S)
shutdn(S)
haltsys(ADM)
ips(ADM)
ips(ADM)
nohup(C)
cmchk(C)
dparam(ADM)
hd(HW)
hsearch(S)
aliashash(ADM)
spell(CT)
spell(CT)
hsearch(S)
hd(C)
hd(HW)
hsearch(S)
hdr(CP)

1-25

Permuted Index

Changes executable binary file
user.
program. assert:
hd: Displays files in
Machine: Description of
Manages hash search tables.
between imPRESS format and
information.
sinh, cosh, tanh: Performs
hyphen: Finds
Euclidean distance.
chgrp: Changes group
chown: Changes owner
and names.
setpgrp: Sets process group
mkuser: Adds a login
systemid: The Micnet system
devnm:
what:
Gets password for a given user
idleout: Logs out
id: Prints user and group
group, and parent process
real group, and effective group
setgid: Sets user and group
accounting report.
core: Format of core
mem, krnem: Memory
imacct: Generate an
imprint: Prints text files on an
imprint: print text files on an
/imagen.spp, imagen.remote:
itroff: Troffto an
ipr,oldipr: Put files onto the
ips, isbs, ipbs:
protocol handler. ips:
imagen.remote:/ imagen.sbs,
/imagen.pbs, imagen.spp,
imagen.spp, imagen.remote:/
MAGEN/ imagen.sbs, imagen. pbs,
nohup: Runs a command
ssignal, gsignal:
deco, enco: Convert between
catimp: Convert C/A/T files to
dviimp: Convert DVI files to
IMAGEN printer.
IMAGEN printer.
backup:
dump:

1-26

headers. fixhdr: . . . • • . . •
•
hello: Send a message to another
Helps verify validity of
hexadecimal format.
host machine. . • . . .
hsearch, hcreate, hdestroy:
human-readable format. /Convert .
hwconfig: Read the configuration .
hyperbolic functions. . . • . .
hyphen: Finds hyphenated words. •
hyphenated words.
hypot, cabs: Determines
ID. . . . . . . . .
ID. . . . . . . . . . .
id: Prints user and group IDs
ID. . . . . .
ID to the system. . . .
identification file.
Identifies device name.
Identifies files.
ID. getpw: . . . . .
.....
idle users.
idle out: Logs out idle users.
IDs and names.
IDs. /Gets process, process
IDs. /real user, effective user,
IDs. setuid, • • • . . . • .
imacct: Generate an IMAGEN
.....••
image file.
....•••
image file.
IMAGEN accounting report.
IMAGEN printer.
IMAGEN printer.
IMAGEN printer interface/
IMAGEN printer.
IMAGEN printer queue. . • .
IMAGEN protocol handlers.
Imagen serial sequence packet
imagen. pbs, imagen.spp,
imagen.remote: IMAGEN printer/ .
imagen.sbs, imagen.pbs, . .
imagen.spp, imagen. remote:
immune to hangups and quits.
Implements software signals.
imPRESS format and/
imPRESS format.
imPRESS format.
imprint: print text files on an
imprint: Prints text files on an
Incremental dump tape format.
Incremental dump tape format.

fixhdr(C)
hello(ADM)
assert(S)
hd(C)
machine(HW)
hsearch(S)
deco(CT)
hwconfig(ADM)
sinh(S)
hyphen(CT)
hyphen(CT)
hypot(S)
chgrp(C)
chown(C)
id(C)
setpgrp(S)
mkuser(ADM)
systemid(F)
devnm(C)
what(C)
getpw(S)
idleout(ADM)
idleout(ADM)
id(C)
getpid(S)
getuid(S)
setuid(S)
imacct(C)
core(F)
mem(M)
imacct(C)
imprint(C)
imprint(CT)
imagen(M)
itroff(CT)
ipr(C)
ips (ADM)
ips (ADM)
imagen(M)
imagen(M)
imagen(M)
imagen(M)
nohup(C)
ssignal(S)
deco(CT)
catimp(CT)
dviimp(CT)
imprint(CT)
imprint(C)
backup(F)
dump(F)

Permuted Index

backup: Performs
dump: Performs
restore, restor: Invokes
ptx: Generates a permuted
and teletypes last:
!Default backup device
hwconfig: Read the configuration
pstat: Reports system
prints lineprinter status
initialization. init,
initialization.
init, inir: Process control
process. popen, pc1ose:
terminals file.
clri: Clears
inode: Format of an
ncheck: Generates names from
fwrite: Performs buffered binary
Performs standard buffered
Pushes character back into
usemouse: Maps mouse
Converts and formats console
Gets a string from the standard
sscanf: Converts and formats
Eliminates .so's from nroff
uustat: uucp status
script.
install:
creatsem: Creates an

call.
call.
abs: Returns an
/164a: Converts between long
sput!, sgetl: Accesses long
the absolute value of a long
/1to13: Converts between 3-byte
itoa: Converts numbers to
ltoa: Converts long
between 3-byte integers and long
atol, atoi: Converts string to
for Object Modules. 86rel:
file system backup fsave:
imagen.remote: IMAGEN printer
scsi: Small computer systems
termio: General terminal
/, tty2[a-h] ,tty2[A-H]:
tty: Special terminal

incremental file system backup.
incremental file system backup.
incremental file system/ . .
index. . . . . . . . . .
Indicate last logins of users
information.
information.
information.
information. lpstat:
inir: Process control
init, inir: Process control
initialization.
Initiates I/O to or from a
inittab: Alternative login
inode. • . . . . . .
inode: Format of an inode.
inode.
inode numbers.
inp: Returns a byte.
input and output. fread,
input and output. stdio:
input stream. ungetc:
input to keystrokes
input. cscanf:
input. gets:
input. scanf, fscanf,
input. soelim: . . .
inquiry and job control.
install: Installation shell
Installation shell script.
instance of a binary semaphore.
int86: Executes an interrupt.
int86x: Executes an interrupt.
intdos: Invokes a DOS system
intdosx: Invokes a DOS system
integer absolute value.
integer and base 64 ASCII.
integer data in a/ . . . .
integer. labs: Returns . .
integers and long integers.
integers. . . • . . .
integers to characters. .
integers. /1to13: Converts
integer. strtol,
Intel 8086 Relocatable Format
Interactive, error-checking . .
interface scripts. /imagen.spp,
interface. . . . . . .
interface. • . • . . .
Interface to serial ports.
interface. . . . • . .

backup(C)
dump(C)
restore(C)
ptx(CT)
last(C)
archive(F)
hwconfig(ADM)
pstat(C)
Ipstat(C)
init(M)
init(M)
init(M)
popen(S)
inittab(F)
c1ri(ADM)
inode(F)
inode(F)
ncheck(ADM)
inp(DOS)
fread(S)
stdio(S)
ungetc(S)
usemouse( C)
cscanf(DOS)
gets(CP)
scanf(S)
soelim(CT)
uustat(C)
install(M)
install(M)
creatsem(S)
int86(DOS)
int86x(DOS)
intdos(DOS)
intdosx(DOS)
abs(S)
a641(S)
sputl(S)
labs(DOS)
13tol(S)
itoa(DOS)
Itoa(DOS)
13tol(S)
strtol(S)
86rel(F)
fsave(ADM)
imagen(M)
scsi(HW)
termio(M)
serial(HW)
tty(M)

1-27

Permuted Index

lp 1, Ip2: Line printer device
hd:
spline:
sh: Invokes the shell command
csh: Invokes a shell command
a restricted shell (command
ipcs: Reports the status of
package. ftok: Standard
pipe: Creates an
int86: Executes an
int86x: Executes an
sleep: Suspends execution for an
sleep: Suspends execution for an
Suspends execution for a short
services, library routines and/
processing commands.
commands.
Development System commands.
development functions.
formats.
miscellaneous features and/
related miscellaneous features/
library routines and/ intro:
commands. intro:
intro:
System commands. intro:
development functions. intro:
intro:
miscellaneous features/ intro:
features and files. intro:
bc:
yacc:
bdos:
intdos:
intdosx:
debugger. adb:
m4:
calendar:
(command interpreter). rsh:
red:
display/ vi, view, vedit:
interpreter with C-like/ csh:
ex:
calculator. dc:
restore, restor:
sdb:
cc:
ld:
ld:
interpreter. sh:
sed:

1-28

interfaces. lp, IpO,
Internal hard disk drive.
Interpolates smooth curve.
interpreter. . . . . . .
interpreter with C-like syntax.
interpreter). rsh: Invokes
inter-process communication/
interprocess communication
interprocess pipe.
interrupt.
interrupt.
interval.
interval.
interval. nap:
intro: Introduces system
intro: Introduces text
intro: Introduces XENIX
intro: Introduces XENIX
intro: Introduction to DOS cross
intro: Introduction to file
intro: Introduction to . . . . •
intro: Introduction to machine
Introduces system services,
Introduces text processing
Introduces XENIX commands.
Introduces XENIX Development
Introduction to DOS cross
Introduction to file formats.
Introduction to machine related
Introduction to miscellaneous
Invokes a calculator.
Invokes a compiler-compiler.
Invokes a DOS system call.
Invokes a DOS system call.
Invokes a DOS system call.
Invokes a general-purpose
Invokes a macro processor.
Invokes a reminder service.
Invokes a restricted shell
Invokes a restricted version of.
Invokes a screen-oriented
Invokes a shell command
Invokes a text editor.
Invokes an arbitrary precision
Invokes incremental file system/
Invokes symbolic debugger.
Invokes the C compiler.
Invokes the link editor.
Invokes the link editor.
Invokes the shell command
Invokes the stream editor.

Ip(HW)
hd(HW)
spline(CP)
sh(C)
csh(C)
rsh(C)
ipcs(ADM)
stdipc(S)
pipe(S)
int86(DOS)
int86x(DOS)
sleep(C)
sleep(S)
napeS)
Intro(S)
Intro(CT)
Intro(C)
Intro(CP)
intro(DOS)
Intro(F)
Intro(M)
Intro(HW)
Intro(S)
Intro(CT)
Intro(C)
Intro(CP)
intro(DOS)
Intro(F)
Intro(HW)
Intro(M)
bc(C)
yacc(CP)
bdos(DOS)
intdos(DOS)
intdosx(DOS)
adb(CP)
m4(CP)
calendar(C)
rsh(C)
red(C)
vi(C)
csh(C)
exeC)
dc(C)
restore(C)
sdb(CP)
cc(CP)
Id(CP)
Id(M)
sh(C)
sed(C)

Permuted Index

ed:
masm:
shutdn: Flushes block
popen, pc1ose: Initiates
devices.
abort: Generates an
ips, isbs,
semaphore set or shared memory.
inter-process communication!
IMAGEN printer queue.
DVI format.
packet protocol handler.
handlers.
/islower, isdigit, isxdigit,
isdigit, isxdigit,! ctype,
/isprint, isgraph, iscntrl,
device.
terminal. ttyname,
handlers. ips,
/ispunct, isprint, isgraph,
/isalpha, isupper, is lower,
/isspace, ispunct, isprint,
ctype, isalpha, isupper,
/isalnum, isspace, ispunct,
/isxdigit, isalnum, isspace,
/isdigit, isxdigit, isalnum,
isxdigit,! ctype, isalpha,
/isupper, islower, isdigit,
news: Print news
integers.
printer.
Bessel functions. bessel,
Bessel functions. bessel, jO,
functions. bessel, jO, j 1,
join:
keystroke.
test keyboard support
error:
makekey: Generates an encryption
keyboard: The PC
support kbmode: Set
Set keyboard mode or test
setkey: Assigns the function
kbhit: Checks the console for a
usemouse: Maps mouse input to
process or a group off
mem,
contents of directory.

ed(C)
Invokes the text editor.
masm(CP)
Invokes the XENIX assembler.
shutdn(S)
I/O and halts the CPU.
popen(S)
I/O to or from a process.
ioctl(S)
ioct1: Controls character
abort(S)
lOT fault.
•..••
ipbs: IMAGEN protocol handlers. • ips(ADM)
ipcrm(ADM)
ipcrm: Removes a message queue,
ipcs(ADM)
ipcs: Reports the status of
ipr(C)
ipr, oldipr: Put files onto the
iprint(C)
iprint: Converts text files to
ips(ADM)
ips: Imagen serial sequence
ips, isbs, ipbs: IMAGEN protocol • ips(ADM)
ctype(S)
isalnum, isspace, ispunct,/
ctype(S)
isalpha, isupper, islower,
ctype(S)
isascii, tolower, toupper,!
isatty(DOS)
isatty: Checks for a character
ttyname(S)
isatty: Finds the name of a . .
ips(ADM)
isbs, ipbs: IMAGEN protocol
ctype(S)
iscntrl, isascii, tolower,! . •
ctype(S)
isdigit, isxdigit, isalnum,!
ctype(S)
isgraph, iscntrl, isascii,/
ctype(S)
islower, isdigit, isxdigit,/
ctype(S)
isprint, isgraph, iscntrl,/
ctype(S)
ispunct, isprint, isgraph,/
ctype(S)
isspace, ispunct, isprint,/
ctype(S)
isupper, islower, isdigit,
ctype(S)
isxdigit, isalnum, isspace,/
news(C)
items. . . • . • • . . .
itoa(DOS)
itoa: Converts numbers to
itroff(CT)
itroff: Troffto an IMAGEN
bessel(S)
jO, j 1, jn, yO, y 1, yn: Perfonns
bessel(S)
jl,jn, yO, yl, yn: Perfonns .
bessel(S)
jn, yO, y 1, yn: Performs Bessel
join(C)
join: Joins two relations.
join(C)
Joins two relations. . . . . .
kbhit(DOS)
kbhit: Checks the console for a
kbmode(ADM)
kbmode: Set keyboard mode or
error(M)
Kernel error output device.
makekey(M)
key. . . . . . • • . . . . .
keyboard(HW)
keyboard.
•.••....
kbmode(ADM)
keyboard mode or test keyboard
kbmode(ADM)
keyboard support kbmode:
keyboard(HW)
keyboard: The PC keyboard.
setkey(C)
keys.
kbhit(DOS)
keystroke.
.....
usemouse( C)
keystrokes . . . • .
kill(S)
kill: Sends a signal to a
kill(C)
kill: Tenninates a process.
mem(M)
kmem: Memory image file.
I(C)
1: Lists infonnation about

1-29

Permuted Index

3-byte integers and long/
integer and base 64/ a641,
of a long integer.
cpp: The C
lint: Checks C
diction: Checks
explain: Corrects
shl: Shell
columns.
distributed. srand48, seed48,

floating-point number/ frexp,
filelength: Gets the
strlen: Returns the
getopt: Gets option
banner: Prints large
lexical analysis.
lex: Generates programs for
and update. lsearch,
ar: Maintains archives and
Converts archives to random
/Introduces system services,
ordering relation for an object
ulimit: Gets and sets user
line: Reads one
lsearch, lfind: Performs
col: Filters reverse
lpr: Sends files to the
lpshut, lpmove: Starts/stops the
Ipadmin: Configures the
lpstat: prints
cancel: Send/cancel requests to
Adds, reconfigures and maintains
files. comm: Selects or rejects
uniq: Reports repeated
look: Finds
head: Prints the first few
paste: Merges
wc: Counts
ld: Invokes the
ld: Invokes the
a.out: Format of assembler and
existing file.
In: Makes a
dosld: XENIX to MS-DOS cross
existing file. link:
and syntax.
xlist, fxlist: Gets name
look: Finds lines in a sorted
nlist: Gets entries from name

1-30

13tol(S)
13tol, lto13: Converts between
a641(S)
164a: Converts between long
labs(DOS)
labs: Returns the absolute value
cpp(CP)
language preprocessor.
lint(CP)
language usage and syntax.
diction(CT)
language usage.
explain(CT)
language usage. . . • • •
shl(C)
layer manager.
Ie(C)
Ie: Lists directory contents in
drand48(S)
Icong48: Generates uniformly
Id(CP)
ld: Invokes the link editor.
Id(M)
ld: Invokes the link editor.
frexp(S)
ldexp, modf: Splits
fileleng(DOS)
length of a file.
strlen(DOS)
length of a string.
getopt(S)
letter from argument vector.
banner(C)
letters. • • . • • . • . . •
lex(CP)
lex: Generates programs for
lex(CP)
lexical analysis. • . • • •
Isearch(S)
lfind: Performs linear search
ar(CP)
libraries. • . . • . . .
ranlib(CP)
libraries. ranlib: • • . • .
Intro(S)
library routines and error/
10rder(CP)
library. lorder: Finds
ulimit(S)
limits. . . . . . • • •
line(C)
line. • • • . . • . • .
Isearch(S)
linear search and update.
col(CT)
linefeeds.
•••.•
Ipr(C)
lineprinter queue for printing.
Ipsched(ADM)
lineprinter request. lpsched,
Ipadmin(ADM)
lineprinter spooling system.
Ipstat(C)
lineprinter status information.
Ip(C)
lineprinter. lp,lpr,
Ipinit(ADM)
lineprinters. lpinit: • • • .
comm(C)
lines common to two sorted
uniq(C)
lines in a file.
• • . • • . 100k(CT)
lines in a sorted list.
head(C)
lines of a stream.
lines of files.
. • . . • • . paste(CT)
wc(C)
lines, words and characters.
Id(CP)
link editor.
Id(M)
link editor. . • • . . •
a.out(F)
link editor output.
• link(S)
link: Links a new filename to an
In(C)
link to a file.
.•••.
dosld(CP)
linker.
link(S)
Links a new filename to an • •
lint(CP)
lint: Checks C language usage
xlist(S)
list entries from files.
100k(CT)
list.
nlist(S)
list. . • • . • • •

Permuted Index

nm: Prints name
by fsck. checklist:
terminals:
varargs: variable argument
cref: Makes a cross-reference
of a varargs argument
columns. Ie:
of directory. 1:
who:
tzset: Converts date and/ ctime,
end, etext, edata: Last
memory.
memory. plock:
record locking on files.
region for reading or writing.
Provide semaphores and record
memory. lock:
lock:
for reading or/ locking:
gamma: Performs
exponential, logarithm,/ exp,
logarithm,! exp, log, pow, sqrt,
/log 10: Performs exponential,
mkuser: Adds a
getlogin: Gets
logname: Gets
cuserid: Gets the
logname: Finds
passwd: Changes
chsh: changes user
terminal:
inittab: Alternative
ttys:
Sets up an environment at
last: Indicate last
user.
idleout:
newgrp:
"goto". setjmp,
for an object library.
uppercase. strupr: Converts
Converts uppercase characters to
device interfaces.
requests to lineprinter.
device interfaces. lp,
interfaces. Ip, IpO,
interfaces. lp, IpO, Ip1,
lineprinter spooling system.

list. • • . • . . • . • • .
List of file systems processed
List of supported terminals.
list. • • . • • . • . • • •
listing. • . • • . • . • . • .
list. /Prints formatted output
Lists directory contents in
.
Lists information about contents
Lists who is on the system.
In: Makes a link to a file.
localtime, gmtime, asctime,
locations in program.
lock: Locks a process in primary
lock: Locks a user's terminal.
Lock process, text, or data in . .
lockf: Provide semaphores and
locking: Locks or unlocks a file
locking on files. lockf:
•.••.
Locks a process in primary
Locks a user's terminaL
Locks or unlocks a file region
log gamma function.
log, pow, sqrt, log 10: Performs
log10: Performs exponential,
logarithm, power, square root/
login ID to the system.
login name. • • . • .
login name. • . . • .
login name of the user.
login name of user. • . • • . • •
login password.
. • • . • •
login shell in password file.
Login terminal.
login terminals file.
Login terminals file.
login time. profile:
logins of users and teletypes
logname: Finds login name of
logname: Gets login name.
Logs out idle users.
Logs user into a new group.
longjmp: Performs a nonlocal
lorder: Finds ordering relation
lowercase characters to
lowercase. strlwr:
lp, IpO, lpl, Ip2: Line printer
lp, lpr, cancel: Send/cancel
IpO, Ip1, Ip2: Line printer
Ip1, Ip2: Line printer device
Ip2: Line printer device • • . • •
Ipadmin: Configures the • •

nm(CP)
checklist(F)
terminals(M)
varargs(S)
cref(CP)
vprintf(S)
Ie(C)
1(C)
who(C)
In(C)
ctime(S)
end(S)
10ck(S)
10ck(C)
plock(S)
10ckf(S)
10cking(S)
10ckf(S)
10ck(S)
10ck(C)
10cking(S)
gamma(S)
exp(S)
exp(S)
exp(S)
mkuser(ADM)
getlogin(S)
10gname(C)
cuserid(S)
10gname(S)
passwd(C)
chsh(ADM)
terminal(HW)
inittab(F)
ttys(F)
profile(M)
last(C)
10gname(S)
10gname(C)
idleout(ADM)
newgrp(C)
setjmp(S)
10rder(CP)
strupr(DOS)
strlwr(DOS)
Ip(HW)
Ip(C)
Ip(HW)
Ip(HW)
Ip(HW)
Ipadmin(ADM)

1-31

Permuted Index

maintains lineprinters.
lineprinter/ Ipsched, Ipshut,
requests to lineprinter. Ip,
lineprinter queue for printing.
attached to the user's terminal
Starts/stops the lineprinter/
lineprinter request. Ipsched,
status information.
contents of directories.
search and update.
pointer.
characters.
integers and long/ 13tol,
machine.
Machine: Description of host
features/ intro: Introduction to
Accesses long integer data in a
m4: Invokes a
mmcheck: Checks usage of MM
formatted with the mm
program. tape:
tapedump: Dumps
of mail.
daemon.mn: Micnet
Sends, reads or disposes of
binary file for transmission via
binary file for transmission via
free, realloc, calloc: Allocates
fdisk:
libraries. ar:
Ipinit: Adds, reconfigures and
regenerates groups off make:
systty: System
tape: Magnetic tape
key.
cref:
execseg:
SCCS file. delta:
mkdir:
or ordinary file. mknod:
In:
mktemp:
another user. su:
Allocates main memory.
shl: Shell layer
tsearch, tfind, tdelete, twalk:
hsearch, hcreate, hdestroy:
/floating-point number into a
ascii:
mapping.

1-32

Ipinit(ADM)
Ipinit: Adds, reconfigures and
Ipsched(ADM)
lpmove: Starts/stops the
Ip(C)
Ipr, cancel: Send/cancel
Ipr(C)
lpr: Sends files to the
Iprint(C)
Iprint: Print to a printer
Ipsched(ADM)
Ipsched, Ipshut, Ipmove:
Ipsched(ADM)
lpshut, Ipmove: Starts/stops the
Ipstat(C)
Ipstat: prints lineprinter
Is(C)
Is: Gives information about
Isearch(S)
lsearch, lfind: Performs linear
Iseek(S)
Iseek: Moves read/write file
Itoa(DOS)
ltoa: Converts long integers to
13tol(S)
lto13: Converts between 3-byte
m4(CP)
m4: Invokes a macro processor.
machine(HW)
Machine: Description of host .
machine(HW)
machine. . . . • • . . . .
Intro(HW)
machine related miscellaneous
sput1(S)
machine-independent. /sget1:
m4(CP)
macro processor.
.....
checkmm(CT)
macros. checkmm, . . . . .
mm(CT)
macros. mm: Prints documents
tape(C)
Magnetic tape maintenance
tapedump(C)
magnetic tape to output file.
mail(C)
mail: Sends, reads or disposes
daemon.mn(M)
mailyr daemon.
•.•..
mail(C)
mail. mail: . . • . . • .
uuencode(C)
mail uudecode: decode a
uuencode(C)
mail uuencode: encode a
malloc(S)
main memory. malloc,
fdisk(ADM)
Maintain disk partitions.
ar(CP)
Maintains archives and
Ipinit(ADM)
maintains lineprinters.
make(CP)
Maintains, updates, and
systty(M)
maintenance device.
tape(C)
maintenance program.
makekey(M)
makekey: Generates an encryption
cref(CP)
Makes a cross-reference listing.
. execseg(S)
makes a data region executable.
delta(CP)
Makes a delta (change) to an .
mkdir(C)
Makes a directory. . . . . •
mknod(S)
Makes a directory, or a special
In(C)
Makes a link to a file. . . . .
mktemp(S)
Makes a unique filename.
su(C)
Makes the user a super-user or
malloc(S)
malloc, free, realloc, calloc:
shl(C)
manager. . . . . • • . .
tsearch(S)
Manages binary search trees.
hsearch(S)
Manages hash search tables.
frexp(S)
mantissa and an exponent.
ascii(M)
Map of the ASCII character set.
mapchan(M)
mapchan: Configure tty device

Permuted Index

mapping files.
convkey: Configure monitor!
mapchan: Fonnat of tty device
mapchan: Configure tty device
Configure monitor screen
usemouse:
Configure monitor! mapkey,
monitor screen/ mapkey, mapscrn,
diffmk:
umask: Sets file-creation mode
Sets and gets file creation
assembler.
master:
infonnation table.
Regular expression compile and
/neqn, checkeq, eqncheck: Fonnats
neqn: Fonnats
function.
mem, kmem:
lock: Locks a process in primary
shmctl: Controls shared
shmop: Perfonns shared
shmget: Gets a shared
Reports virtual
realloc, calloc: Allocates main
Lock process, text, or data in
queue, semaphore set or shared
administration! sysadmsh:
sort: Sorts and
paste:
sent to a tenninal.
msgctl: Provides
mkstr: Creates an error
msgop:
msgget: Gets
shared memory. ipcnn: Removes a
hello: Send a
console messages.
dosexterr: Gets DOS error
mesg: Permits or denies
Description of system console
ermo: Sends system error
telinit, mkinittab: Alternative
generator. aliashash:
faliases:
micnet: The
daemon.mn:
file. systemid: The
commands file.
top, top.next: The

mapchan: Fonnat of tty device
mapkey, mapscrn, mapstr,
mapping files. . . . • • .
mapping. . • . . . • • . •
mapping. /mapstr, convkey:
Maps mouse input to keystrokes
mapscrn, mapstr, convkey: . .
mapstr, convkey: Configure
Marks differences between files.
mask. . . . • . • • .
mask. umask: . . • • . . • •
masm: Invokes the XENIX
Master device infonnation table.
master: Master device
match routines. regexp:
mathematical text for nroff./
mathematics. . . • . . .
matherr: Error-handling
mem, kmem: Memory image file.
Memory image file.
memory.
memory operations.
. . . • .
memory operations.
• . . . .
memory segment.
memory statistics. vmstat:
memory. malloc, free,
memory. plock:
memory. /Removes a message
Menu driven system
merges files.
...... .
Merges lines of files.
mesg: Pennits or denies messages
message control operations.
message file from C source.
Message operations.
message queue.
message queue, semaphore set or
message to another user.
messages: Description of system
messages.
•.•.••
messages sent to a terminal.
messages. messages:
messages. /sys_nerr,
method of turning tenninals on!
Micnet alias hash table
Micnet aliasing files.
Micnet default commands file.
Micnet mailer daemon.
Micnet system identification
micnet: The Micnet default
Micnet topology files.

·

•
.

•

•
.

•
·

mapchan(F)
mapkey(M)
mapchan(F)
mapchan(M)
mapkey(M)
usemouse( C)
mapkey(M)
mapkey(M)
diffmk( CT)
umask(C)
umask(S)
masm(CP)
master(F)
master(F)
regexp(S)
eqn(CT)
neqn(CT)
matherr(S)
mem(M)
mem(M)
10ck(S)
shmctl(S)
shmop(S)
shmget(S)
vmstat(C)
malloc(S)
plock(S)
ipcnn(ADM)
sysadmsh(ADM)
sort(C)
paste(CT)
mesg(C)
msgctl(S)
mkstr(CP)
msgop(S)
msgget(S)
ipcnn(ADM)
hello(ADM)
messages(M)
dosexter(DOS)
mesg(C)
messages(M)
perror(S)
telinit(ADM)
aliashash(ADM)
aliases(M)
micnet(F)
daemon.mn(M)
systemid(F)
micnet(F)
top(F)

I-33

Permuted Index

/Introduction to machine related miscellaneous features and/
files. intro: Introduction to miscellaneous features and
mkdir: Creates a new directory.
mkdir: Makes a directory.
mkfs: Constructs a file system.
turning terminals on/ telinit, mkinittab: Alternative method of •
mknod: Builds special files.
special or ordinary file. mknod: Makes a directory, or a
file from C source. mkstr: Creates an error message
·
mktemp: Makes a unique filename.
system. mkuser: Adds a login ID to the
mmcheck: Checks usage of MM macros. checkmm, . . •
with the mm macros. mm: Prints documents formatted
•
macros. checkmm, mmcheck: Checks usage of MM
•
mmt: Typesets documents. . •
mnt: Mount a filesystem . . • .
system table. mnttab: Format of mounted file
vidi: Sets the font an_cl vig_eo mode for a video device.
umask: Sets file-creation mode mask. • . • • . • . .
chmod: Changes mode of a file. • • • . . . •
kbmode: Set keyboard mode or test keyboard support
setmode: Sets translation mode.
. . • • •
dial: Dials a modem. . . . . . .
uuchat: dials a modem.
• ..••.
getty: Sets terminal type, modes, speed, and line/
tset: Sets terminal modes.
• •.••.•
number into a/ frexp, ldexp, modf: Splits floating-point
settime: Changes the access and modification dates of files.
touch: Updates access and modification times of a file.
utime: Sets file access and modification times. • . .
Relocatable Format for Object Modules. 86rel: Intel 8086
profile. monitor: Prepares execution
/mapstr, convkey: Configure monitor screen mapping.
uusub: Monitor uucp network.
tty [Ol-n], color, monochrome, ega,. screen:
mnt: Mount a filesystem • • •
fstab: File system mount and check commands.
mount: Mounts a file structure.
mount: Mounts a file system.
mnttab: Format of mounted file system table.
!Default information for mounting filesystems. . .
mount: Mounts a file structure.
mount: Mounts a file system.
usemouse: Maps mouse input to keystrokes
mouse: System mouse.
• ••••.•
mouse: System mouse.
•.•••
specific address. movedata: Copies bytes from a
mvdir: Moves a directory.
directories. my: Moves or renames files and
lseek: Moves read/write file pointer.
utility mscreen: Serial multiscreens

1-34

Intro(HW)
Intro(M)
mkdir(DOS)
mkdir(C)
mkfs(ADM)
telinit(ADM)
mknod(C)
mknod(S)
mkstr(CP)
mktemp(S)
mkuser(ADM)
checkmm(CT)
mm(CT)
checkmm(CT)
mmt(CT)
mnt(C)
mnttab(F)
vidi(C)
umask(C)
chmod(S)
kbmode(ADM)
setmode(DOS)
dial(ADM)
dial(ADM)
getty(M)
tset(C)
frexp(S)
settime(ADM)
touch(C)
utime(S)
86rel(F)
monitor(S)
mapkey(M)
uusub(C)
screen(HW)
mnt(C)
fstab(F)
mount(ADM)
mount(S)
mnttab(F)
filesys(F)
mount(ADM)
mount(S)
usemouse(C)
mouse(HW)
mouse(HW)
movedata(DOS)
mvdir(C)
mv(C)
Iseek(S)
mscreen(M)

Permuted Index

do sid: XENIX to MS-DOS cross linker.
· ..•.
operations. msgctl: Provides message control
msgget: Gets message queue.
msgop: Message operations.
mscreen: Serial multiscreens utility • • . •
directories. mv: Moves or renames files and
mvdir: Moves a directory.
devnm: Identifies device name.
getlogin: Gets login name.
logname: Gets login name.
pwd: Prints working directory name.
tty: Gets the terminal's name.
Gets value for environment name. getenv:
ncheck: Generates names from inode numbers.
basename: Removes directory names from pathnames.
archive. dumpdir: Prints the names of files on a backup
term: Conventional names. • . . • • . • . .
Prints user and group IDs and names. id: • . . . • .
short interval. nap: Suspends execution for a
access to a resource! waitsem, nbwaitsem: Awaits and checks
inode numbers. ncheck: Generates names from
mathematical text forI eqn, neqn, checkeq, eqncheck: Formats
neqn: Formats mathematics.
network. netutil: Administers the XENIX
netutil: Administers the XENIX network. • . • • . • . • .
uusub: Monitor uucp network. ••• . . • . • .
text file. newform: Changes the format of a .
group. newgrp: Logs user into a new
news: Print news items. . . • . . . .
news: Print news items.
!fetch, store, delete, firstkey, nextkey: Performs database/
process. nice: Changes priority of a .
different priority. nice: Runs a command at a
nl: Adds line numbers to a file.
list. nlist: Gets entries from name •
nm: Prints name list.
hangups and quits. nohup: Runs a command immune to
setjmp, longjmp: Performs a nonlocal" goto".
false: Returns with a nonzero exit value.
nroff: A text formatter.
· .•..
soelim: Eliminates .so's from nroff input.
tbl: Formats tables for nroff or troff.
Formats mathematical text for nroff, troff. !eqncheck:
· ••..
Terminal driving tables for nroff. term: . • • . • · • . . •
constructs. deroff. Removes nroff/troff, tbl, and eqn
null: The null file.
null: The null file.
factor: Factor a number.
random: Generates a random number.
rand, srand: Generates a random number.
· . • . •
nl: Adds line numbers to a file.

dosld(CP)
msgctl(S)
msgget(S)
msgop(S)
mscreen(M)
mv(C)
mvdir(C)
devnm(C)
getlogin(S)
10gname(C)
pwd(C)
tty(C)
getenv(S)
ncheck(ADM)
basename( C)
durnpdir( C)
terrn(CT)
id(C)
napeS)
waitsern(S)
ncheck(ADM)
eqn(CT)
neqn(CT)
netutil(ADM)
netutil(ADM)
uusub(C)
newforrn(C)
newgrp(C)
news(C)
news(C)
dbrn(S)
nice(S)
nice(C)
nl(C)
nlist(S)
nm(CP)
nohup(C)
setjmp(S)
false(C)
nroff(CT)
soelim(CT)
tbl(CT)
eqn(CT)
term(F)
deroff(CT)
null(F)
null(F)
factor(C)
random(C)
rand(S)
nl(C)

1-35

Permuted Index

ultoa: Converts
itoa: Converts
atoi, atol: Converts ASCII to
Generates names from inode
library routines and error
a string to a double-precision
size: Prints the size of an
the printable strings in an
Finds ordering relation for an
8086 Relocatable Format for
a process until a signal
od: Displays files in
format.
of turning terminals on and
fp_off, fp_seg: Return
Invokes a restricted version
IMAGEN printer queue. ipr,
new file or rewrites an existing
ipr, oldipr: Put files
and writing. sopen:
opensem:
fopen, freopen, fdopen:
writing. open:
c1osedir: Performs directory
msgctl: Provides message control
rnsgop: Message
semctl: Controls semaphore
semop: Performs semaphore
shmctl: Controls shared memory
shmop: Performs shared memory
strdup: Performs string
vector. getopt: Gets
stty: Sets the
getopt: Parses command
library. lorder: Finds
a directory, or a special or
Copies file archives in and
dial: Establishes an
port.
ftushall: Flushes all
ecvt, fcvt, gcvt: Performs
cprintf: Formats
error: Kernel error
tapedump: Dumps magnetic tape to
/vsprintf: Prints formatted
outp: Writes a byte to an
pr: Prints files on the standard
of assembler and link editor
buffered binary input and
fprintf, sprintf: Formats

1-36

numbers to characters.
• • • • •
numbers to integers.
numbers. atof,
. . • • • •
numbers. ncheck: . • . . •
numbers. /system services,
number. strtod, atof: Converts
..•...••••
object file.
object file. strings: Finds
object library. lorder: . • • • • •
Object Modules. 86rel: Intel
occurs. pause: Suspends
octal format.
.••.•
od: Displays files in octal
off. /Alternative method
offset and segment. • . • • • • •
...•..
of. red:
oldipr: Put files onto the
one. creat: Creates a
•
onto the IMAGEN printer queue.
Opens a file for shared reading
Opens a semaphore.
Opens a stream. . . . . .
Opens file for reading or . • •
opehsem: Opens a semaphore.
operations.
operations.
operations.
operations.
operations.
operations.
operations.
operations.
. • . • •
option letter from argument
options for a terminal.
•..••••.
options.
ordering relation for an object
ordinary file. mknod: Makes
..••...•
out. cpio:
out-going terminal line/
outp: Writes a byte to an output
output buffers. . • •
output conversions.
output. • • • •
output device. • • •
output file.
output of a varargs/
output port. . . •
output. . . . . • • • • • •
output. a.out: Format
output. fread, fwrite: Performs
output. printf, • • • • . • •

ultoa(DOS)
itoa(DOS)
atof(S)
ncheck(ADM)
Intro(S)
strtod(S)
size(CP)
strings( CP)
10rder(CP)
86rel(F)
pause(S)
od(C)
od(C)
telinit(ADM)
fp_seg(DOS)
red(C)
ipr(C)
createS)
ipr(C)
sopen(DOS)
opensem(S)
fopen(S)
open(S)
opensem(S)
directory( S)
msgctl(S)
msgop(S)
semctl(S)
semop(S)
shmctl(S)
shmop(S)
string(S)
getopt(S)
stty(C)
getopt(C)
10rder(CP)
mknod(S)
cpio(C)
dial(S)
outp(DOS)
ftushall(DOS)
ecvt(S)
cprintf(DOS)
error(M)
tapedump(C)
vprintf(S)
outp(DOS)
pr(C)
a.out(F)
fread(S)
printf(S)

Permuted Index
standard buffered input and
chown: Changes the
chown: Changes
quot: Summarizes file system
and expands files.
interprocess communication
ips: Imagen serial sequence
Gets process, process group, and
getopt:
fdisk: Maintain disk
files. hdr: Displays selected

pwadmin: Perfonns
putpwent: Writes a
setpwent, endpwent: Gets
passwd: The
pwcheck: Checks
changes user login shell in
getpw: Gets
getpass: Reads a
passwd: Changes login
directory. getcwd: Get the
Delivers directory part of
Removes directory names from
Searches for and processes a
fgrep: Searches a file for a
a signal occurs.
keyboard: The
expands files. pack,
a process. popen,
bsearch:
setjmp,longjmp:
qsort:
floor, fabs, ceil, fmod:
bessel, jO, j I, jn, yO, y I, yn:
and output. fread, fwrite:
/delete, firstkey, nextkey:
c1osedir:
exp, log, pow, sqrt, logIO:
restores files. sysadmin:
sinh, cosh, tanh:
backup. backup:
backup. dump:
update. lsearch, lfind:
gamma:
ecvt, fcvt, gcvt:
administration. pwadmin:
system backups fsphoto:
functions. curses:

output. stdio: Perfonns
owner and group of a file.
owner ID.
•••.•.•
ownership. . • . • . . .
pack, pcat, unpack: Compresses
package. ftok: Standard • •
packet protocol handler. . • .
parent process IDs. /getppid:
Parses command options.
••.....
partitions.
parts of executable binary
passwd: Changes login password.
passwd: The password file.
password aging administration.
password file entry.
password file entry. /getpwnam,
password file.
password file. • . . . . •
password file. chsh:
password for a given user ID.
..... .
password.
...••..
password.
paste: Merges lines of files.
pathname of current working
pathname. dirname:
pathnames. basename:
pattern in a file. awk: . .
pattern. grep, egrep,
pause: Suspends a process until
PC keyboard. • . • • . . . .
pcat, unpack: Compresses and
pc1ose: Initiates I/O to or from
Perfonns a binary search.
Perfonns a nonlocal "goto".
Perfonns a quicker sort.
Perfonns absolute value, floor,!
Perfonns Bessel functions. . •
Perfonns buffered binary input
Perfonns database functions.
Perfonns directory operations.
Perfonns exponential, logarithm,!
Perfonns file system backups and
Perfonns hyperbolic functions.
Perfonns incremental file system
Perfonns incremental file system
Perfonns linear search and . •
Perfonns log gamma function.
Perfonns output conversions.
Perfonns password aging
Perfonns periodic semi-automated
Perfonns screen and cursor

•

·

·

·

stdio(S)
chown(S)
chown(C)
quot(C)
pack(C)
stdipc(S)
ips(ADM)
getpid(S)
getopt(C)
fdisk(ADM)
hdr(CP)
passwd(C)
passwd(F)
pwadmin(ADM)
putpwent(S)
getpwent(S)
passwd(F)
pwcheck(C)
chsh(ADM)
getpw(S)
getpass(S)
passwd(C)
paste(CT)
getcwd(S)
dirname(C)
basename( C)
awk(C)
grep(C)
pause(S)
keyboard(HW)
pack(C)
popen(S)
bsearch(S)
setjmp(S)
qsort(S)
floor(S)
bessel(S)
fread(S)
dbm(S)
directory(S)
exp(S)
sysadmin(ADM)
sinh(S)
backup(C)
dump(C)
Isearch(S)
gamma(S)
ecvt(S)
pwadmin(ADM)
fsphoto(ADM)
curses(S)

1-37

Permuted Index

semop:
operations. shmop:
and output. stdio:
strdup:
Itgetflag, tgetstr, tgoto, tputs:
tan, asin, acos, atan, atan2:
backups fsphoto: Performs
check the uucp directories and
chmod: Changes the access
to a terminal. mesg:
ptx: Generates a
acct: Format of
ermo: Sends system errorl
split: Splits a file into
pipe.
pipe: Creates an interprocess
tee: Creates a tee in a
data in memory.
rewind: Repositions a file
lseek: Moves read/write file
the current position of the file
or from a process.
outp: Writes a byte to an output
,tty2[A-H]: Interface to serial
exponential,1 exp, log,
/performs exponential, logarithm,
output.
dc: Invokes an arbitrary
statistical processing.
troff. cw, checkcw, cwcheck:
monitor:
processing. prep:
cpp: The C language
unget: Undoes a
lock: Locks a process in
types:
to a serial! consoleprint:
news:
printer. imprint:
the user's terminal lprint:
file. strings: Finds the
consoleprint: Print file to
terminal lprint: Print to a
lp, IpO, lpl, Ip2: Line
limagen.remote: IMAGEN
itroff: Troffto an IMAGEN
Put files onto the IMAGEN
Prints text files on an IMAGEN
print text files on an IMAGEN
disable: Turns off terminals and
Turns on terminals and line

1-38

Performs semaphore operations.
·
Performs shared memory
Performs standard buffered input
•
Performs string operations. .'
Performs terminal functions.
Performs trigonometricl leos,
periodic semi-automated system
•
permissions file uucheck:
permissions of a file orl
Permits or denies messages sent
permuted index. • . . . .
per-process accounting file.
perror, sys_errlist, sys_nerr,
pieces. . . . • . . • . •
pipe: Creates an interprocess
pipe.
. .....•.•
pipe.
• ....•...
plock: Lock process, text, or
pointer in a stream. Iftell,
pointer.
• .•..•.•
pointer. tell: Gets
popen, pelose: Initiates I/O to
port.
. .......•
ports. I, tty I [A-H] ,tty2[a-h]
pow, sqrt, log 10: Performs •
power, square root functions.
pr: Prints files on the standard
precision calculator.
prep: Prepares text for
Prepares constant-width text for
Prepares execution profile.
Prepares text for statistical •
preprocessor. • . . . . •
previous get of an SCCS file.
primary memory.
Primitive system data types.
Print file to printer attached
Print news items.
.....
print text files on an IMAGEN
Print to a printer attached to
printable strings in an object
printer attached to a serial! •
printer attached to the user's
printer device interfaces.
printer interface scripts. • • . . •
printer.
• .••••
printer queue. ipr, oldipr:
printer. imprint:
printer. imprint:
printers.
printers. enable:

semop(S)
shmop(S)
stdio(S)
string(S)
termcap(S)
trig(S)
fsphoto(ADM)
uucheck(ADM)
chmod(C)
mesg(C)
ptx(CT)
acct(F)
perror(S)
split(C)
pipe(S)
pipe(S)
tee(C)
plock(S)
fseek(S)
Iseek(S)
tell(DOS)
popen(S)
outp(DOS)
serial(HW)
exp(S)
exp(S)
pr(C)
dc(C)
prep(CT)
cw(CT)
monitor(S)
prep(CT)
cpp(CP)
unget(CP)
lock(S)
types(F)
consoleprint(ADM)
news(C)
irnprint(CT)
Iprint(C)
strings( CP)
consoleprint(ADM)
Iprint(C)
Ip(HW)
imagen(M)
itroff(CT)
ipr(C)
imprint(C)
imprint(CT)
disable(C)
enable(C)

Permuted Index

Formats output.
to the lineprinter queue for
cal:
prs:
sddate:
date:
activity. sact:
the mm macros. mm:
output. pr:
vprintf, vfprintf, vsprintf:
bann'er:
information. Ips tat:
nm:
acctcom: Searches for and
yes:
printer. imprint:
stream. head:
XENIX system. uname:
backup archive. dumpdir:
file. size:
names. id:
pwd:
nice: Changes
Runs a command at a different
acct: Enables or disables
acctcom: Searches for and prints
alarm: Sets a
times: Ge,s
init, inir:
exit: Terminates the calling
exit, _exit: Terminates a
fork: Creates a new
/getpgrp, getppid: Gets process,
setpgrp: Sets
process group, and parent
lock: Locks a
kill: Terminates a
nice: Changes priority of a
kill: Sends a signal to a
getpid, getpgrp, getppid: Gets
ptrace: Traces a
spawnl, spawnvp: Creates a new
ps: Reports
memory. plock: Lock
times: Gets process and child
wait: Waits fora child
pause: Suspends a
sigsem: Signals a
checklist: List of file systems
awk: Searches for and
to a process or a group of

printf, fprintf, sprintf: . . . • • •
printing. lpr: Sends files
Prints a calendar.
Prints an SCCS file.
Prints and sets backup dates.
Prints and sets the date.
Prints current SCCS file editing
Prints documents formatted with
•
Prints files on the standard
Prints formatted output of a/
Prints large letters.
prints lineprinter status
Prints name list.
prints process accounting files.
Prints string repeatedly.
Prints text files on an IMAGEN
Prints the first few lines of a
Prints the name of the current
Prints the names of files on a
Prints the size of an object
Prints user and group IDs and
Prints working directory name.
priority of a process.
priority. nice: • . . •
process accounting.
process accounting files.
process' alarm clock.
process and child process times.
•
Process control initialization.
process.
.••...•.••.
process.
process.
process group, and parenti
process group ID.
process IDs. /Gets process,
process in primary memory.
process.
process.
. •...•••
process or a group of processes.
process, process group, and/
process.
. ....
process.
• ••...
process status. . • • • •
process, text, or data in
process times. • • . • •
process to stop or terminate.
process until a signal occurs.
process waiting on a semaphore.
·
processed by fsck.
•••.•
processes a pattern in a file.
processes. kill: Sends a signal

printf(S)
Ipr(C)
cal(C)
prs(CP)
sddate(C)
date(C)
sact(CP)
mm(CT)
pr(C)
vprintf(S)
banner(C)
Ipstat(C)
nm(CP)
acctcom(ADM)
yes(C)
imprint(C)
head(C)
uname(C)
dumpdir(C)
size(CP)
id(C)
pwd(C)
nice(S)
nice(C)
acct(S)
acctcom(ADM)
alarm(S)
times(S)
init(M)
exit(DOS)
exit(S)
fork(S)
getpid(S)
setpgrp(S)
getpid(S)
10ck(S)
kill(C)
nice(S)
kill(S)
getpid(S)
ptrace(S)
spawn(DOS)
ps(C)
plock(S)
times(S)
wait(S)
pause(S)
sigsem(S)
checklist(F)
awk(C)
kill(S)

1-39

Permuted Index

Awaits completion of background
intro: Introduces text
shutdown: Terminates all
Prepares text for statistical
m4: Invokes a macro
Initiates I/O to or from a
time profile.
prof: Displays
monitor: Prepares execution
at login time.
Creates an execution time
assert: Helps verify validity of
boot: XENIX boot
tape: Magnetic tape maintenance
etext, edata: Last locations in
cb: Beautifies C
lex: Generates
xref: Cross-references C
xstr: Extracts strings from C
and regenerates groups of
stack requirements for C
day. asktime:
Imagen serial sequence packet
ips, isbs, ipbs: IMAGEN
locking on files. lockf:
operations. msgct1:

sxt:
information.

stream. ungetc:
a character or word on a/
console.
character or word on a/ putc,
environment.
entry.
putc, putchar, fputc, putw:
puts, fputs:
cputs:
stream.
on a/ putc, putchar, fputc,
administration.
name.
tput:
Sends files to the lineprinter
msgget: Gets message

1-40

processes. wait:
. . • . . .
processing commands.
processing.
processing. prep:
processor.
. • • . •
process. popen, pelose: . • . • •
prof: Displays profile data.
profil: Creates an execution
profile data. . . • . . • •
profile.
.......•
profile: Sets up an environment
profile. profil:
program.
program. • .
program.
program. end,
programs.
programs for lexical analysis.
programs.
.......
programs.
.••...•
programs. /Maintains, updates,
programs. stackuse: Determines
•
Prompts for the correct time of
protocol handler. ips: . . • •
protocol handlers. . . . . .
Provide semaphores and record
Provides message control
prs: Prints an SCCS file. .
ps: Reports process status.
Pseudo-device driver. . .
pstat: Reports system . .
ptrace: Traces a process.
ptx: Generates a permuted index. .
•
Pushes character back into input
putc, putchar, fputc, putw: Puts
putch: Writes a character to the
putchar, fputc, putw: Puts a
putenv: Changes or adds value to
.
putpwent: Writes a password file
Puts a character or word on a/
Puts a string on a stream.
Puts a string to the console.
puts, fputs: Puts a string on a
putw: Puts a character or word
pwadmin: Performs password aging
.
pwcheck: Checks password file.
pwd: Prints working directory
qsort: Performs a quicker sort.
Queries the terminfo database.
queue for printing. lpr: . . • . .
queue. . • . . . . • • • .

wait(C)
Intro(CT)
shutdown(ADM)
prep(CT)
m4(CP)
popen(S)
prof(CP)
profil(S)
prof(CP)
monitor(S)
profile(M)
profil(S)
assert(S)
boot(HW)
tape(C)
end(S)
cb(CP)
lex(CP)
xref(CP)
xstr(CP)
make( CP)
stackuse(CP)
asktime(ADM)
ips (ADM)
ips (ADM)
10ckf(S)
msgct1(S)
prs(CP)
ps(C)
sxt(M)
pstat(C)
ptrace(S)
ptx(CT)
ungetc(S)
putc(S)
putch(DOS)
putc(S)
putenv(S)
putpwent(S)
putc(S)
puts(S)
cputs(DOS)
puts(S)
putc(S)
pwadmin(ADM)
pwcheck(C)
pwd(C)
qsort(S)
tput(C)
Ipr(C)
msgget(S)

Permuted Index

ipcrm: Removes a message
files onto the IMAGEN printer
qsort: Performs a
a command immune to hangups and
ownership.
number.
number.
ranlib: Converts archives to
random: Generates a
rand, srand: Generates a
random libraries.
FORTRAN into standard FORTRAN.
FORTRAN. ratfor: Converts
systems.
data to be read.
information. hwconfig:
sopen: Opens a file for shared
open: Opens file for
or unlocks a file region for
to see if there is data to be
getpass:
defopen, defread:
read:
line:
mail: Sends,
lseek: Moves
memory. malloc, free,
clock: The system
setclock: Sets the system
systems and shuts down/ haltsys,
Specifies what to do upon
lineprinters. lpinit: Adds,
lockf: Provide semaphores and
version of.
regular expressions. regex,
expressions.
make: Maintains, updates, and
executes regular expressions.
compile and match routines.
execseg: makes a data
locking: Locks or unlocks a file
match routines. regexp:
regcmp: Compiles
regcmp: Compiles and executes
sorted files. comm: Selects or
intro: Introduction to machine
lorder: Finds ordering
join: Joins two
Modules. 86rel: Intel 8086
strip: Removes symbols and

queue, semaphore set or shared/
queue. ipr, oldipr: Put
quicker sort.
...... .
quits. nohup: Runs . . . • •
quot: Summarizes file system
rand, srand: Generates a random
random: Generates a random
random libraries.
random number.
random number.
ranlib: Converts archives to
ratfor: Converts Rational
Rational FORTRAN into standard
rcp: Copies files across XENIX
rdchk: Checks to see if there is
read: Reads from a file.
Read the configuration
reading and writing.
reading or writing.
reading or writing. /Locks
read. rdchk: Checks
Reads a password.
Reads default entries.
Reads from a file.
Reads one line.
reads or disposes of mail.
read/write file pointer.
realloc, calloc: Allocates main
real-time (time of day) clock.
real-time (time of day) clock.
reboot: Closes out the file
receipt of a signal. signal:
reconfigures and maintains
record locking on files.
red: Invokes a restricted . .
regcmp: Compiles and executes
regcmp: Compiles regular
regenerates groups of programs.
regex, regcmp: Compiles and
regexp: Regular expression
region executable.
region for reading or writing.
Regular expression compile and
regular expressions.
regular expressions. regex,
rejeots lines common to two
related miscellaneous features/
relation for an object library.
relations. . • . • . . . . .
Relocatable Format for Object
relocation bits.
•.....

· ipcrm(ADM)
ipr(C)
qsort(S)
nohup(C)
quot(C)
• rand(S)
random(C)
ranlib(CP)
random(C)
rand(S)
ranlib(CP)
ratfor(CP)
• ratfor(CP)
rcp(C)
rdchk(S)
read(S)
hwconfig(ADM)
sopen(DOS)
open(S)
10cking(S)
rdchk(S)
getpass(S)
defopen(S)
read(S)
line(C)
mail(C)
Iseek(S)
malloc(S)
clock(F)
setclock(ADM)
haltsys(ADM)
signal(S)
Ipinit(ADM)
lockf(S)
red(C)
regex(S)
regcmp(CP)
· make(CP)
regex(S)
regexp(S)
execseg(S)
locking(S)
· regexp(S)
regcmp(CP)
regex(S)
comm(C)
Intro(HW)
lorder(CP)
join(C)
86rel(F)
strip(CP)

1-41

Permuted Index

value, floor, ceiling and
calendar: Invokes a
remote XENIX system.
uutry: try to contact
ct: spawn getty to a
remote: Executes commands on a
uux: Executes command on
file. rmdel:
semaphore set or shared/ ipcrm:
system. rmuser:
rmdir:
unlink:
pathnames. basename:
rm, rmdir:
eqn constructs. deroff:
bits. strip:
directory.
rename:
mv: Moves or
fsck: Checks and
uniq: Reports
yes: Prints string
blocks. df:
Generate an IMAGEN accounting
clock:
cmchk:
ps:
file. uniq:
pstat:
inter-process/ ipcs:
vmstat:
stream. fseek, ftell, rewind:
Starts/stops the lineprinter
lp, lpr, cancel: Send/cancel
stackuse: Determines stack
/Awaits and checks access to a
incremental file/ restore,
Invokes incremental file system/
Invokes incremental file system
Performs file system backups and
interpreter). rsh: Invokes a
red: Invokes a
fp_off, fp_seg:
stat: Data
inp:
console buffer. ungetch:
value. abs:
long integer. labs:
strlen:
value. false:
true:

1-42

remainder functions. /absolute
reminder service.
••.•.
remote: Executes commands on a •
remote system with debugging on •
remote terminal
remote XENIX system.
remote XENIX.
Removes a delta from an SCCS
Removes a message queue,
Removes a user account from the •
Removes directories.
Removes directory entry.
Removes directory names from
Removes files or directories.
Removes nroff/troff, tbl, and
Removes symbols and relocation •
rename: renames a file or
renames a file or directory. • •
renames files and directories.
.••.••
repairs file systems.
repeated lines in a file.
repeatedly.
Report number of free disk
report. imacct:
Reports CPU time used. .
Reports hard disk block size.
Reports process status.
Reports repeated lines in a . •
Reports system information.
Reports the status of
Reports virtual memory statistics.
Repositions a file pointer in a
request. /lpshut, lpmove:
requests to lineprinter.
requirements for C programs.
resource governed by a/ . . . • •
restor: Invokes
restore, restor: . . . . •
restorer. /restor:
restores files. sysadmin:
restricted shell (command
restricted version of.
Return offset and segment.
returned by stat system call.
Returns a byte.
Returns a character to the
Returns an integer absolute
Returns the absolute value of a
Returns the length of a string.
Returns with a nonzero exit
Returns with a zero exit value.

floor(S)
calendar(C)
remote(C)
uutry(ADM)
ct(C)
remote(C)
uux(C)
rmdel(CP)
ipcrm(ADM)
rmuser(ADM)
rmdir(C)
unlink(S)
basename(C)
rm(C)
deroff(CT)
strip(CP)
rename(DOS)
rename(DOS)
mv(C)
fsck(ADM)
uniq(C)
yes(C)
df(C)
imacct(C)
clock(S)
cmchk(C)
ps(C)
uniq(C)
pstat(C)
ipcs(ADM)
vmstat(C)
fseek(S)
Ipsched(ADM)
Ip(C)
stackuse( CP)
waitsem(S)
restore(C)
restore(C)
restore(C)
sysadmin(ADM)
rsh(C)
red(C)
fp_seg(DOS)
stat(F)
inp(DOS)
ungetch(DOS)
abs(S)
labs(DOS)
strlen(DOS)
false(C)
true(C)

Permuted Index

col: Filters
in a string. strrev:
pointer in a/ fseek, ftell,
creat: Creates a new file or
directories.
SCCS file.

directories. rm,
from the system.
chroot: Changes the
chroot: Changes
logarithm, power, square
/system services, library
expression compile and match
(command interpreter).
priority. nice:
and quits. nohup:
editing activity.
space allocation.
work. uucico:
and formats input.
bfs:
creates bad track! badtrk:
help: Asks for help about
the delta commentary of an
comb: Combines
sact: Prints current
prs: Prints an
rmdel: Removes a delta from an
sccsfile: Format of an
val: Validates an
Makes a delta (change) to an
admin: Creates and administers
Compares two versions of an
Undoes a previous get of an
of an SCCS file.
file.
system backups
transport program uusched: the
curses: Performs
clear: Clears a terminal
setcolor: Set
convkey: Configure monitor
color, monochrome, ega,.
vi, view, vedit: Invokes a
install: Installation shell
IMAGEN printer interface
interface.
dates.

reverse linefeeds.
Reverses the order of characters
•
rewind: Repositions a file
rewrites an existing one. .
rm, rmdir: Removes files or
rmdel: Removes a delta from an
·
rmdir: Deletes a directory.
rmdir: Removes directories.
rmdir: Removes files or
rmuser: Removes a user account
·
root directory. • . • • . . .
root directory for command.
root functions. /exponential,
routines and error numbers.
routines. regexp: Regular
rsh: Invokes a restricted shell
Runs a command at a different
Runs a command immune to hangups
sact: Prints current SCCS file •
sbrk, brk: Changes data segment
•
Scan the spool directory for
scanf, fscanf, sscanf: Converts
Scans big files.
.•..••
Scans fixed disk for flaws and
SCCS commands.
SCCS delta. cdc: Changes
SCCS deltas. . • • • •
SCCS file editing activity.
SCCS file.
SCCS file.
SCCS file.
SCCS file.
SCCS file. delta:
SCCS files.
SCCS file. sccsdiff.
SCCS file. unget:
sccsdiff. Compares two versions
•
sccsfile: Format of an secs
schedule: Database for automated •
scheduler for the uucp file
screen and cursor functions.
• •.•..•
screen.
screen color.
.••••
screen mapping. /mapstr,
screen: tty[Ol-n),
screen-oriented display editor.
script. . • • . • . . • •
scripts. /imagen.remote:
scsi: Small computer systems
sdb: Invokes symbolic debugger.
•
sddate: Prints and sets backup

col(CT)
strrev(DOS)
fseek(S)
createS)
rm(C)
rmdel(CP)
rmdir(DOS)
rmdir(C)
rm(C)
rmuser(ADM)
chroot(S)
chroot(ADM)
exp(S)
Intro(S)
regexp(S)
rsh(C)
nice(C)
nohup(C)
sact(CP)
sbrk(S)
uucico(C)
scanf(S)
bfs(C)
badtrk(ADM)
help(CP)
cdc(CP)
comb(CP)
sact(CP)
prs(CP)
rmdel(CP)
sccsfile(F)
val(CP)
delta(CP)
admin(CP)
sccsdiff(CP)
unget(CP)
sccsdiff( CP)
sccsfile(F)
schedule(ADM)
uusched(ADM)
curses(S)
clear(C)
setcolor(C)
mapkey(M)
screen(HW)
vi(C)
install(M)
imagen(M)
scsi(HW)
sdb(CP)
sddate(C)

1-43

Permuted Index

access to a shared data!
shared data segment. sdget,
detaches a shared data segment.
shared data access.
side-by-side.
a shared data segment. sdenter,
data access. sdgetv,
lsearch, lfind: Perfonns linear
bsearch: Perfonns a binary
hcreate, hdestroy: Manages hash
tdelete, twalk: Manages binary
grep, egrep, fgrep:
accounting files. acctcom:
pattern in a file. awk:
unifonnly distributed. srand48,
brkctl: Allocates data in a far
shmget: Gets a shared memory
sbrk, brk: Changes data
fp_seg: Return offset and
and detaches a shared data
access to a shared data
a file. cut: Cuts out
binary files. hdr: Displays
to two sorted files. comm:
opensem: Opens a
semctl: Controls
semop: Performs
ipcrm: Removes a message queue,
to a resource governed by a
Creates an instance of a binary
files. lockf: Provide
semget: Gets set of
Signals a process waiting on a
operations.
fsphoto: Performs periodic
operations.
hello:
lineprinter. lp, lpr, cancel:
group of processes. kill:
queue for printing. Ipr:
mail. mail:
Isys_errlist, sys_nerr, ermo:
mesg: Permits or denies messages
handler. ips: Imagen serial
file to printer attached to a
mscreen:
,tty2[A-H]: Interface to
handler. ips: Imagen

1-44

sdenter, sdleave: Synchronizes
sdfree: Attaches and detaches a
sdget, sdfree: Attaches and
sdgetv, sdwaitv: Synchronizes
sdiff. Compares files
sdleave: Synchronizes access to
sdwaitv: Synchronizes shared
search and update.
• .••....
search.
search tables. hsearch,
search trees. tsearch, tfind,
Searches a file for a pattern.
Searches for and prints process
Searches for and processes a
sed: Invokes the stream editor.
seed48, lcong48: Generates
segment. • . . . • . .
segment. . . • . . . .
segment space allocation.
segment. fp_off, . . . . .
segment. Isdfree: Attaches
segment. Isdleave: Synchronizes
segread: command description.
selected fields of each line of .
selected parts of executable
Selects or rejects lines common
semaphore.
. • . .
semaphore operations.
semaphore operations.
semaphore set or shared memory.
semaphore. land checks access
semaphore. crealsem:
semaphores and record locking on
semaphores.
•....•
semaphore. sigsem:
semctI: Controls semaphore
semget: Gets set of semaphores.
semi-automated system backups
semop: Perfonns semaphore
Send a message to another user.
Send/cancel requests to
Sends a signal to a process or a
Sends files to the lineprinter
Sends, reads or disposes of •
Sends system error messages.
sent to a terminal.
sequence packet protocol
serial console !Print
Serial multiscreens utility
serial ports. I, tty2[a-h]
serial sequence packet protocol

•

•

.
·

·

·
·

sdenter(S)
sdget(S)
sdget(S)
sdgetv(S)
sdiff(C)
sdenter(S)
sdgetv(S)
Isearch(S)
bsearch(S)
hsearch(S)
tsearch(S)
grep(C)
acctcom(ADM)
awk(C)
sed(C)
drand48(S)
brkctl(S)
shmget(S)
sbrk(S)
fp_seg(DOS)
sdget(S)
sdenter(S)
segread(DOS)
cut(CT)
hdr(CP)
comm(C)
opensem(S)
semctl(S)
semop(S)
ipcnn(ADM)
waitsem(S)
creatsem(S)
10ckf(S)
semget(S)
sigsem(S)
semctl(S)
semget(S)
fsphoto(ADM)
sernop(S)
hello(ADM)
Ip(C)
kill(S)
Ipr(C)
mail(C)
perror(S)
mesg(C)
ips(ADM)
consoleprint(ADM)
mscreen(M)
serial(HW)
ips(ADM)

Permuted Index

calendar: Invokes a reminder
error/ intro: Introduces system
Map of the ASCII character
buffering to a stream.
real-time (time of day) clock.
setuid,
getgrent, getgrgid, getgmam,
nonlocal "goto".
keys.
table.

getpwent, getpwuid, getpwnam,
alarm:
to one charater. strset:
mask. umask:
sddate: Prints and
execution. env:
modification times. utime:
umask:
setpgrp:
tset:
speed, and line/ getty:
base. cmos: Displays and
date: Prints and
a video device. vidi:
stty:
of day) clock. setclock:
stime:
setmode:
trchan: Translate character
time. profile:
setuid, setgid:
ulimit: Gets and
modification dates of files.
gettydefs: Speed and terminal
group IDs.
stream. setbuf,
data in a/ sputl,
interpreter.
sdgetv, sdwaitv: Synchronizes
sdfree: Attaches and detaches a
Synchronizes access to a
shmctl: Controls
shmop: Performs
shmget: Gets a
message queue, semaphore set or
sopen: Opens a file for
rsh: Invokes a restricted
sh: Invokes the

calendar( C)
service.
.•.•.•..
Intro(S)
services, library routines and
ascii(M)
set. ascii:
..•.•
setbuf(S)
setbuf, setvbuf: Assigns
setclock(ADM)
setclock: Sets the system
setcolor(C)
setcolor: Set screen color.
setuid(S)
setgid: Sets user and group IDs.
getgrent(S)
setgrent, endgrent: Get group/
setjmp(S)
setjmp, longjmp: Performs a
setkey(C)
setkey: Assigns the function
setmnt(ADM)
setmnt: Establishes /etc/mnttab
setmode(DOS)
setmode: Sets translation mode.
setpgrp(S)
setpgrp: Sets process group ID.
getpwent(S)
setpwent, endpwent: Gets/ .
alarm(S)
Sets a process' alarm clock.
strset(DOS)
Sets all characters in a string
umask(S)
Sets and gets file creation
sddate(C)
sets backup dates.
env(C)
Sets environment for command
utime(S)
Sets file access and . • . .
umask(C)
Sets file-creation mode mask.
setpgrp(S)
Sets process group ID.
tset(C)
Sets terminal modes.
getty(M)
Sets terminal type, modes,
cmos(HW)
sets the configuration data
date(C)
.•.•..
sets the date.
Sets the font and video mode for
. vidi(C)
stty(C)
Sets the options for a terminal.
Sets the system real-time (time
setclock(ADM)
stime(S)
Sets the time.
setmode(DOS)
Sets translation mode.
sets . . . • . • . •
trchan(M)
Sets up an environment at login
profile(M)
setuid(S)
Sets user and group IDs. . . .
..•..•
sets user limits.
ulimit(S)
• settime(ADM)
settime: Changes the access and
gettydefs(F)
settings used by getty.
setuid(S)
setuid, setgid: Sets user and
setbuf(S)
setvbuf: Assigns buffering to a
sputl(S)
sgetl: Accesses long integer
sh(C)
sh: Invokes the shell command
shared data access. . . . . .
sdgetv(S)
sdget(S)
shared data segment. sdget,
sdenter(S)
shared data segment. /sdleave:
shmctl(S)
shared memory operations.
shmop(S)
shared memory operations.
shmget(S)
shared memory segment.
ipcrm(ADM)
shared memory. ipcrm: Removes a
sopen(DOS)
shared reading and writing.
rsh(C)
shell (command interpreter).
sh(C)
shell command interpreter. .

1-45

Permuted Index

C-like syntax. csh: Invokes a
system: Executes a
chsh: changes user login
shl:
install: Installation
operations.
segment.
operations.
nap: Suspends execution for a
halts the CPU.
processing.
Closes out the file systems and
sdiff: Compares files
Suspends a process until a
upon receipt of a signal.
of processes. kill: Sends a
semaphore. sigsem:
what to do upon receipt of a
gsignal: Implements software
waiting on a semaphore.
atan2: Performs trigonometric/
hyperbolic functions.
cmchk: Reports hard disk block
chsize: Changes the
size: Prints the
object file.
interval.
interval.
current/ tty slot: Finds the
spline: Interpolates
nroff input.
ssignal, gsignal: Implements
reading and writing.
qsort: Performs a quicker
or rejects lines common to two
look: Finds lines in a
tsort:
sort:
soelim: Eliminates
an error message file from C
sbrk, brk: Changes data segment
ct:
process.
spawnl,
movedata: Copies bytes from a
cron: Executes commands at
receipt of a signal. signal:
/Sets terminal type, modes,
by getty. gettydefs:

1-46

shell command interpreter with
shell command.
shell in password file.
Shell layer manager.
shell script. . . . . • •
shl: Shell layer manager.
shmctl: Controls shared memory
shmget: Gets a shared memory
shmop: Performs shared memory
short interval. . . . . . .
shutdn: Flushes block I/O and
shutdown: Terminates all
shuts down the system. /reboot:
•
side-by-side.
....•.
signal occurs. pause:
signal: Specifies what to do
signal to a process or a group
Signals a process waiting on a
signal. signal: Specifies . .
signals. ssignal, . • • • •
sigsem: Signals a process
sin, cos, tan, asin, acos, atan,
sinh, cosh, tanh: Performs
size.
• .•..••
size of a file.
...•.
size of an object file.
size: Prints the size of an
sleep: Suspends execution for an
•
sleep: Suspends execution for an
•
slot in the utmp file of the
smooth curve. • • • . • . •
soelim: Eliminates .so's from
software signals. • • . • .
sopen: Opens a file for shared
sort. . • . • • • • • • •
sort: Sorts and merges files.
sorted files. comm: Selects
•..•.
sorted list.
Sorts a file topologically.
Sorts and merges files.
.so's from nroff input. . . . • • .
•.•••
source. mkstr: Creates
space allocation. . • .
spawn getty to a remote terminal
•
spawnl, spawnvp: Creates a new
·
spawnvp: Creates a new process.
•
specific address.
specified times.
Specifies what to do upon
speed, and line discipline.
Speed and terminal settings used
•

csh(C)
system(S)
chsh(ADM)
shl(C)
install(M)
shl(C)
shmctl(S)
shmget(S)
shmop(S)
napeS)
shutdn(S)
shutdown(ADM)
haltsys(ADM)
sdiff(C)
pause(S)
signal(S)
kill(S)
sigsem(S)
signal(S)
ssignal(S)
sigsem(S)
trig(S)
sinh(S)
cmchk(C)
chsize(S)
size(CP)
size(CP)
sleep(C)
sleep(S)
ttyslot(S)
spline(CP)
soelim(CT)
ssignal(S)
sopen(DOS)
qsort(S)
sort(C)
comm(C)
100k(CT)
tsort(CP)
sort(C)
soelim(CT)
mkstr(CP)
sbrk(S)
ct(C)
spawn(DOS)
spawn(DOS)
movedata(DOS)
cron(C)
signal(S)
getty(M)
gettydefs(F)

Permuted Index

hashcheck: Finds spelling/
spelling/ spell, hashmake,
spellin, hashcheck: Finds
curve.
pieces.
split:
context. csplit:
into at frexp, ldexp, modf:
uuclean: uucp
uucico: Scan the
Configures the lineprinter
printf, fprintf,
integer data in a/
exponential.! exp, log, pow,
exponential, logarithm, power,
number. rand,
Generates uniformly/
input. scanf, fscanf,
software signals.
programs. stackuse: Determines
requirements for C programs.
output. stdio: Performs
Converts Rational FORTRAN into
gets: Gets a string from the
communication package. ftok:
pr: Prints files on the
lpsched, lpshut, lpmove:
system call.
stat: Data returned by
prep: Prepares text for
ustat: Gets file system
virtual memory
lpstat: prints lineprinter
uustat: uucp
communication/ ipcs: Reports the
ps: Reports process
stat, fstat: Gets file
fileno: Determines stream
buffered input and output.
Waits for a child process to
compress: Compress data for
nextkey:/ dbminit, fetch,
uncompress: Uncompress a
zcat: Display a
operations.
Invokes the
fopen, freopen, fdopen: Opens a
puts, fputs: Puts a string on a
clearerr, fileno: Determines

spell, hashmake, spellin,
spellin, hashcheck: Finds
spelling errors. Ihashmake,
spline: Interpolates smooth
split: Splits a file into
Splits a file into pieces.
Splits files according to
Splits floating-point number
spool directory clean-up . .
spool directory for work.
spooling system. Ipadmin:
sprintf: Formats output.
spud, sgetl: Accesses long
sqrt, log 10: Performs
square root functions. /performs
srand: Generates a random .
srand48, seed48, lcong48:
sscanf: Converts and formats
ssignal, gsignal: Implements
stack requirements for C
stackuse: Determines stack
standard buffered input and
standard FORTRAN. ratfor:
standard input.
Standard interprocess • • •
standard output.
Starts/stops the lineprinter/
stat: Data returned by stat
stat, fstat: Gets file status.
stat system call.
statistical processing.
statistics. . . . . •
statistics. vmstat: Reports
status information.
status inquiry and job control.
status of inter-process
status. . . • . . • . .
status.
status. ferror, feof, clearerr,
stdio: Performs standard
stime: Sets the time.
stop or terminate. wait:
storage.
. .•.•
store, delete, firstkey,
stored file.
stored file.
strdup: Performs string
stream editor. sed:
stream.
stream.
stream status. ferror, feof,

spell(CT)
spel1(CT)
spell(CT)
spline(CP)
split(C)
split(C)
csplit(C)
frexp(S)
uuclean(ADM)
uucico(C)
Ipadmin(ADM)
printf(S)
spud(S)
exp(S)
exp(S)
rand(S)
drand48(S)
scanf(S)
ssignal(S)
stackuse( CP)
stackuse( CP)
stdio(S)
ratfor(CP)
gets(CP)
stdipc(S)
pr(C)
Ipsched(ADM)
stat(F)
stateS)
stat(F)
prep(CT)
ustat(S)
vmstat(C)
Ipstat(C)
uustat(C)
ipcs(ADM)
ps(C)
stateS)
ferror(S)
stdio(S)
stime(S)
waiteS)
compress(C)
dbm(S)
compress(C)
compress( C)
string(S)
sed(C)
fopen(S)
puts(S)
ferror(S)

1-47

Permuted Index

fflush: Closes or flushes a
Gets a character from a
fputchar: Write a character to a
Repositions a file pointer in a
Gets character or word from a
fgets: Gets a string from a
Prints the first few lines of a
Puts a character or word on a
fclose, fcloseall: Closes
setvbuf: Assigns buffering to a
Pushes character back into input
cgets: Gets a
gets, fgets: Gets a
gets: Gets a
puts, fputs: Puts a
strdup: Performs
yes: Prints
strlen: Returns the length of a
strtod, atof: Converts a
strtol, atol, atoi: Converts
strset: Sets all characters in a
cputs: Puts a
strings in an object file.
xstr: Extracts
strings: Finds the printable
the order of characters in a
relocation bits.
string.
characters to lowercase.
characters in a string.
string to one charater.
to a double-precision number.
string to integer.
mount: Mounts a file
umount: Dismounts a file
characters to uppercase.
terminal.
of a document.
or another user.
counts blocks in a file.
du:
ownership. quot:
sync: Updates the
sync: Updates the
su: Makes the user a
terminals: List of
keyboard mode or test keyboard
signal occurs. pause:
interval. nap:
interval. sleep:
interval. sleep:

1-48

stream. fclose,
stream. fgetc, fgetchar:
stream. fputc,
stream. fseek, ftell, rewind:
stream. /getchar, fgetc, getw:
stream. gets,
stream. head:
stream. !putchar, fputc, putw:
streams.
stream. setbuf,
stream. ungetc:
string.
string from a stream.
string from the standard input.
string on a stream.
string operations.
string repeatedly.
string.
string to a double-precision/
string to integer.
string to one charater.
string to the console.
strings: Finds the printable
strings from C programs.
strings in an object file.
string. strrev: Reverses
strip: Removes symbols and
strlen: Returns the length of a
strlwr: Converts uppercase
strrev: Reverses the order of
strset: Sets all characters in a
strtod, atof: Converts a string
strtol, atol, atoi: Converts
structure.
structure.
strupr: Converts lowercase
stty: Sets the options for a
style: Analyzes characteristics
su: Makes the user a super-user
sum: Calculates checksum and
Summarizes disk usage.
Summarizes file system
super-block.
super-block.
super-user or another user.
supported terminals.
support kbmode: Set
Suspends a process until a
Suspends execution for a short
Suspends execution for an
Suspends execution for an

fclose(S)
fgetc(DOS)
fputc(DOS)
fseek(S)
getc(S)
gets(S)
head(C)
putc(S)
fclose(DOS)
setbuf(S)
ungetc(S)
cgets(DOS)
gets(S)
gets(CP)
puts(S)
string(S)
yes(C)
strlen(DOS)
strtod(S)
strtol(S)
strset(DOS)
cputs(DOS)
strings(CP)
xstr(CP)
strings(CP)
strrev(DOS)
strip(CP)
strlen(DOS)
strlwr(DOS)
strrev(DOS)
strset(DOS)
strtod(S)
strtol(S)
mount(ADM)
umount(ADM)
strupr(DOS)
stty(C)
style(CT)
su(C)
sum(C)
du(C)
quot(C)
sync(ADM)
sync(S)
su(C)
terminals(M)
kbmode(ADM)
pause(S)
napeS)
sleep(C)
sleep(S)

Permuted Index

swab(S)
swab: Swaps bytes. • . •
swapadd(S)
swapadd: Adds swap area
••.••.
swapadd(S)
swapadd: Adds swap area
swab(S)
....•
swab: Swaps bytes.
fdswap(ADM)
fdswap: Swaps default boot floppy drive.
sxt(M)
sxt: Pseudo-device driver.
....•
sdb(CP)
sdb: Invokes symbolic debugger.
strip(CP)
strip: Removes symbols and relocation bits.
sync(ADM)
sync: Updates the super-block.
sync(S)
sync: Updates the super-block.
. sdenter(S)
data segment. sdenter, sdleave: Synchronizes access to a shared
. sdgetv(S)
sdgetv, sdwaitv: Synchronizes shared data access.
csh(C)
command interpreter with C-like syntax. csh: Invokes a shell
lint(CP)
Checks C language usage and syntax. lint:
•••..•.
sysadmin(ADM)
backups and restores files. sysadmin: Performs file system
sysadmsh(ADM)
administration utility. sysadmsh: Menu driven system
perror(S)
Sends system error/ perror, sys_errlist, sys_nerr, ermo:
perror(S)
error/ perror, sys_errlist, sys_nerr, ermo: Sends system
config(ADM)
config: Configures a XENIX system.
cu(C)
cu: Calls another XENIX system.
mkfs(ADM)
mkfs: Constructs a file system.
mkuser(ADM)
mkuser: Adds a login ID to the system.
mount(S)
mount: Mounts a file system.
umount(S)
umount: Unmounts a file system.
who(C)
who: Lists who is on the system.
autoboot(ADM)
Automatically boots the system. autoboot:
systemid(F)
identification file. systemid: The Micnet system
Ipadmin(ADM)
the lineprinter spooling system. Ipadmin: Configures
haltsys(ADM)
file systems and shuts down the system. /reboot: Closes out the
remote(C)
commands on a remote XENIX system. remote: Executes
rmuser(ADM)
Removes a user account from the system. rmuser: .• . . •
haltsys(ADM)
/reboot: Closes out the file systems and shuts down the/
fsck(ADM)
fsck: Checks and repairs file systems. . . . • • • .
scsi(HW)
scsi: Small computer systems interface.
checklist(F)
checklist: List of file systems processed by fsck.
rcp(C)
rcp: Copies files across XENIX systems. . . . . .
uname(C)
the name of the current XENIX system. uname: Prints
uname(S)
Gets name of current XENIX system. uname:
systty(M)
device. systty: System maintenance
aliashash(ADM)
aliashash: Micnet alias hash table generator.
setmnt(ADM)
setmnt: Establishes /etc/mnttab table.
. ...... .
badtrk(ADM)
for flaws and creates bad track table. badtrk: Scans fixed disk
master(F)
Master device information table. master: . . .
mnttab(F)
Format of mounted file system table. mnttab: . . . .
tbl(CT)
tbl: Formats tables for nroff or troff.
term: Terminal driving tables for nroff.
. • • . • . term(F)
hsearch(S)
hdestroy: Manages hash search tables. hsearch, hcreate,
ctags(CP)
ctags: Creates a tags file. . • • • • .
tail(C)
a file. tail: Delivers the last part of
trig(S)
Performs/ sin, cos, tan, asin, acos, atan, atan2:
sinh(S)
functions. sinh, cosh, tanh: Performs hyperbolic

1-49

Permuted Index

backup: Incremental dump
dump: Incremental dump
program.
tape: Magnetic
tapedump: Dumps magnetic
output file.

deroff: Removes nroff/troff,
troff.
search trees. tsearch, tfind,
tee: Creates a
last logins of users and
method of turning terminals onl
temporary file. tmpnam,
tmpfile: Creates a
tempnam: Creates a name for a
for nroff.
terminfol capinfo: convert
data base.
termcap:
terminfo:
ct: spawn getty to a remote
terminfo:
nroff. term:
tgetstr, tgoto, tputs: Performs
termio: General
tty: Special
dial: Establishes an out-going
lock: Locks a user's
tset: Sets
clear: Clears a
gettydefs: Speed and
stty: Sets the options for a
terminal: Login
line discipline. getty: Sets
Generates a filename for a
a printer attached to the user's
or denies messages sent to a
enable: Turns on
disable: Turns off
inittab: Alternative login
ttys: Login
terminals.
tty: Gets the
IAlternative method of turning
terminals: List of supported
isatty: Finds the name of a

I-50

tape format.
•.••.•.•.
tape format.
•....•.••
tape: Magnetic tape maintenance •
tape maintenance program.
tape to output file. • • . • • . •
tapedump: Dumps magnetic tape to
tar: archive format. • . • •
tar: Archives files. . . • • •
tbl, and eqn constructs.
tbl: Formats tables for nroff or
tdelete, twalk: Manages binary
tee: Creates a tee in a pipe.
.....•
tee in a pipe.
teletypes last: Indicate
telinit, mkinittab: Alternative
tempnam: Creates a name for a
.....
temporary file.
temporary file. trnpnam,
term: Conventional names.
term: Terminal driving tables
termcap descriptions into
termcap: Terminal capability
Terminal capability data base.
terminal capability data base.
terminal . . • • . . . • .
terminal description database.
Terminal driving tables for • .
terminal functions. Itgetflag,
terminal interface.
terminal interface.
terminal line connection.
terminal. . . • • . .
terminal: Login terminal.
terminal modes. . . . • .
terminal screen.
terminal settings used by getty.
terminal. . . • . . . . . .
terminal. • • • . . . . . •
terminal type, modes, speed, and
•
terminal. ctermid:
terminal lprint: Print to
terminal. mesg: Permits • • • • •
terminals and line printers.
terminals and printers.
terminals file. • . • • • •
terminals file. • • • . .
terminals: List of supported
terminal's name. • .
terminals on and off.
terminals.
terminal. ttyname,

backup(F)
dump(F)
tape(C)
tape(C)
tapedump(C)
tapedump(C)
tar(F)
tar(C)
deroff(CT)
tbl(CT)
tsearch(S)
tee(C)
tee(C)
last(C)
telinit(ADM)
trnpnam(S)
trnpfile(S)
trnpnam(S)
term(CT)
term(F)
capinfo(C)
termcap(M)
termcap(M)
terminfo(M)
ct(C)
terminfo(S)
term(F)
termcap(S)
termio(M)
tty(M)
dial(S)
10ck(C)
terminal(HW)
tset(C)
clear(C)
gettydefs(F)
stty(C)
terminal(HW)
getty(M)
ctermid(S)
Iprint(C)
mesg(C)
enable(C)
disable(C)
inittab(F)
ttys(F)
terminals(M)
tty(C)
telinit(ADM)
terminals(M)
ttyname(S)

Permuted Index

exit,3xit:
kill:
shutdown:
exit:
for a child process to stop or
tic:
tput: Queries the
tenncap descriptions into
tenninfo: Fonnat of compiled
terminfo file.
data base.
database.
interface.
kbmode: Set keyboard mode or
test:
ed: Invokes the
ex: Invokes a
newform: Changes the format of a
diff: Compares two
imprint: Prints
imprint: print
iprint: Converts
eqncheck: Formats mathematical
prep: Prepares
cwcheck: Prepares constant-width
nroff: A
plock: Lock process,
intro: Introduces
troff. Typesets
binary search trees. tsearch,
tgetstr, tgoto, tputs: Performs/
Performs/ tgetent, tgetnum,
tgoto, tputs: Performs/ tgetent,
tgetent, tgetnum, tgetflag,
/tgetnum, tgetflag, tgetstr,

clock: The system real-time
Sets the system real-time
stime: Sets the
Executes commands at a later
Sets up an environment at login
Executes commands at specified
Gets process and child process
file access and modification
file.
for a temporary file.
/isascii, tolower, toupper,
conv, toupper, tolower,
characters. conv, toupper,

Terminates a process. • .
exit(S)
kil1(C)
Terminates a process. . . .
Terminates all processing.
shutdown(ADM)
Terminates the calling process.
exit(DOS)
terminate. wait: Waits
waiteS)
Tenninfo compiler. . . • . .
tic(C)
terminfo database. • . . . •
tput(C)
capinfo(C)
tenninfo descriptions. /convert
tenninfo(F)
terminfo file.
..•...
tenninfo(F)
terminfo: Format of compiled
tenninfo(M)
terminfo: terminal capability
tenninfo(S)
tenninfo: terminal description
tennio(M)
tennio: General tenninal
test keyboard support
kbmode(ADM)
test: Tests conditions. . . • . . • test(C)
Tests conditions.
test(C)
ed(C)
text editor.
text editor.
exeC)
text file.
newfonn(C)
diff(C)
text files. . • •
text files on an IMAGEN printer.
. imprint(C)
text files on an IMAGEN printer.
imprint(CT)
text files to DVI fonnat.
iprint(C)
text for nroff, troff. /checkeq,
eqn(CT)
text for statistical processing.
prep(CT)
text for troff. cw, checkcw,
cw(CT)
text formatter. • • . . .
nroff(CT)
plock(S)
text, or data in memory.
Intro(CT)
text processing commands.
troff(CT)
text. • • . . . • . • . .
tsearch(S)
tfind, tdelete, twalk: Manages
tenncap(S)
tgetent, tgetnum, tgetflag,
tgetflag, tgetstr, tgoto, tputs:
tenncap(S)
tenncap(S)
tgetnum, tgetflag, tgetstr,
tgetstr, tgoto, tputs: Perfonns/
tenncap(S)
tenncap(S)
tgoto, tputs: Performs terminal!
tic(C)
tic: Terminfo compiler.
time(S)
time, ftime: Gets time and date.
clock(F)
(time of day) clock.
setclock(ADM)
(time of day) clock. setclock:
stime(S)
time.
at(C)
time. at, batch:
profile(M)
time. profile:
cron(C)
times. cron:
times(S)
times. times:
utime(S)
times. utime: Sets . • . • •
tmpfile(S)
tmpfile: Creates a temporary
tmpnam(S)
tmpnam, tempnam: Creates a name
ctype(S)
toascii: Classifies or converts/
conv(S)
toascii: Translates characters.
conv(S)
tolower, toascii: Translates . .

I-51

Permuted Index

/isgraph, iscntrl, isascii,
topology files.
files. top,
tsort: Sorts a file
top, top.next: The Micnet
modification times of a file.
/iscntrl, isascii, tolower,
Translates characters. conY,
database.
/tgetflag, tgetstr, tgoto,
ptrace:
disk for flaws and creates bad
trchan:
one format to another
conY, toupper, tolower, toascii:
tr:
to another translate:
setmode: Sets
decode a binary file for
encode a binary file for
the scheduler for the uucp file
ftw: Walks a file
twalk: Manages binary search
acos, atan, atan2: Performs
tbl: Formats tables for nroff or
itroff:
file. charrnap: Generate
Prepares constant-width text for
mathematical text for nroff,
with debugging on uutry:
Manages binary search trees.
topologically.
mapchan: Format of
mapchan: Configure

monochrome, ega,. screen:
tty2[a-h] ,tty2[A-H]:/
tty2[A-H]: Interface/ ttyl[a-h]
t~2[A-H]:/ ttyl[a-h],
to/ ttyl[a-h] ,ttyl[A-H],
Interface/ ttyl[a-h] ,ttyl[A-H]
/, tty 1[A-H] , tty2[a-h],
ports. /, tty 1[A-H] ,tty2[a-h]
of a terminal.
utmp file of the current user.

I-52

tolower, toupper, toascii:/
top, top.next: The Micnet
top.next: The Micnet topology
topologically. . . . . .
topology files. • . . . . •
touch: Updates access and . • .
toupper, toascii: Classifies or/
toupper, tolower, toascii:
tput: Queries the tenninfo
tputs: Performs terminal!
tr: Translates characters.
Traces a process.
track table. /Scans fixed
Translate character sets
translate: Translates files from
Translates characters.
Translates characters. . . • . .
Translates files from one format
••....
translation mode.
transmission via mail uudecode:
transmission via mail uuencode:
transport program uusched:
trchan: Translate character sets
tree. . . . . . . . . . . . .
trees. tsearch, tfind, tdelete,
trigonometric functions. /asin,
troff.
....••..••
Troffto an IMAGEN printer.
troff: Typesets text. • • . . .
troffwidth files and catab
troff. cw, checkcw, cwcheck:
troff. /eqncheck: Formats
try to contact remote system
tsearch, tfind, tdelete, twalk:
tset: Sets terminal modes.
tsort: Sorts a file
tty device mapping files.
tty device mapping.
tty: Gets the terminal's name.
tty: Special terminal interface.
tty [Ol-n], color,
tty 1[a-h] ,ttyl[A-H],
ttyl[A-H], tty2[a-h] ,
tty 1[A-H] ,tty2[a-h], . . . • • .
tty2[a-h], tty2[A-H]: Interface
tty2[a-h], tty2[A-H]:
tty2[A-H]: Interface to serial/
tty2[A-H]: Interface to serial
ttyname, isatty: Finds the name
ttys: Login terminals file.
ttyslot: Finds the slot in the

ctype(S)
top(F)
top(F)
tsort(CP)
top (F)
touch(C)
ctype(S)
conv(S)
tput(C)
termcap(S)
tr(C)
ptrace(S)
badtrk(ADM)
trchan(M)
translate( C)
conv(S)
tr(C)
translate(C)
setmode(DOS)
uuencode( C)
uuencode( C)
uusched(ADM)
trchan(M)
ftw(S)
tsearch(S)
trig(S)
tbl(CT)
itroff(CT)
troff(CT)
charrnap( CT)
cw(CT)
eqn(CT)
uutry(ADM)
tsearch(S)
tset(C)
tsort(CP)
mapchan(F)
mapchan(M)
tty(C)
tty(M)
screen(HW)
serial(HW)
serial(HW)
serial(HW)
serial(HW)
serial(HW)
serial(HW)
serial(HW)
ttyname(S)
ttys(F)
ttyslot(S)

Permuted Index

Imkinittab: Alternative method of
printers. disable:
accton:
printers. enable:
trees. tsearch, tfind, tdelete,
dtype: Determines disk
file: Determines file
getty: Sets terminal
types.
types: Primitive system data
mmt:
troff:
variable.
/localtime, gmtime, asctime,
limits.
characters.
creation mask.
mask.
structure.
XENIX system.
current XENIX system.
uncompress:
file.
file. unget:
an SCCS file.
into input stream.
the console buffer.
seed48, 1cong48: Generates
a file.
mktemp: Makes a
units: Converts
reading or/ locking: Locks or
umount:
files. pack, pcat,
Performs linear search and
times of a file. touch:
of programs. make: Maintains,
sync:
sync:
lowercase. strlwr: Converts
Converts lowercase characters to
about system activity.
lint: Checks C language
diction: Checks language
du: Summarizes disk
explain: Corrects language
checkmm, mmcheck: Checks

turning terminals on and off.
Turns off terminals and
Turns on accounting.
Turns on terminals and line
twalk: Manages binary search
.........
type.
type.
.•••••...
type, modes, speed, and line/
types: Primitive system data
types. . . . . . .
Typesets documents.
Typesets text.
TZ: Time zone environment
tzset: Converts date and time to/
uadmin: administrative control.
ulimit: Gets and sets user
ultoa: Converts numbers to
umask: Sets and gets file
umask: Sets file-creation mode
umount: Dismounts a file
umount: Unmounts a file system.
uname: Gets name of current
uname: Prints the name of the
Uncompress a stored file.
uncompress: Uncompress a stored
Undoes a previous get of an SCCS
unget: Undoes a previous get of
ungetc: Pushes character back
ungetch: Returns a character to
uniformly distributed. srand48,
uniq: Reports repeated lines in
unique filename.
units: Converts units.
•.•...
units.
unlink: Removes directory entry.
unlocks a file region for • . . .
Unmounts a file system. . . . .
unpack: Compresses and expands
update. lsearch,lfind:
Updates access and modification
updates, and regenerates groups
Updates the super-block.
Updates the super-block.
uppercase characters to
uppercase. strupr:
uptime: Displays information
usage and syntax.
usage. • . • . .
usage. . • • • .
usage.
usage of MM macros.

.
•
.

.
.

telinit(ADM)
disable(C)
accton(ADM)
enable(C)
tsearch(S)
dtype(C)
file(C)
getty(M)
types(F)
types(F)
mmt(CT)
troff(CT)
tz(M)
ctime(S)
uadmin(S)
ulimit(S)
ultoa(DOS)
umask(S)
umask(C)
umount(ADM)
umount(S)
uname(S)
uname(C)
compress(C)
compress(C)
unget(CP)
unget(CP)
ungetc(S)
ungetch(DOS)
drand48(S)
uniq(C)
mktemp(S)
units(C)
units(C)
unlink(S)
10cking(S)
umount(S)
pack(C)
Isearch(S)
touch(C)
make(CP)
sync(ADM)
sync(S)
strlwr(DOS)
strupr(DOS)
uptime(C)
lint(CP)
diction(CT)
du(C)
explain(CT)
checkmm(CT)

I-53

Permuted Index

clock: Reports CPU time
keystrokes
user. su: Makes the
rmuser: Removes a
id: Prints
setuid, setgid: Sets
/getgid, getegid: Gets real
environ: The
hello: Send a message to another
getpw: Gets password for a given
newgrp: Logs
ulimit: Gets and sets
file. chsh: changes
logname: Finds login name of
group/ /Gets real user, effective
write: Writes to another
Gets the login name of the
last: Indicate last logins of
finger: Finds information about
idleout: Logs out idle
lock: Locks a
to a printer attached to the
wall: Writes to all
the user a super-user or another
in the utmp file of the current
statistics.
mscreen: Serial multiscreens
driven system administration
modification times.
utmp, wtmp: Formats of
endutent, utmpname: Accesses
tty slot: Finds the slot in the
wtmp entries.
entry. endutent,
directories and permissions/
for work.
clean-up
Administers
file uucheck: check the
uusched: the scheduler for the
uusub: Monitor
uuclean:
control. uustat:
for transmission via mail
for transmission via mail
files.
file copy. uuto,
uucp file transport program
job control.

I-54

used.
...•..••..
•
usemouse: Maps mouse input to
user a super-user or another
user account from the system.
user and group IDs and names.
user and group IDs.
user, effective user, reall
user environment.
user.
•..•.•
user ID. • . . . .
user into a new group.
• • . • • .
user limits.
user login shell in password
.....•...
user.
user, real group, and effective
.••...
user.
user. cuserid:
users and teletypes
users.
users. . . • . .
••.•.
user's terminal.
user's terminal lprint: Print
users. • • . . . . • •
user. su: Makes . • • • .
user. ttyslot: Finds the slot
ustat: Gets file system
utility • . . • . • . •
utility. sysadmsh: Menu
utime: Sets file access and
utmp and wtmp entries.
utmp file entry.
utmp file of the current user.
utmp, wtmp: Formats of utmp and .
utmpname: Accesses utmp file
uuchat: dials a modem.
uucheck: check the uucp
.
uucico: Scan the spool directory
uuclean: uucp spool directory
UUCP control files. uuinstall:
uucp directories and permissions
.
uucp file transport program
uucp network. . . • . . . .
uucp spool directory clean-up
uucp status inquiry and job
uudecode: decode a binary file
uuencode: encode a binary file
uuinstall: Administers UUCP control
uupick: Public XENIX-to-XENIX .
uusched: the scheduler for the
uustat: uucp status inquiry and
uusub: Monitor uucp network.

clock(S)
usemouse(C)
su(C)
rmuser(ADM)
ide C)
setuid(S)
getuid(S)
environ(M)
hello(ADM)
getpw(S)
newgrp(C)
ulimit(S)
chsh(ADM)
10gname(S)
getuid(S)
write(C)
cuserid(S)
last(C)
finger(C)
idleout(ADM)
10ck(C)
Iprint(C)
wall (ADM)
su(C)
ttyslot(S)
ustat(S)
mscreen(M)
sysadmsh(ADM)
utime(S)
utmp(F)
getut(S)
ttyslot(S)
utmp(F)
getut(S)
dial(ADM)
uucheck(ADM)
uucico(C)
uuclean(ADM)
uuinstall(ADM)
uucheck(ADM)
uusched(ADM)
uusub(C)
uuclean(ADM)
uustat(C)
uuencode(C)
uuencode(C)
uuinstall(ADM)
uuto(C)
uusched(ADM)
uustat(C)
uusub(C)

Permuted Index

•.....
XENIX-to-XENIX file copy. uuto, uupick: Public
system with debugging on uutry: try to contact remote
XENIX. uux: Executes command on remote
val: Validates an SCCS file.
val: Validates an SCCS file.
assert: Helps verify validity of program.
abs: Returns an integer absolute value. • • . • • • . •
ceil, fmod: Performs absolute value, floor, ceiling and/ /fabs,
getenv: Gets value for environment name.
labs: Returns the absolute value of a long integer.
putenv: Changes or adds value to environment. • . • • • •
true: Returns with a zero exit value. • • . . • . •
Returns with a nonzero exit value. false:
•....
varargs: variable argument list.
varargs: variable argument list.
TZ: Time zone environment variable. • . . • . • . . •
Gets option letter from argument vector. getopt:
..•.•.
display editor. vi, view, vedit: Invokes a screen-oriented
·
assert: Helps verify validity of program.
. ••.•
red: Invokes a restricted version of.
sccsdiff: Compares two versions of an SCCS file.
formatted output of a/ vprintf, vfprintf, vsprintf: Prints
screen-oriented display editor. vi, view, vedit: Invokes a
a binary file for transmission via mail uudecode: decode
a binary file for transmission via mail uuencode: encode
the font and video mode for a video device. vidi: Sets
vidi: Sets the font and video mode for a video device.
mode for a video device. vidi: Sets the font and video
screen-oriented display/ vi, view, vedit: Invokes a
vmstat. Reports virtual memory statistics.
statistics. vmstat: Reports virtual memory
file system: Format of a system volume.
.•....
Prints formatted output of a/ vprintf, vfprintf, vsprintf:
output of a/ vprintf, vfprintf, vsprintf: Prints formatted
who is on the system and what w: Displays information about
background processes. wait: A waits completion of
to stop or terminate. wait: Waits for a child process
sigsem: Signals a process waiting on a semaphore. • •
stop or terminate. wait: Waits for a child process to
checks access to a resource/ waitsem, nbwaitsem: Awaits and
·
ftw: Walks a file tree. . • . • .
wall: Writes to all users. . •
characters. wc: Counts lines, words and
whodo: Determines who is doing what.
..•.••..•.
what. whodo: Determines who is doing •
charmap: Generate troff width files and catab file.
hyphen: Finds hyphenated words. • . . . .
cd: Changes working directory.
chdir: Changes the working directory.
pwd: Prints working directory name.
Get the pathname of current working directory. getcwd:

uuto(C)
uutry(ADM)
uux(C)
val(CP)
val(CP)
assert(S)
abs(S)
floor(S)
getenv(S)
labs(DOS)
putenv(S)
true(C)
false(C)
varargs(S)
varargs(S)
tz(M)
getopt(S)
vi(C)
assert(S)
red(C)
sccsdiff(CP)
vprintf(S)
vi(C)
uuencode(C)
uuencode(C)
vidi(C)
vidi(C)
vidi(C)
vi(C)
vmstat(C)
vmstat(C)
filesystem(F)
vprintf(S)
vprintf(S)
w(C)
wait(C)
wait(S)
sigsem(S)
wait(S)
waitsem(S)
ftw(S)
wall(ADM)
wc(C)
whodo(C)
whodo(C)
charmap( CT)
hyphen(CT)
cd(C)
chdir(S)
pwd(C)
getcwd(S)

I-55

Permuted Index

Scan the spool directory for work. uucico: • . . . . . .
fputc, fputchar: Write a character to a stream.
write: Writes to a file. . • . •
write: Writes to another user.
outp: Writes a byte to an output port.
console. putch: Writes a character to the . . .
putpwent: Writes a password file entry.
write: Writes to a file.
wall: Writes to all users.
write: Writes to another user.
open: Opens file for reading or writing.
•..•.•
a file region for reading or writing. /Locks or unlocks
a file for shared reading and writing. sopen: Opens
utmp, wtmp: Formats of utmp and wtmp entries. . • . . . .
entries. utmp, wtmp: Formats ofutmp and wtmp
commands. xargs: Constructs and executes
Assembler. asx: XENIX 8086/186/286/386
masm: Invokes the XENIX assembler.
boot: XENIX boot program.
intro: Introduces XENIX commands.
commands. intro: Introduces XENIX Development System
Convert 386 COFF files to XENIX format. coffconv:
netutil: Administers the XENIX network.
config: Configures a XENIX system.
cu: Calls another XENIX system.
uname: Gets name of current XENIX system.
Executes commands on a remote XENIX system. remote:
rcp: Copies files across XENIX systems. . . . .
Prints the name of the current XENIX system. uname:
dosld: XENIX to MS-DOS cross linker.
uux: Executes command on remote XENIX. • . . . . . . .
uuto, uupick: Public XENIX-to-XENIX file copy.
entries from files. xlist, fxlist: Gets name list
programs. xref: Cross-references C . .
programs. xstr: Extracts strings from C
functions. bessel, jO, j 1, jn, yO, y 1, yn: Performs Bessel
bessel, jO, j 1, jn, yO, y 1, yn: Performs Bessel! . .
compiler-compiler. yacc: Invokes a . . . . .
yes: Prints string repeatedly.
bessel, jO, j 1, jn, yO, y 1, yn: Performs Bessel functions.
zcat: Display a stored file.
true: Returns with a zero exit value.
TZ: Time zone environment variable.

I-56

uucico(C)
fputc(DOS)
write(S)
write(C)
outp(DOS)
putch(DOS)
putpwent(S)
write(S)
wall(ADM)
write(C)
open(S)
10cking(S)
sopen(DOS)
utmp(F)
utmp(F)
xargs(C)
asx(CP)
masm(CP)
boot(HW)
Intro(C)
Intro(CP)
coffconv(M)
netutil(ADM)
config(ADM)
cu(C)
uname(S)
remote(C)
rcp(C)
uname(C)
• dosld(CP)
uux(C)
uuto(C)
xlist(S)
xref(CP)
xstr(CP)
bessel(S)
bessel(S)
yacc(CP)
yes(C)
bessel(S)
compress(C)
true(C)
tz(M)

512-210-035
24063



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2014:01:12 08:50:43-08:00
Modify Date                     : 2014:01:12 09:13:24-08:00
Metadata Date                   : 2014:01:12 09:13:24-08:00
Producer                        : Adobe Acrobat 9.55 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:6ed11867-c860-a548-aea8-9ebd5651dddc
Instance ID                     : uuid:eb1ece54-1c2d-144b-8729-5957bde782ad
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 864
EXIF Metadata provided by EXIF.tools

Navigation menu